Code Monkey home page Code Monkey logo

annual_rebalance_sharpe's Introduction

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 [email protected].

License

GNU AGPLv3

annual_rebalance_sharpe's People

Contributors

aleksli1 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.