This V2.1 version of PortfolioAnalytics is an update to the substantial V2.0 version that was released on 2024-07-03. We first describe the V2.0 features, then discuss the R demo capability, and finally we describe the additional V2.1 features.
A major feature of 2.0 is the integration of the CVXR solver R package for convex optimization. CVXR supports eleven solver packages, 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 variety of solvers available in CVXR for their portfolio optimization problems.
A particular use of CVXR in PortfolioAnalytics 2.0 is for computing Minimum Coherent Second Moment (MinCSM) portfolios, which are second-order cone programming (SOCP) optimization problems. This is quite a new capability that is 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 outliers-robust minimum variance (MV) optimal portfolios based on 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:
xxx
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
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.