chart.EfficientFrontier: Chart the efficient frontier and risk-return scatter

Description Usage Arguments Details Author(s)

Description

Chart the efficient frontier and risk-return scatter of the assets for optimize.portfolio or efficient.frontier objects

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
  chart.EfficientFrontier(object, ...)

  ## S3 method for class 'optimize.portfolio.ROI'
 chart.EfficientFrontier(object, ..., match.col = "ES", n.portfolios = 25,
    xlim = NULL, ylim = NULL, cex.axis = 0.8,
    element.color = "darkgray",
    main = "Efficient Frontier", RAR.text = "SR", rf = 0,
    tangent.line = TRUE, cex.legend = 0.8,
    chart.assets = TRUE, labels.assets = TRUE,
    pch.assets = 21, cex.assets = 0.8)

  ## S3 method for class 'optimize.portfolio'
 chart.EfficientFrontier(object, ..., match.col = "ES", n.portfolios = 25,
    xlim = NULL, ylim = NULL, cex.axis = 0.8,
    element.color = "darkgray",
    main = "Efficient Frontier", RAR.text = "SR", rf = 0,
    tangent.line = TRUE, cex.legend = 0.8,
    chart.assets = TRUE, labels.assets = TRUE,
    pch.assets = 21, cex.assets = 0.8)

  ## S3 method for class 'efficient.frontier'
 chart.EfficientFrontier(object, ..., match.col = "ES", n.portfolios = NULL,
    xlim = NULL, ylim = NULL, cex.axis = 0.8,
    element.color = "darkgray",
    main = "Efficient Frontier", RAR.text = "SR", rf = 0,
    tangent.line = TRUE, cex.legend = 0.8,
    chart.assets = TRUE, labels.assets = TRUE,
    pch.assets = 21, cex.assets = 0.8)

Arguments

object

object to chart.

...

passthru parameters to plot

match.col

string name of column to use for risk (horizontal axis). match.col must match the name of an objective measure in the objective_measures or opt_values slot in the object created by optimize.portfolio.

n.portfolios

number of portfolios to use to plot the efficient frontier.

xlim

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

ylim

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

cex.axis

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

element.color

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

main

a main title for the plot.

RAR.text

string name for risk adjusted return text to plot in the legend.

rf

risk free rate. If rf is not null, the maximum Sharpe Ratio or modified Sharpe Ratio tangency portfolio will be plotted.

tangent.line

TRUE/FALSE to plot the tangent line.

cex.legend

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

chart.assets

TRUE/FALSE to include the assets.

labels.assets

TRUE/FALSE to include the asset names in the plot. chart.assets must be TRUE to plot asset names.

pch.assets

plotting character of the assets, same as in plot.

cex.assets

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

Details

For objects created by optimize.portfolio with 'DEoptim', 'random', or 'pso' specified as the optimize_method:

For objects created by optimize.portfolio with 'ROI' specified as the optimize_method:

Note that trace=TRUE must be specified in optimize.portfolio

GenSA does not return any useable trace information for portfolios tested at each iteration, therfore we cannot extract and chart an efficient frontier.

By default, the tangency portfolio (maximum Sharpe Ratio or modified Sharpe Ratio) will be plotted using a risk free rate of 0. Set rf=NULL to omit this from the plot.

Author(s)

Ross Bennett


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