mathEfront {PCRA} | R Documentation |
Efficient Frontiers from Returns
Description
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
Usage
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
)
Arguments
returns |
Multivariate xts object of portfolio returns |
mu.max |
Numeric value, default NULL |
sigma.max |
Numeric value, default NULL |
rf |
Numeric value with default 0.003 |
rf.line |
Logical variable with default TRUE |
stocks |
Logical variable with default TRUE |
stock.names |
Logical variable with default TRUE |
SRvalue |
Logical variable with default TRUE |
npoints |
Integer number of efficient frontier points, default 100 |
cexText |
Character expansion factor for text |
cexPoints |
Expansion factor for points |
digits |
Integer variable number of significant digits, default NULL |
Details
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.
Value
No value returned, instead a plot is displayed of the efficient frontier with cash and risky assets, with risky assets only efficient frontier overlaid
Examples
args(mathEfront)