Description Usage Arguments Value Author(s) See Also Examples
Download a collection of stock data from Yahoo Finance.
1 2 |
ticker |
A character vector where each element is a ticker. |
freq |
The frequency of the stock data to be downloaded. Default is |
get |
The default, |
start |
Start date in the format |
end |
End date in the format |
getReturns
outputs an object of class "stockReturns"
, which is a list of the following:
R |
Stock returns, where the first row is the most recent and the last row is the oldest. |
ticker |
The tickers of the stocks. |
period |
How frequently stock returns are included in the data. |
start |
The oldest date for which stock returns are included. |
end |
The most recent date for which stock returns are included. |
full |
A list, where each item is a data frame containing information from the CSV file downloaded from Yahoo Finance. |
David Diez and Nicolas Christou
stockModel
, optimalPort
, testPort
, portReturn
1 2 3 4 5 6 7 | #===> Citi and Bank of America, 2004-2008 <===#
# cBac <- getReturns(c('C','BAC'), start='2004-01-01', end='2008-12-31')
# print(cBac)
# summary(cBac)
# plot(cBac)
# lines(cBac, lwd=2)
# pairs(cBac)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.