An affordable and time-saving way to download and store stock prices can be considered a prerequisite for every future analysis on financial portfolio data.
The quantmod
package offers R users a really convenient way to perform this task. Complete documentation for the package is available at http://www.quantmod.com.
Quantmod, through the getSymbols()
function, lets you establish a direct connection with financial data sources such as:
This recipe will leverage the getSymbols()
function to download Apple's stock quotations. A proper candle and bar chart will then be produced.
As you would expect, we first need to install and load the package:
install.packages("quantmod") library('quantmod')