Portfolio Optimization Dashboard in R
In a previous post, I shared a customizable portfolio dashboard via R shiny. In that application, the weights of the portfolio are taken as given, and we focus more on the various types of visualizations and performance metrics. In this post, we create a portfolio optimization dashboard, which seeks to find the optimal set of weights, subject to some constraints, that yields a set of optimal portfolios. We will introduce some portfolio theory and implement the theoretical framework in R using packages such as
For more readings on the theory, I recommend Essentials of Investments and Practical Portfolio Performance Measurement and Attribution. For implementing these theories in R, I suggest reading the documentations for the aforementioned R packages; in addition, Matt Dancho from Business Science University (he is also the co-author of the
tidyquant package) provides some very useful vignettes on the
tidyquant package. Many of my posts are inspired by his incredibly practical learning labs and vignettes. Finally, the dashboard can be found here.