Skip to content

This is a python script that annually rebalances a portfolio to optimise for the best Sharpe ratio

License

Notifications You must be signed in to change notification settings

AleksLi1/Annual_Rebalance_Sharpe

Repository files navigation

Annually Rebalanced Max Sharpe Efficient Frontier

This Primary model calculates an efficient frontier of 6 ETF's on an annual basis and selects the portfolio with the highest Sharpe ratio. In essence, this model looks at the yearly performance of these assets and based on their variance and expected return, and calculates the weights for the next year.

This is still a work in progress and updates are being pushed regularly. I've also tried my best to document my code, so feel free to play around with it and see if there are any improvements that you would suggest.

Here are the Model 1 results:

stats

Performance

hist

In addition, I have included 2 other versions of this model.

The second version of the first model, Model 2, has the exact same decision-making as Model 1, but has a lookback period of 6 months instead of an entire year. This has shown to increase portfolio versatility, and as such, achieve much greater risk-adjusted returns through lower drawdowns.

Model 2 results:

Performance

stats

hist

For further analysis, I include the following charts that compare Model 1 and Model 2 results.

P/L1

P/L2

As you can see, while Model 1 and Model 2 make almost the same investing decisions, Model 2 was much better at keeping the returns it had gained, especially during the Coronavirus Crash in 2020. I am now working on further increasing the versatility of this model by reducing the lookback period to a single quarter.

Finally, the Primary_GTT model (GTT stands for Growth Trend Timing) uses unemployment data from the FED in an attempt to time the market. While it incorporates macro theory to determine whether it is a good time to be invested in the market, the previous two models have shown that a better way of playing recessions is by being positioned in risk-off assets, rather than sitting on cash.

Primary_GTT results:

Performance

stats

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Contact

If you would like to get in touch, my email is aleksandras.v.liauska@bath.edu.

License

GNU AGPLv3

About

This is a python script that annually rebalances a portfolio to optimise for the best Sharpe ratio

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages