Description Usage Arguments Author(s) References See Also Examples
A chart that shows rolling calculations of annualized return and annualized standard deviation have proceeded through time. Lines and dots are darker for more recent time periods.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | chart.SnailTrail(
R,
Rf = 0,
main = "Annualized Return and Risk",
add.names = c("all", "lastonly", "firstandlast", "none"),
xlab = "Annualized Risk",
ylab = "Annualized Return",
add.sharpe = c(1, 2, 3),
colorset = 1:12,
symbolset = 16,
legend.loc = NULL,
xlim = NULL,
ylim = NULL,
width = 12,
stepsize = 12,
lty = 1,
lwd = 2,
cex.axis = 0.8,
cex.main = 1,
cex.lab = 1,
cex.text = 0.8,
cex.legend = 0.8,
element.color = "darkgray",
...
)
|
R |
an xts, vector, matrix, data frame, timeSeries or zoo object of asset returns |
Rf |
risk free rate, in same period as your returns |
main |
set the chart title, same as in |
add.names |
plots the row name with the data point. default TRUE. Can be removed by setting it to NULL |
xlab |
set the x-axis label, as in |
ylab |
set the y-axis label, as in |
add.sharpe |
this draws a Sharpe ratio line that indicates Sharpe ratio
levels of |
colorset |
color palette to use, set by default to rational choices |
symbolset |
from |
legend.loc |
places a legend into one of nine locations on the chart: bottomright, bottom, bottomleft, left, topleft, top, topright, right, or center. |
xlim |
set the x-axis limit, same as in |
ylim |
set the y-axis limit, same as in |
width |
number of periods to apply rolling calculations over, sometimes referred to as a 'window' |
stepsize |
the frequency with which to make the rolling calculation |
lty |
set the line type, same as in |
lwd |
set the line width, same as in |
cex.axis |
The magnification to be used for sizing the axis text
relative to the current setting of 'cex', similar to |
cex.main |
The magnification to be used for sizing the main chart
relative to the current setting of 'cex', as in |
cex.lab |
The magnification to be used for sizing the label relative to
the current setting of 'cex', similar to |
cex.text |
The magnification to be used for sizing the text relative to
the current setting of 'cex', similar to |
cex.legend |
The magnification to be used for sizing the legend relative to the current setting of 'cex'. |
element.color |
provides the color for drawing chart elements, such as the box lines, axis lines, etc. Default is "darkgray" |
... |
any other passthru parameters |
Peter Carl
~put references to the literature/web site here ~
1 2 3 4 5 6 7 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.