GithubHelp home page GithubHelp logo

quhiquhihi / regime_model Goto Github PK

View Code? Open in Web Editor NEW
21.0 1.0 9.0 7.01 MB

detecting regime of financial market

Jupyter Notebook 90.34% Python 9.66%
economics finance investment investment-analysis investment-strategies quantitative-finance

regime_model's Introduction

Quantitative strategy with python

Detecting Regime of markets

Backtesting quantitative idea has significant drawbacks. If we test idea in single regime such as late 2020 to early 2022, the idea won't work in other regime such as late 2022.

SPY_2022-09-30_09-02-34

However, it is really difficult to get label data from financial market. Eventhough S&P500 index reached below 4000, it is really difficult to say that it is recession. Of course some might argue that it is recession, but other might say that it is not recession.

In addition, labelling market data daily or hourly is demading job. Single mistake might lead to huge loss at investment. Group of finance experts might be able to label market data. But this idea is unrealistic.

So, detecting regime shift or labelling regime automatically with algorithm will add great value to finance industry.

Gausian Mixture Model

Use Gausian mixture model and Hidden Markov model to catch regime shift of the market. Multiple asset classes such as stock, bond, real estate and commodity are used to detect regime shift.
Original idea from Alex Botte and Doris Bao from Two Sigma. Original article can be found in below link.

[Article] https://www.twosigma.com/articles/a-machine-learning-approach-to-regime-modeling/
[Blog] https://quhiquhihi.github.io/posts/Regime_Model(Markov-Model)/

Greedy Gausian Segmentation

Use Greedy Gausian Segmentation model to catch regime shift of market. Single asset class (US Equity) is used to detect regime shift.
Original idea from David Hallac, Peter Nystrup, Stephen Boyd of Stanford University.

[Paper] https://web.stanford.edu/~boyd/papers/pdf/ggs.pdf
[Blog] https://quhiquhihi.github.io/posts/Regime_Model(Gausian-Segmentation)/

regime_model's People

Contributors

kimfrancisco avatar quhiquhihi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

regime_model's Issues

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.