onemetric.overtime.graph {stocks} | R Documentation |
Create plot comparing a performance metric across several investments over a period of time.
onemetric.overtime.graph(tickers = NULL, ..., gains = NULL, prices = NULL, y.metric = "cagr", window.units = 50, add.plot = FALSE, colors = NULL, plot.list = NULL, points.list = NULL, legend.list = NULL, pdf.list = NULL, bmp.list = NULL, jpeg.list = NULL, png.list = NULL, tiff.list = NULL)
tickers |
Character vector of ticker symbols. If |
... |
Arguments to pass along with tickers to |
gains |
Numeric matrix of gains (daily or otherwise), where each column has gains for a
particular investment. If |
prices |
Numeric matrix of prices (daily or otherwise), where each column has prices for
a particular investment. If |
y.metric |
Character string specifying what performance metric should be plotted. Possible
values are as follows: |
window.units |
Numeric value indicating the width of the moving window. For example, if
|
add.plot |
If |
colors |
Character string of colors for each fund. |
plot.list |
Optional list of inputs to pass to |
points.list |
Optional list of inputs to pass to |
legend.list |
Optional list of inputs to pass to |
pdf.list |
Optional list of inputs to pass to |
bmp.list |
Optional list of inputs to pass to |
jpeg.list |
Optional list of inputs to pass to |
png.list |
Optional list of inputs to pass to |
tiff.list |
Optional list of inputs to pass to |
If tickers
is specified, it gets passed to load.gains
to
load historical prices from Yahoo! Finance using the quantmod package
[1]. If gains
or prices
is specified, the performance metric is
calculated directly from that information.
In addition to the graph, a numeric matrix where each column contains the performance metric over time for a particular fund.
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.
onemetric.graph
, twometrics.graph
NA