Learn R Programming

PortfolioAnalytics (version 1.0.3636)

chart.Weights: boxplot of the weights of the optimal portfolios

Description

This function charts the optimal weights of a portfolio run via optimize.portfolio or optimize.portfolio.rebalancing. The upper and lower bounds on weights can be plotted for single period optimizations. The optimal weights will be charted through time for optimize.portfolio.rebalancing objects. For optimize.portfolio.rebalancing objects, the weights are plotted with chart.StackedBar.

Usage

chart.Weights(object, ...)
"chart.Weights"(object, ..., main = "Weights")
"chart.Weights"(object, ..., neighbors = NULL, main = "Weights", las = 3, xlab = NULL, cex.lab = 1, element.color = "darkgray", cex.axis = 0.8, colorset = NULL, legend.loc = "topright", cex.legend = 0.8, plot.type = "line")
"chart.Weights"(object, ..., neighbors = NULL, main = "Weights", las = 3, xlab = NULL, cex.lab = 1, element.color = "darkgray", cex.axis = 0.8, colorset = NULL, legend.loc = "topright", cex.legend = 0.8, plot.type = "line")
"chart.Weights"(object, ..., neighbors = NULL, main = "Weights", las = 3, xlab = NULL, cex.lab = 1, element.color = "darkgray", cex.axis = 0.8, colorset = NULL, legend.loc = "topright", cex.legend = 0.8, plot.type = "line")
"chart.Weights"(object, ..., neighbors = NULL, main = "Weights", las = 3, xlab = NULL, cex.lab = 1, element.color = "darkgray", cex.axis = 0.8, colorset = NULL, legend.loc = "topright", cex.legend = 0.8, plot.type = "line")
"chart.Weights"(object, ..., neighbors = NULL, main = "Weights", las = 3, xlab = NULL, cex.lab = 1, element.color = "darkgray", cex.axis = 0.8, colorset = NULL, legend.loc = "topright", cex.legend = 0.8, plot.type = "line")
"chart.Weights"(object, neighbors = NULL, ..., main = "Weights", las = 3, xlab = NULL, cex.lab = 1, element.color = "darkgray", cex.axis = 0.8, colorset = NULL, legend.loc = "topright", cex.legend = 0.8, plot.type = "line")

Arguments

object
optimal portfolio object created by optimize.portfolio.
neighbors
set of 'neighbor' portfolios to overplot. See Details.
...
any other passthru parameters .
main
an overall title for the plot: see title
las
numeric in {0,1,2,3}; the style of axis labels
0:
always parallel to the axis,

1:
always horizontal,

2:
always perpendicular to the axis,

3:
always vertical [default].

xlab
a title for the x axis: see title
cex.lab
The magnification to be used for x and y labels relative to the current setting of cex
element.color
provides the color for drawing less-important chart elements, such as the box lines, axis lines, etc.
cex.axis
The magnification to be used for axis annotation relative to the current setting of cex.
colorset
color palette or vector of colors to use.
legend.loc
location of the legend. If NULL, the legend will not be plotted.
cex.legend
The magnification to be used for legend annotation relative to the current setting of cex.
plot.type
"line" or "barplot" to plot.

See Also

optimize.portfolio optimize.portfolio.rebalancing chart.StackedBar