chart.RiskReward: classic risk reward scatter

Description Usage Arguments Details See Also

Description

This function charts the optimize.portfolio object in risk-return space.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
  ## S3 method for class 'optimize.portfolio.DEoptim'
 chart.RiskReward(object, ..., neighbors = NULL, return.col = "mean",
    risk.col = "ES", chart.assets = FALSE,
    element.color = "darkgray", cex.axis = 0.8,
    xlim = NULL, ylim = NULL)

  ## S3 method for class 'optimize.portfolio.random'
 chart.RiskReward(object, ..., neighbors = NULL, return.col = "mean",
    risk.col = "ES", chart.assets = FALSE,
    element.color = "darkgray", cex.axis = 0.8,
    xlim = NULL, ylim = NULL)

  ## S3 method for class 'optimize.portfolio.ROI'
 chart.RiskReward(object, ..., neighbors = NULL, return.col = "mean",
    risk.col = "ES", chart.assets = FALSE,
    element.color = "darkgray", cex.axis = 0.8,
    xlim = NULL, ylim = NULL, rp = FALSE)

  ## S3 method for class 'optimize.portfolio.pso'
 chart.RiskReward(object, ..., neighbors = NULL, return.col = "mean",
    risk.col = "ES", chart.assets = FALSE,
    element.color = "darkgray", cex.axis = 0.8,
    xlim = NULL, ylim = NULL)

  ## S3 method for class 'optimize.portfolio.GenSA'
 chart.RiskReward(object, ..., neighbors = NULL, return.col = "mean",
    risk.col = "ES", chart.assets = FALSE,
    element.color = "darkgray", cex.axis = 0.8,
    ylim = NULL, xlim = NULL, rp = FALSE)

  chart.RiskReward(object, ...)

  ## S3 method for class 'opt.list'
 chart.RiskReward(object, ...,
    risk.col = "ES", return.col = "mean", main = "",
    ylim = NULL, xlim = NULL, labels.assets = TRUE,
    chart.assets = FALSE, pch.assets = 1, cex.assets = 0.8,
    cex.axis = 0.8, cex.lab = 0.8, colorset = NULL,
    element.color = "darkgray")

Arguments

object

optimal portfolio created by optimize.portfolio.

neighbors

set of 'neighbor' portfolios to overplot, see Details.

...

any other passthru parameters.

return.col

string matching the objective of a 'return' objective, on vertical axis.

risk.col

string matching the objective of a 'risk' objective, on horizontal axis.

chart.assets

TRUE/FALSE. Includes a risk reward scatter of the assets in the chart.

element.color

color for the default plot scatter points.

cex.axis

The magnification to be used for axis annotation relative to the current setting of cex.

xlim

set the x-axis limit, same as in plot.

ylim

set the y-axis limit, same as in plot.

rp

TRUE/FALSE to generate random portfolios to plot the feasible space

main

a main title for the plot.

labels.assets

TRUE/FALSE to include the names in the plot.

pch.assets

plotting character of the assets, same as in plot

cex.assets

numerical value giving the amount by which the asset points should be magnified relative to the default.

cex.lab

numerical value giving the amount by which the labels should be magnified relative to the default.

colorset

color palette or vector of colors to use.

Details

neighbors may be specified in three ways. The first is as a single number of neighbors. This will extract the neighbors closest 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 risk.col,return.col, and weights columns all properly named.

See Also

optimize.portfolio


R-Finance/PortfolioAnalytics documentation built on May 8, 2019, 4:46 a.m.