Regime switching models


I’ve not had time to delve into this yet - so putting this here.

Has anyone built a model like this?


It might be a bit challenging to rewrite the autoregressive model using tt.scan, but overall it is possible - would be great if somebody pick it up, it can be a nice exercise/example.


I gave it a stab:

Comments welcome :wink: