Description Usage Arguments Value References Examples
Downloads historical gains 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 |
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 gains for
|
prefrom.days |
Numeric value. If specified, function returns gains for
|
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. |
drop.anyNA |
Logical value for whether to drop dates on which prices are missing for any of the funds. |
Data frame with gains 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 gains for Netflix and Amazon over their mutual lifetimes
gains <- load_gains(c("NFLX", "AMZN"))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.