A primary addition to PortfolioAnalytics in this 2.0 release is the integration of the CVXR solver R package for convex optimization. CVXR supports eleven solvers, each of which supports solvers for one or more of the following optimization problems: LP, QP, SOCP, SDP, EXP, MIP. See the Table near the beginning of the document "Convex Optimization in R" at https://cvxr.rbind.io/. Thus, with PortfolioAnalytics 2.0, users are able to use any one of a large variety of solvers available in CVXR for their portfolio optimization problems.
A particular use of CVXR in PortfolioAnalytics 2.0 is for computing Minimum Expected Quadratic Shortfall (MinCSM) portfolios, which is a second-order cone programming (SOCP) optimization problem. This is quite a new capability not available in other portfolio optimization software products. Details are provided in the Vignette "cvxrPortfolioAnalytics".
Another important feature of PortfolioAnalytics 2.0, is that it contains functionality for computing robust mean variance optimal (MVO) portfolios, using any one of several robust covariance matrix estimators that are not much influenced by outliers Details are provided in the Vignette "robustCovMatForPA".
New PortfolioAnalytics Functions:
optimize.portfolio
to a list of the portfolio weights, mean, volatility and Sharpe Ratio)meanvar.efficient.frontier
, meanetl.efficient.frontier
or meancsm.efficient.frontier
)Enhanced PortfolioAnalytics Functions:
momentFUN=
and output ~$moment_values
)momentFUN=
)mean-CSM
and mean-risk
, and customizable arg momentFUN=
)Support S3 Methods for CVXR:
Custom Moment Functions for Robust Covariance Matrices:
New Vignettes and their Code Functions in the demo Folder:
Please contribute with bug fixes, comments, and testing scripts!
Please take your data and disguise it when submitting, or use data sets like "edhec" like we do in the demos or or like "stocksCRSP" and "factorsSPGMI" in the PCRA package or with your constraints and other objectives modified to demonstrate your problem on public data.
Please report any bugs or issues on the PortfolioAnalytics GitHub page at https://github.com/braverock/PortfolioAnalytics/issues
Acknowledgements
The bulk of the work in creating PortfolioAnalytics 2.0 was done by Xinran Zhao, along with contributions from Yifu Kang, under the support of a 2022 Google Summer of Code (GSOC 2022). Xinran and Yifu were mentored in GSOC 2022 by Professor Doug Martin and Professor Steve Murray in the Applied Mathematics Department at the University of Washington.