posted an update

The synthetic optimizer takes a filtered list of approved stocks and finds the optimal weighting for each one to ensure the portfolio behaves similarly to the S&P 500 even after removing companies.

For every stock on every trading day, we subtract SPY's daily returns. These returns measure how much each stock changes from the benchmark. Furthermore, we built a covariance matrix of those active returns using Ledoit-Wolf shrinkage (used raw historical correlations with a stable neutral estimate to reduce noise sensitivity) in order to figure out how each stock deviation compares to one another. Next, PyPortfolioOpt finds the weights that minimize the total variance of the portfolio's active returns. To do this, we minimized the tracking error as much as possible (the annualized standard deviation of the daily return difference between our portfolio and the S&P 500).

Log in or sign up for Devpost to join the conversation.