Fitting a SSM with additional exogenous variables.

39 views
Skip to first unread message

Imon Palit

unread,
Mar 3, 2021, 7:10:01 AMMar 3
to pystatsmodels
Hi there,

Relative newbie to the world of SSM and have recently found this amazing package!

I need to fit the following model

 thumbnail_pastedImagebase640.png

where the innovations u_{i,t} and v_{i,t) are uncorrelated and HFT^S and nHFT^S are exogenous variables ( HFT^S_tilda and HFT^S_ntilda are residuals of these variables from an AR model).

Can the sm.tsa.DynamicFactor or sm.tsa.UnobservedComponents functions be used to fit such a model off the shelf or do I need to create my own set-up/class inputting the matrices etc?

Model comes from:
Jonathan Brogaard, Terrence Hendershott, Ryan Riordan, High-Frequency Trading and Price Discovery, The Review of Financial Studies, Volume 27, Issue 8, August 2014, Pages 2267–2306,

Thanks in advance!

 




thumbnail_pastedImagebase640.png

Chad Fulton

unread,
Mar 6, 2021, 10:39:10 PMMar 6
to Statsmodels Mailing List
Hello,

There's nothing off-the-shelf in Statsmodels that fits this setup, but you can create a custom state space model that will work with that model. Some examples of this are available at:

- A more detailed notebook that goes through setting up a custom state space model is: https://www.statsmodels.org/stable/examples/notebooks/generated/statespace_custom_models.html

Hope that helps,
Chad

--
You received this message because you are subscribed to the Google Groups "pystatsmodels" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pystatsmodel...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pystatsmodels/b8406fb5-b106-4781-8f01-16ea759d3892n%40googlegroups.com.

Imon Palit

unread,
Mar 7, 2021, 8:45:42 AMMar 7
to pystat...@googlegroups.com
The pointers on how to create custom set-ups look great.

Thanks for the tip!

You received this message because you are subscribed to a topic in the Google Groups "pystatsmodels" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pystatsmodels/1xo_mk7CIL0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pystatsmodel...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pystatsmodels/CAGxqfE8AL_BLEyU%2BLoAk2ZuFZOXzpMrtKprO3qTKtC%3DxrfKjFA%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages