R Stocks
After some time of using R and loving it, I was wondering if there was any open source project combining some of my favourite packages to easily get financial data and have it displayed interactively in Shiny.
Since I found nothing on Github, I decided to start it myself - This is how the R Stocks project started.
- Libraries that are used to fetch the main data:
- YfR - My guide on yfR
- Quantmod - My guide on quantmod
- PriceR - My guide on priceR
- Quandl - My guide on quandl
And of course I am also using Plotly and Shiny for the visualization and interactive dashboard building.
The App: R Stocks
Interactive Stocks Analysis with R
In the first tab, you will have available general information of the selected tickers:
The first panel is just using the yfR library to get the data displayed:
The panels below, are using QuanDL, so remember to have your API_key available:
Interactive Dividend Analysis with R
In the second tab of the dashboards, you can find information related to the historical dividends per selected ticker.
This panels have been possible thanks to QuantMod, where we can get access to historical dividen data and then create the following:
Also, thanks to QuanDL, we can have access to some interesting ratios concerning dividends:
Interactive Indexes Analysis with R
Once again, thanks to yfR we can query general market indexes, like SP500, DJ, Nikkei and check on how were the markets behaving globally at a given moment:
Interactive Commodities Analysis with R
Another interesting source of information can be created when comparing the price of commodities with the one of any of the indexes.
Thanks to yfR and this view, we can see the evolution in the relation of any pair index/commodity.
FAQ
How Can I try the R Stocks Shiny App?
- If you read so far, you will want to try the App, I have deployed it using the latest Docker image.
- You can use it for free from any browser at: https://r-stocks.fossengineer.com/
- The Docker image that Im running is of course in DockerHub: https://hub.docker.com/repository/docker/fossengineer/r_stocks
How can I contribute?
The code is accesible from my Github Repository of Rstocks
Please feel free to fork the repository and experiment with the code.