Description Usage Arguments Details Value Note Author(s) References See Also Examples
Downloads and aligns historical investment gains for specified tickers from Yahoo! Finance, using the quantmod package [1].
1 2 3 4 5 |
tickers |
Character string or vector of ticker symbols. |
intercepts |
Numeric vector of values to add to daily gains for each ticker. For example,
if you have two tickers and want to simulate a 1% annual expense ratio for only
the second fund, you would set |
slopes |
Numeric vector of values to multiply daily gains for each ticker by. For
example, if you have two tickers and want to simulate a 2x leveraged version of
the second fund, you would set |
... |
Arguments to pass to |
from |
Date or character string in form of date (e.g. |
to |
Date or character string in form of date (e.g. |
time.scale |
Character string that controls the time frame for gains. Possible values are
|
preto.days |
If specified, function returns gains for |
prefrom.days |
If specified, function returns gains for |
earliest.subset |
If |
latest.subset |
If |
In aligning historical prices, dates on which not all funds have data are simply dropped. Messages are printed indicating which dates are dropped for which tickers.
A numeric matrix where each column indicates the daily/monthly/yearly gains for a given ticker over the time period of interest.
NA
Dane R. Van Domelen
1. Jeffrey A. Ryan (2016). quantmod: Quantitative Financial Modelling Framework. R package version 0.4-6, https://cran.r-project.org/package=quantmod.
Acknowledgment: This material is based upon work supported by the National Science Foundation Graduate Research Fellowship under Grant No. DGE-0940903.
1 |
Loading required package: rbenchmark
[1] NA
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.