Description Usage Arguments Value References Examples
Downloads historical prices for specified tickers from Yahoo! Finance, with various options. Relies heavily on the quantmod package.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
tickers |
Character vector of ticker symbols that Yahoo! Finance recognizes, or "^CASH" for cash. |
intercepts |
Numeric vector of values to add to daily gains for each fund. |
slopes |
Numeric vector of values to multiply daily gains for each fund by. Slopes are multiplied prior to adding intercepts. |
from |
Date or character string, e.g. |
to |
Date or character string, e.g. |
time.scale |
Character string. Choices are |
preto.days |
Numeric value. If specified, function returns prices for
|
prefrom.days |
Numeric value. If specified, function returns prices for
|
initial |
Numeric value specifying what value to scale initial prices to. |
mutual.lifetimes |
Logical value for whether to start on the first day
and end on the last day of the funds' mutual lifetimes (within |
mutual.start |
Logical value for whether to start on the first day of the funds' mutual lifetimes. |
mutual.end |
Logical value for whether to end on the last day of the funds' mutual lifetimes. |
anchor |
Logical value for whether to anchor the starting price for each
fund to the price of the longest-running fund on that day. Useful for
visualizing funds' entire histories while also fairly comparing them over
their mutual lifetimes. Only used if |
drop.anyNA |
Logical value for whether to drop dates on which prices are missing for any of the funds. |
Data frame with closing prices for each fund.
Jeffrey A. Ryan and Joshua M. Ulrich (2019). quantmod: Quantitative Financial Modelling Framework. R package version 0.4-15. https://CRAN.R-project.org/package=quantmod
1 2 3 4 5 | ## Not run:
# Load prices for Netflix and Amazon over their mutual lifetimes
prices <- load_prices(c("NFLX", "AMZN"))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.