Portfolio Optimization Dashboard in R

The final dashboard can be found here.

In a previous post, I shared a customizable portfolio dashboard using R Shiny. That application took the portfolio weights as given, focusing on various visualizations and performance metrics. In this new post, we’ll create a portfolio optimization dashboard, aiming to find the optimal set of weights—subject to constraints—that yields a set of optimal portfolios. We’ll introduce some portfolio theory and implement the theoretical framework in R using packages like PortfolioAnalytics, PerformanceAnalytics, and tidyquant.

For those interested in further reading on portfolio theory, I recommend Essentials of Investments and Practical Portfolio Performance Measurement and Attribution. To implement these theories in R, the documentation of the aforementioned packages is invaluable. Additionally, Matt Dancho from Business Science University, co-author of the tidyquant package, provides useful vignettes that I highly recommend. Many of my posts are inspired by his practical learning labs and vignettes.

Related