Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

chart.Bar

wrapper for barchart of returns


Description

A wrapper to create a chart of periodic returns in a bar chart. This is a difficult enough graph to read that it doesn't get much use. Still, it is useful for viewing a single set of data.

Usage

chart.Bar(R, legend.loc = NULL, colorset = (1:12), ...)

charts.Bar(R, main = "Returns", cex.legend = 0.8, cex.main = 1, ...)

Arguments

R

an xts, vector, matrix, data frame, timeSeries or zoo object of asset returns

legend.loc

places a legend into one of nine locations on the chart: bottomright, bottom, bottomleft, left, topleft, top, topright, right, or center

colorset

color palette to use, set by default to rational choices

...

any other passthru parameters, see plot

main

sets the title text, such as in chart.TimeSeries

cex.legend

sets the legend text size, such as in chart.TimeSeries

cex.main

sets the title text size, such as in chart.TimeSeries

Details

This is really a wrapper for chart.TimeSeries, so several other attributes can also be passed.

Creates a plot of time on the x-axis and vertical lines for each period to indicate value on the y-axis.

Author(s)

Peter Carl

See Also

Examples

data(edhec)
chart.Bar(edhec[,"Funds of Funds"], main="Monthly Returns")

PerformanceAnalytics

Econometric Tools for Performance and Risk Analysis

v2.0.4
GPL-2 | GPL-3
Authors
Brian G. Peterson [cre, aut, cph], Peter Carl [aut, cph], Kris Boudt [ctb, cph], Ross Bennett [ctb], Joshua Ulrich [ctb], Eric Zivot [ctb], Dries Cornilly [ctb], Eric Hung [ctb], Matthieu Lestel [ctb], Kyle Balkissoon [ctb], Diethelm Wuertz [ctb], Anthony Alexander Christidis [ctb], R. Douglas Martin [ctb], Zeheng 'Zenith' Zhou [ctb], Justin M. Shea [ctb]
Initial release
2020-02-05

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.