-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.Rmd
67 lines (45 loc) · 2.01 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# richer
<!-- badges: start -->
![build](https://github.com/92amartins/richer/workflows/build/badge.svg)
[![codecov](https://codecov.io/gh/92amartins/richer/branch/master/graph/badge.svg?token=0DPGPGX98O)](https://codecov.io/gh/92amartins/richer)
<!-- badges: end -->
Useful functions for stock market investments.
## Installation
You can install the development version from [GitHub](https://github.com/92amartins/richer) with:
```r
# install.packages("devtools")
devtools::install_github("92amartins/richer")
```
## Examples
Here are some use cases supported by the package.
Using the `stock()` function, you get back a `data.frame` suitable for any financial analysis.
```{r stock, message=FALSE, warning=FALSE}
library(richer)
vale = stock("VALE3.SA")
head(vale)
```
You can also get an investment hint for a specific stock by calling the function `hint()`.
```{r hint}
hint("VALE3.SA")
```
## Related Packages
`GetHFData` have long been my first choice for fetching trading data, but
the package does not work anymore as of early 2020 because of a issue with
with the B3's FTP service.
> _2020-06-30 IMPORTANT: B3 closed the public access to the ftp site and, therefore, the package is not working. As far as I know, there is no expectation of any change in that status in the near future. I'm also not aware of any other source of HF data._
So, we headed our attention to `quantmod` which fetches data from multiple sources:
> _quantmod is an R package that provides a framework for quantitative financial modeling and trading. It provides a rapid prototyping environment that makes modeling easier by removing the repetitive workflow issues surrounding data management and visualization._
## Acknowledgments
Thanks to Rodrigo Bonisem for initial discussions on this project.