chart.BarVaR {PerformanceAnalytics} | R Documentation |
Plots the periodic returns in a bar chart overlayed with a risk metric calculation.
chart.BarVaR(R, width = 0, gap = 1, risk.line = TRUE, method = "ModifiedVaR", reference.grid = TRUE, xaxis = TRUE, main = "Title", ylab = "Value", xlab = "Date", date.format = "%m/%y", xlim = NA, ylim = NA, lwd = 1, colorset = (1:12), p = 0.99, ...)
R |
a vector, matrix, data frame, timeSeries or zoo object of asset returns |
width |
periods specified for rolling-period calculations. Note that VaR and Std Dev with width=0 are calculated from the start of the timeseries |
method |
can be specified as StdDev , VaR , or ModifiedVaR |
p |
confidence level for VaR or ModifiedVaR calculation, default is .99 |
risk.line |
if risk.line is set to FALSE , then this function just draws the underlying bar chart |
gap |
numeric number of periods from start of series to use to train risk calculation |
reference.grid |
if true, draws a grid aligned with the points on the x and y axes |
xaxis |
if true, draws the x axis |
main |
set the chart title, same as in plot |
ylab |
set the y-axis label, same as in plot |
xlab |
set the x-axis label, same as in plot |
date.format |
re-format the dates for the xaxis; the default is "%m/%y" |
xlim |
set the x-axis limit, same as in plot |
ylim |
set the y-axis limit, same as in plot |
lwd |
set the line width, same as in plot |
colorset |
color palette to use, set by default to rational choices |
... |
any other passthru parameters |
Note that StdDev
and VaR
are symmetric calculations, so a high and low measure will be plotted. ModifiedVaR
, on the other hand, is assymetric and only a lower bound will be drawn.
Creates a plot of time on the x-axis and vertical lines for each period to indicate value on the y-axis. Overlays a line to indicate the value of a risk metric calculated at that time period.
Peter Carl
chart.TimeSeries
plot
VaR
VaR.CornishFisher
data(edhec) chart.BarVaR(edhec[,"Funds.of.Funds",drop=FALSE], main="Monthly Returns") chart.BarVaR(edhec[,"Funds.of.Funds",drop=FALSE], main="Monthly Returns", method="VaR") chart.BarVaR(edhec[,"Funds.of.Funds",drop=FALSE], main="Monthly Returns", method="StdDev", n=36)