chart.Histogram {PerformanceAnalytics}R Documentation

histogram of returns

Description

Create a histogram of returns, with optional curve fits for density and normal. This is wrapper function for hist, see the help for that function for additional arguments you may wish to pass in.

Usage

chart.Histogram(R, rf = 0, breaks="FD", main = NULL, add.names = TRUE, xlab = "Returns", ylab = "Frequency", border.col = "white", add.density = TRUE, add.fit = TRUE, density.col = "black", fit.col = "darkgray", colorset = "gray", lwd = 2, xlim = NULL, ...)

Arguments

R a vector, matrix, data frame, timeSeries or zoo object of asset returns
rf risk free rate, in same period as your returns
breaks how to calculate the breaks between the bars, see hist for details, default "FD"
add.names TRUE/FALSE whether to add names from the source data to the graph
add.density TRUE/FALSE whether to add the density plot to the graph
add.fit TRUE/FALSE whether to add a fitted curve to the graph
fit.col number of columns to fit the data over
border.col colorset to use for the border
density.col colorset to use for the density plot
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
xlim set the x-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

Details

Value

chart of histogram of returns

Note

Code inspired by a chart on: http://zoonek2.free.fr/UNIX/48_R/03.html

Author(s)

Peter Carl

References

See Also

hist

Examples






[Package PerformanceAnalytics version 0.9.4 Index]