Computes and plots the efficient frontier with and without risk-free asset, using a multivariate time series of returns to compute the mean vector and covariance matrix
mathEfront(
returns,
mu.max = NULL,
sigma.max = NULL,
rf = 0.003,
rf.line = TRUE,
stocks = TRUE,
stock.names = TRUE,
SRvalue = TRUE,
npoints = 100,
cexText = 0.8,
cexPoints = 0.8,
digits = NULL
)
No value returned, instead a plot is displayed of the efficient frontier with cash and risky assets, with risky assets only efficient frontier overlaid
Multivariate xts object of portfolio returns
Numeric value, default NULL
Numeric value, default NULL
Numeric value with default 0.003
Logical variable with default TRUE
Logical variable with default TRUE
Logical variable with default TRUE
Logical variable with default TRUE
Integer number of efficient frontier points, default 100
Character expansion factor for text
Expansion factor for points
Integer variable number of significant digits, default NULL
When rf.line = TRUE, the linear efficient frontier is displayed, and it is not displayed when rf.line = FALSE. When values = TRUE, the Sharpe ratio and risk-free rate values are displayed in the plot as SHARPE RATIO and RISK-FREE values.