Learn R Programming

PortfolioAnalytics (version 2.0.0)

chart.EF.Weights: Chart weights along an efficient frontier

Description

This function produces a stacked barplot of weights along an efficient frontier.

Usage

chart.EF.Weights(object, ...)

# S3 method for efficient.frontier chart.EF.Weights( object, ..., colorset = NULL, n.portfolios = 25, by.groups = FALSE, match.col = "ES", main = "", cex.lab = 0.8, cex.axis = 0.8, cex.legend = 0.8, legend.labels = NULL, element.color = "darkgray", legend.loc = "topright" )

# S3 method for optimize.portfolio chart.EF.Weights( object, ..., colorset = NULL, n.portfolios = 25, by.groups = FALSE, match.col = "ES", main = "", cex.lab = 0.8, cex.axis = 0.8, cex.legend = 0.8, legend.labels = NULL, element.color = "darkgray", legend.loc = "topright" )

Arguments

object

object of class efficient.frontier or optimize.portfolio.

...

passthru parameters to barplot.

colorset

color palette or vector of colors to use.

n.portfolios

number of portfolios to extract along the efficient frontier.

by.groups

TRUE/FALSE. If TRUE, the group weights are charted.

match.col

string name of column to use for risk (horizontal axis). Must match the name of an objective.

main

title used in the plot.

cex.lab

the magnification to be used for x-axis and y-axis labels relative to the current setting of 'cex'.

cex.axis

the magnification to be used for sizing the axis text relative to the current setting of 'cex', similar to plot.

cex.legend

the magnification to be used for sizing the legend relative to the current setting of 'cex', similar to plot.

legend.labels

character vector to use for the legend labels.

element.color

provides the color for drawing less-important chart elements, such as the box lines, axis lines, etc.

legend.loc

NULL, "topright", "right", or "bottomright". If legend.loc is NULL, the legend will not be plotted.

Author

Ross Bennett