open-quant-live-book
open-quant-live-book copied to clipboard
RiskParity.R issues with Risk contribution
line 33 portfolio.risks <- rbind(portfolio.parity$risk_contribution/sum(portfolio.parity$risk_contribution), getCovRiskBudgets(portfolio.tangency))
2 issues:
- parity portfolio is "parity" - why take weights?
- the column name is relative_risk_contribution
so the line should really be just portfolio.risks <- rbind(portfolio.parity$relative_risk_contribution, getCovRiskBudgets(portfolio.tangency))
I just download .zip in the master branch (latest), the issue is still there, but there's more :
In the gitbook build version leaving this is fine, but changing it will cause error, but in the pdf version it needed to be changed in order to compile the book (epub is the same as pdf)