opt.outputMvo: Optimal Portfolio Weights and Performance Values

View source: R/opt.outputMvo.R

opt.outputMvoR Documentation

Optimal Portfolio Weights and Performance Values

Description

Converts output of 'optimize.portfolio' to a list of the portfolio weights, mean, volatility and Sharpe Ratio.

Usage

opt.outputMvo(
  opt,
  returns,
  digits = NULL,
  annualize = TRUE,
  frequency = "monthly",
  rf = 0
)

Arguments

opt

List output of 'optimize.portfolio'

returns

Multivariate xts object of portfolio assets returns

digits

Integer number of significant digits with default NULL

annualize

Logical with default TRUE

frequency

Returns frequency: "monthly", "weekly" or "daily"

rf

Numeric value with default 0.0

Details

This function uses the weights returned by optimize.portfolio, along with the portfolio assets returns, and a risk-free rate, to to compute the portfolio mean return, volatility, and Sharpe Ratio.

Value

A list containing the portfolio numeric weights, mean value, volatility and Sharpe Ratio.

Author(s)

R. Douglas Martin

Examples

args(opt.outputMvo)

braverock/PortfolioAnalytics documentation built on April 18, 2024, 4:09 a.m.