Time Series Modelling¶
For all the following models
- The variable has to be stationary model
- Else, use non-stationary \(\to\) stationary transformation
- We drop parameters if they are significantly equal to 0
Difficulty
- The underlying data-generating process may change; give higher sample weight to recent past
Forecasting Types¶
Single-Step Forecasting¶
Multi-Step Forecasting¶
Rather than building a model for each step, you can define the model as
where
- \(h\) is the horizon
- \(f(h)\) is the captured mapping for \(h\). You may have to perform binary encoding (such as one-hot, etc).
Forecast Confidence Interval¶
It shows the range upto which the forecast is expected to deviate
If standard deviation remains constant across all time points, \(\sigma_{y+h} = \sigma_y\)
Correlogram¶
If the correlogram of error term wrt previous lags has | Accepted? | Reason |
---|---|---|
all bars inside the marked lines | ✅ | \(u_t\) has no auto-correlation |
one/more bars outside marked lines | ❌ | \(u_t\) has auto-correlation |
Simple/Baseline Models¶
Method | \(\hat y_{t+h}, \ h>=0\) | Appropriate for | |
---|---|---|---|
Average | Average of past values | \(\overline{ \{ y_{t-k} \} }\) | |
Naive | Last value | \(y_{t-1}\) | Random walk process (Consequence of efficient market hypothesis) |
Seasonal Naive | Last seasonal value | \({\large y}_{t+h-mk}\) where \(m=\) seasonal period | |
Drift Method | Last value plus average change Equivalent to extrapolating line between first and last point | \({\large y}_{t-1} + \overline{ \{ y_t - y_{t-1} \} }\) |
Where \(k > 0\)
Simulation Models¶
We do not use the observed values of the process as inputs
Preferred for long-term forecasts
Advantages¶
- Simple & Intuitive
- Non-parametric
- Easy to aggregate
Disadvantages¶
- Needs lots of data for good sample
- Assumption required for new products
- Assumes stationarity
Synthetic Data Generation using Gaussian Copula¶
You can use the below property to generate data similar to your original data $$ R \Alpha^{½} E \sim N(0, \Sigma) $$
- \(R\) is an \(n \times 1\) random normal vector
- \(\Alpha^{1/2}\) is an \(n \times n\) diagonal matrix with square roots of eigen values
- \(E\) is matrix of Eigen vectors
- \(\Sigma\) is covariance matrix of \(X\)
ETS Model¶
Errors, Trend, Seasonality
Monte-Carlo Simulation¶
Allows us to model the random component of a process; can be used along with an existing model for systematic component
System needs to describable in terms of pdf
FIR Model¶
Only using input features
\(k\) is the no of lagged input features
Output Error Model/Recursive Forecasting¶
FIR model using past estimations also. Ideally you should develop a model for this (infinite-step forecasting), and then work on using the same model for multi-step forecasting.
State Space Models¶
Kalman Filter¶
GMM¶
Generalized method of moments
Find relationship b/w moments of random variables
Yule-Walker estimates
Types of Errors¶
Error Type | |
---|---|
Amplitude | |
Phase |