Tool to test the out-of-sample performance of different portfolio optimization strategy
This project comprises of three part, a Python package, a GUI and a web server. The package is the core of the project, it contains the functions to optimize the portfolio and to test the out-of-sample performance of the portfolio. The GUI is a simple interface to interact with the package, and the web server is a locally run api which fetches the latest data from the internet and runs the optimization and performance test.
Based on the paper: Optimal Versus Naive Diversification
The GUI is available at sidnand.github.io/Portfolio-Lab/.
The web server is available on GitHub.
This project was went to turn the original research paper into a general purpose application that could be used by finance hobbiests and researchers alike. It includes 11 pre-built models and for the tech savvy, the ability to create their own models. The models included are talked about below.
We will let:
This is the simplest model, it assigns equal weight to all the assets in the portfolio.
\[w = \frac{1}{n}\]This model minimizes the variance of the portfolio.
\[min \quad w^TCw\]such that:
\[w^T1 = 1\]This model maximizes the return of the portfolio for a given level of risk.
such that:
\[w^T1 = 1\]To compare the performance of the different models, we use the Sharpe ratio, which is the risk adjusted return of the portfolio. Defined as:
\[\frac{r_p - r_f}{\sigma_p}\]To test the statistical significance of the Sharpe ratio, we use the Jobson Korkie Z test
Where: