View source: R/05PortoflioMore.R
riskOptimalPortfolio | R Documentation |
It calls FRAPO
to compute risk optimal portfolio satisfying the constraint of draw downs and returns a S4 object of class fPORTFOLIO
.
riskOptimalPortfolio(data, Type="AveDD",value)
data |
timeSeries object of price data. Please remember the asset data must be price, not returns. |
Type |
Drawdown types, we call package FRAPO to support three methods:"maxDD","aveDD",and "CDaR". For details, please see document of package FRAPO. |
value |
Positive numerical number for Type. |
The risk optimal portfolio calls FRAPO
and wrapp the results as a S4 object of class fPORTFOLIO
, all get functions of fPORTFOLIO
are applicable.
returns an S4 object of class "fPORTFOLIO"
.
Ho Tsung-wu <tsungwu@ntnu.edu.tw>, College of Management, National Taiwan Normal University.
Roncalli Thierry, Introduction to Risk parity and Budgeting, 2014, CRC inc..
See also packages fPORTFOLIO
and FRAPO
# Risk optimal portfolio takes time, example below is commented. #data(LPP2005,package="fPortfolio") Data = fPortfolio::LPP2005[,1:6]#select 6 assets price Data.RET=timeSeries::returns(Data) # Transform into returns to compute VALUE below #VALUE=abs(mean(drawdowns(apply(Data.RET,1,mean)))) #output=riskOptimalPortfolio(Data,Type="AveDD",value=VALUE) # data input must be price. #show(output) #getWeights(output) #getCovRiskBudgets(output)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.