Closed cheenweekiang closed 2 years ago
Same backtestSummary(bt)$performance risk parity portfolio tangency portfolio Sharpe ratio NA NA max drawdown NA NA annual return NA NA annual volatility NA NA Sortino ratio NA NA downside deviation NA NA Sterling ratio NA NA Omega ratio NA NA VaR (0.95) NA NA CVaR (0.95) NA NA rebalancing period NA NA turnover NA NA ROT (bps) NA NA cpu time NA NA failure rate 1 1
Same
Hi all, thanks for reporting this.
The vignette in riskParityPortfolio hasn't kept up with the API changes over in portfolioBacktest (I've just updated it though :))! However, a simple change would fix this example:
1) change the signature of the portfolio functions:
max_sharpe_ratio <- function(dataset)
should be max_sharpe_ratio <- function(dataset, w_current)
risk_parity <- function(dataset)
should be risk_parity <- function(dataset, w_current)
2) the parameter T_rolling_window
has been renamed to lookback
3) backtestChartCumReturns
has been changed to backtestChartCumReturn
See the updated vignette :).
Hope that helps,
Problem description
Tried the Vignette for faang using risk parity and portfolioBacktest, the codes are not working. errror message as follows:
Example
Expected behavior
Environment: