Generating a financial analysis report
In this section, we will analyze Google’s stock data from Yahoo! Finance. To facilitate data download and analysis, we will use the quantmod
package, which is designed to assist quantitative traders in developing, testing, and deploying statistically based trading models. Let’s install the package and load it into the console:
>>> install.packages("quantmod") >>> library(quantmod)
Next, we will generate an HTML report using R Markdown and cover the basics of data querying and analysis.
Getting and displaying the data
Let’s go through an exercise to generate an initial report that automatically queries stock data from Yahoo! Finance and displays the basic information in the dataset.
Exercise 6.2 – generating the base report
In this exercise, we will set up an R Markdown file, download Google’s stock price data, and display general information about the dataset:
- ...