RiskPortfolios: Computation of Risk-Based Portfolios in R


RiskPortfolios is an R package (R Core Team (2016)) for constructing risk-based portfolios. It provides a set of functionalities to build mean-variance, minimum variance, inverse-volatility weighted (Leote De Carvalho, Lu, and Moulin (2012)), equal-risk-contribution (Maillard, Roncalli, and Teïletche (2010)), maximum diversification (Choueifaty and Coignard (2008)), and risk-efficient (Amenc et al. (2011)) portfolios. Optimization is achieved with the R packages quadprog (Weingessel (2013)) and nloptr (Ypma (2014)). Long or gross constraints can be added to the optimizer. As risk-based portfolios are mainly based on covariances, the package also provides a large set of covariance matrix estimators. A simulation study relying on the package is described in Ardia et al. (2016). The latest version of the package is available at 'https://github.com/ArdiaD/RiskPortfolios'.


Amenc, Noel, Felix Goltz, Lionel Martellini, and Patrice Retkowsky. 2011. “Efficient Indexation: An Alternative to Cap-Weighted Indices.” Journal of Investment Management 9 (4): 1–23.

Ardia, David, Guido Bolliger, Kris Boudt, and Jean-Philippe Gagnon-Fleury. 2016. “The Impact of Covariance Misspecification in Risk-Based Portfolios.”

Choueifaty, Yves, and Yves Coignard. 2008. “Toward Maximum Diversification.” Journal of Portfolio Management 35 (1): 40–51. doi:10.3905/JPM.2008.35.1.40.

Leote De Carvalho, Raul, Xiao Lu, and Pierre Moulin. 2012. “Demystifiying Equity Risk-Based Strategies: A Simple Alpha Plus Beta Description.” Journal of Portfolio Management 38 (3): 56–70. doi:10.3905/jpm.2012.38.3.056.

Maillard, Sébastien, Thierry Roncalli, and Jérôme Teïletche. 2010. “The Properties of Equally Weighted Risk Contribution Portfolios.” Journal of Portfolio Management 36 (4). Euromoney Institutional Investor: 60–70. doi:10.3905/jpm.2010.36.4.060.

R Core Team. 2016. R: A Language and Environment for Statistical Computing. Vienna, Austria: R Foundation for Statistical Computing. http://www.R-project.org/.

Weingessel, Andreas. 2013. Quadprog: Functions to Solve Quadratic Programming Problems. https://cran.r-project.org/package=quadprog.

Ypma, Jelmer. 2014. nloptr: R Interface to NLopt. https://cran.r-project.org/package=nloptr.