Question: "Pseudo-random number generator" for shocks to equations in ARIMAResults.simulate

58 views
Skip to first unread message

Alina S.

unread,
Aug 24, 2022, 7:05:23 AM8/24/22
to pystatsmodels
Hi all,

I am currently writing my thesis on forecasting and using statsmodels. Right now, I am looking into the ARIMAResults.simulate function which is described here:

https://www.statsmodels.org/devel/generated/statsmodels.tsa.arima.model.ARIMAResults.simulate.html#statsmodels.tsa.arima.model.ARIMAResults.simulate

I would like to understand how this function works exactly. How does the "pseudo-random number generator" for the measurement and state shocks work? Do the shocks scale with the amplitude of my data? Could you direct me to the source? I wasn't able to find it (maybe a rookie mistake).

Thank you in advance!
Best,
Alina

Chad Fulton

unread,
Aug 27, 2022, 12:08:15 AM8/27/22
to pystat...@googlegroups.com
Hi Alina,

State space models (of which ARIMA models are a special case) have 3 fundamental sources of randomness: (1) the initial state vector, (2) the error terms in the transition equation, and (3) the error terms in the measurement equation.  All of these are assumed to be independent and multivariate normal.

So, the first step is to simulate these from the respective multivariate normal distributions using, for example, numpy.random.multivariate_normal. With these terms available, the state vector can be simulated by applying the transition equation, and the observed vector can be simulated by applying the measurement equation.

Best,
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/07456c4b-ec04-4fe3-b73e-c1df490c3cf6n%40googlegroups.com.

Alina S.

unread,
Sep 28, 2022, 5:34:04 AM9/28/22
to pystatsmodels
Hi Chad,

thank you so much for your reply. 
I have just one more question about this: 
If I have, let's say, an exponential smoothing or ARIMA model and I were to simulate a few multi-step trajectories for my time series,
can I expect the different forecasts to "fan out" for a large forecast horizon because of increasing uncertainty and error propagation?
Or should the difference between the forecasts stay more or less the same over time?
I'm still pretty new to state-space models and not quite sure I understand this.

Thanks again,
Alina
Reply all
Reply to author
Forward
0 new messages