Description Usage Arguments Details See Also
This function is the generic method to chart risk budget
objectives for optimize.portfolio,
optimize.portfolio.rebalancing, and
opt.list objects. This function charts the
contribution or percent contribution of the resulting
objective measures of a risk_budget_objective. The
risk contributions for
optimize.portfolio.rebalancing objects are plotted
through time with
chart.StackedBar.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | chart.RiskBudget(object, ...)
## S3 method for class 'optimize.portfolio'
chart.RiskBudget(object,
..., neighbors = NULL, risk.type = "absolute",
main = "Risk Contribution", ylab = "", xlab = NULL,
cex.axis = 0.8, cex.lab = 0.8,
element.color = "darkgray", las = 3, ylim = NULL)
## S3 method for class 'optimize.portfolio.rebalancing'
chart.RiskBudget(object, ..., match.col = "ES", risk.type = "absolute",
main = "Risk Contribution")
## S3 method for class 'opt.list'
chart.RiskBudget(object, ...,
match.col = "ES", risk.type = "absolute",
main = "Risk Budget", plot.type = "line",
cex.axis = 0.8, cex.lab = 0.8,
element.color = "darkgray", las = 3, ylim = NULL,
colorset = NULL, legend.loc = NULL, cex.legend = 0.8)
|
object |
optimal portfolio object created by
|
... |
any other passthru parameters to
|
neighbors |
risk contribution or pct_contrib of neighbor portfolios to be plotted, see Details. |
match.col |
string of risk column to match. The
|
risk.type |
"absolute" or "percentage" to plot risk contribution in absolute terms or percentage contribution. |
main |
main title for the chart. |
plot.type |
"line" or "barplot". |
ylab |
label for the y-axis. |
xlab |
label for the x-axis. |
cex.axis |
the magnification to be used for axis
annotation relative to the current setting of
|
cex.lab |
the magnification to be used for axis
annotation relative to the current setting of
|
element.color |
provides the color for drawing less-important chart elements, such as the box lines, axis lines, etc. |
las |
numeric in {0,1,2,3}; the style of axis labels
|
ylim |
set the y-axis limit, same as in
|
colorset |
color palette or vector of colors to use |
legend.loc |
legend.loc NULL, "topright", "right", or "bottomright". If legend.loc is NULL, the legend will not be plotted |
cex.legend |
The magnification to be used for the
legend relative to the current setting of |
neighbors may be specified in three ways. The
first is as a single number of neighbors. This will
extract the neighbors closest to the portfolios in
terms of the out numerical statistic. The second
method consists of a numeric vector for neighbors.
This will extract the neighbors with portfolio
index numbers that correspond to the vector contents. The
third method for specifying neighbors is to pass
in a matrix. This matrix should look like the output of
extractStats, and should contain properly
named contribution and pct_contrib columns.
optimize.portfolio
optimize.portfolio.rebalancing
chart.StackedBar
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.