Â
1. LESSON OBJECTIVES
By the end of this lesson, you will be able to:
-
Differentiate between cross-sectional and time series data and identify the key characteristics of financial time series.
-
Decompose a time series into trend, seasonal, cyclical, and irregular components.
-
Apply moving averages and exponential smoothing methods for short-term forecasting.
-
Implement AR, MA, ARMA, and ARIMA models for stationary time series.
-
Conduct stationarity testing using the Augmented Dickey-Fuller (ADF) test.
-
Perform cointegration analysis and build an Error Correction Model (ECM).
-
Apply vector autoregression (VAR) for multivariate forecasting.
-
Evaluate forecast accuracy using MAE, RMSE, MAPE, and Theil’s U-statistic.
-
Model volatility using ARCH and GARCH processes.
-
Build a production-grade revenue forecasting pipeline for a FinTech platform.
2. TIME SERIES DATA – CHARACTERISTICS AND COMPONENTS
A. CHARACTERISTICS OF FINANCIAL TIME SERIES:
-
Frequency:Â Daily, weekly, monthly, quarterly, or annual data.
-
Irregular (Random) Component:Â Unpredictable fluctuations.
-
Trend:Â Long-term upward or downward movement.
-
Seasonality:Â Systematic patterns that repeat at regular intervals (e.g., monthly or quarterly).
-
Cyclical:Â Longer-term fluctuations that are not fixed in frequency (e.g., business cycles).
-
Non-Stationarity:Â The mean and variance of the series change over time.
B. THE CLASSICAL DECOMPOSITION (ADDITIVE MODEL):
Y_t = T_t + S_t + C_t + ε_t
Where:
-
T_t = Trend component.
-
S_t = Seasonal component.
-
C_t = Cyclical component.
-
ε_t = Irregular (random) component.
MULTIPLICATIVE MODEL (For Series with Increasing Variance):
Y_t = T_t * S_t * C_t * ε_t
C. DECOMPOSITION METHODS:
1. Moving Average Decomposition:
-
Estimate the trend-cycle component using a centered moving average.
-
Remove the trend to get the seasonal-irregular component.
-
Average the seasonal-irregular component for each season to get the seasonal index.
-
Adjust the seasonal indices so they sum to zero (additive) or to the number of seasons (multiplicative).
2. STL (Seasonal-Trend Decomposition using LOESS):
-
A robust, flexible decomposition method that handles missing values and outliers.
-
Uses locally weighted regression (LOESS) to estimate the trend and seasonal components.
3. EXPONENTIAL SMOOTHING METHODS
A. SIMPLE EXPONENTIAL SMOOTHING (FOR SERIES WITH NO TREND OR SEASONALITY):
Ŷ_{t+1} = α * Y_t + (1 – α) * Ŷ_t
Where:
-
Ŷ_{t+1} = Forecast for period t+1.
-
Y_t = Actual value at time t.
-
Ŷ_t = Forecast for period t.
-
α = Smoothing parameter (0 < α < 1). A higher α gives more weight to recent observations.
B. HOLT’S LINEAR TREND METHOD (DOUBLE EXPONENTIAL SMOOTHING):
For series with a trend but no seasonality:
Level: L_t = α * Y_t + (1 – α) * (L_{t-1} + B_{t-1})
Trend: B_t = β * (L_t – L_{t-1}) + (1 – β) * B_{t-1}
Forecast: Ŷ_{t+m} = L_t + m * B_t
Where:
-
L_t = Level at time t.
-
B_t = Trend at time t.
-
α and β are smoothing parameters.
C. HOLT-WINTERS SEASONAL METHOD (TRIPLE EXPONENTIAL SMOOTHING):
For series with both trend and seasonality:
Additive Seasonality:
Level: L_t = α * (Y_t – S_{t-p}) + (1 – α) * (L_{t-1} + B_{t-1})
Trend: B_t = β * (L_t – L_{t-1}) + (1 – β) * B_{t-1}
Seasonal: S_t = γ * (Y_t – L_t) + (1 – γ) * S_{t-p}
Forecast: Ŷ_{t+m} = L_t + m * B_t + S_{t+m-p}
Multiplicative Seasonality:
Level: L_t = α * (Y_t / S_{t-p}) + (1 – α) * (L_{t-1} + B_{t-1})
Trend: B_t = β * (L_t – L_{t-1}) + (1 – β) * B_{t-1}
Seasonal: S_t = γ * (Y_t / L_t) + (1 – γ) * S_{t-p}
Forecast: Ŷ_{t+m} = (L_t + m * B_t) * S_{t+m-p}
Where:
-
p = Number of seasonal periods (e.g., p = 12 for monthly data, p = 4 for quarterly data).
-
γ = Seasonal smoothing parameter.
4. STATIONARITY AND THE AUGMENTED DICKEY-FULLER (ADF) TEST
A. STATIONARITY DEFINITION:
A time series is weakly stationary if:
-
E[Y_t] = μ (constant mean).
-
Var(Y_t) = σ^2 (constant variance).
-
Cov(Y_t, Y_{t-k}) depends only on k (autocovariance does not depend on t).
B. THE AUGMENTED DICKEY-FULLER (ADF) TEST:
The ADF test tests the null hypothesis of a unit root (non-stationarity).
Test Equation:
ΔY_t = α + β * t + γ * Y_{t-1} + δ_1 * ΔY_{t-1} + δ_2 * ΔY_{t-2} + … + δ_p * ΔY_{t-p} + ε_t
Where:
-
ΔY_t = Y_t – Y_{t-1} (first difference).
-
α = Constant term.
-
β * t = Trend term.
-
γ = Coefficient on the lagged level.
-
δ_i = Coefficients on lagged differences.
-
p = Number of lagged terms (chosen using the AIC or BIC criterion).
Hypothesis Test:
-
H_0: γ = 0 (unit root exists → series is non-stationary).
-
H_1: γ < 0 (no unit root → series is stationary).
Decision Rule:
-
If the t-statistic for γ is less than the critical value (e.g., -3.43 at 5% significance), reject H_0 and conclude that the series is stationary.
-
If the p-value > 0.05, fail to reject H_0 → the series is non-stationary.
C. MAKING A SERIES STATIONARY:
-
First Differencing: ΔY_t = Y_t – Y_{t-1}
-
Log Transformation:Â ln(Y_t) (useful when the variance is not constant).
-
Seasonal Differencing: Δ_s Y_t = Y_t – Y_{t-s} (where s is the seasonal period, e.g., 12 for monthly data).
5. AUTOREGRESSIVE (AR) MODELS
An AR(p) model expresses the current value of the series as a linear function of its own past values.
Y_t = c + φ_1 * Y_{t-1} + φ_2 * Y_{t-2} + … + φ_p * Y_{t-p} + ε_t
Where:
-
c = Constant.
-
φ_i = Autoregressive coefficients.
-
ε_t = White noise error term (mean = 0, variance = σ^2, no autocorrelation).
STATIONARITY CONDITION FOR AR(p):
All roots of the characteristic equation must lie outside the unit circle:
1 – φ_1 * z – φ_2 * z^2 – … – φ_p * z^p = 0
For an AR(1) model (Y_t = c + φ_1 * Y_{t-1} + ε_t), stationarity requires |φ_1| < 1.
THE PARTIAL AUTOCORRELATION FUNCTION (PACF):
The PACF measures the correlation between Y_t and Y_{t-k} after removing the effects of intermediate lags. For an AR(p) process, the PACF cuts off after lag p.
6. MOVING AVERAGE (MA) MODELS
An MA(q) model expresses the current value of the series as a linear function of past forecast errors (white noise terms).
Y_t = c + ε_t + θ_1 * ε_{t-1} + θ_2 * ε_{t-2} + … + θ_q * ε_{t-q}
Where:
-
θ_i = Moving average coefficients.
INVERTIBILITY CONDITION:
All roots of the MA characteristic equation must lie outside the unit circle. For an MA(1) model (Y_t = c + ε_t + θ_1 * ε_{t-1}), invertibility requires |θ_1| < 1.
THE AUTOCORRELATION FUNCTION (ACF):
The ACF measures the correlation between Y_t and Y_{t-k}. For an MA(q) process, the ACF cuts off after lag q.
7. ARMA AND ARIMA MODELS
A. ARMA (p, q) MODEL:
Combines AR and MA components:
Y_t = c + φ_1 * Y_{t-1} + … + φ_p * Y_{t-p} + ε_t + θ_1 * ε_{t-1} + … + θ_q * ε_{t-q}
B. ARIMA (p, d, q) MODEL:
ARIMA stands for AutoRegressive Integrated Moving Average. “Integrated” refers to differencing to achieve stationarity.
Δ^d Y_t = c + φ_1 * Δ^d Y_{t-1} + … + φ_p * Δ^d Y_{t-p} + ε_t + θ_1 * ε_{t-1} + … + θ_q * ε_{t-q}
Where:
-
d = Number of times the series is differenced to achieve stationarity.
-
Δ^d Y_t = d-th difference of Y_t.
C. SARIMA (SEASONAL ARIMA):
For series with seasonality, we add seasonal AR and MA terms:
SARIMA(p, d, q) × (P, D, Q)_s
Where:
-
P = Seasonal AR order.
-
D = Seasonal differencing order.
-
Q = Seasonal MA order.
-
s = Seasonal period.
THE BOX-JENKINS METHODOLOGY (MODEL SELECTION):
-
Identification:Â Use ACF and PACF plots to identify candidate models.
-
Estimation:Â Estimate the model parameters using Maximum Likelihood Estimation (MLE) or Conditional Least Squares.
-
Diagnostic Checking:Â Check the residuals for autocorrelation (using the Ljung-Box Q-test). If residuals are white noise, the model is adequate.
-
Model Selection:Â Use information criteria (AIC, BIC) to select the best model among candidates.
AIC = -2 * ln(Likelihood) + 2 * k
BIC = -2 * ln(Likelihood) + k * ln(n)
Where k is the number of parameters, and n is the sample size. Lower AIC/BIC indicates better model fit (penalizing complexity).
8. COINTEGRATION AND THE ERROR CORRECTION MODEL (ECM)
A. COINTEGRATION:
Two or more non-stationary series are cointegrated if there exists a linear combination that is stationary. This implies a long-term equilibrium relationship between the variables.
The Engle-Granger Two-Step Method:
-
Run a regression of Y_t on X_t: Y_t = β_0 + β_1 * X_t + u_t.
-
Test the residuals (u_t) for stationarity using the ADF test.
-
If the residuals are stationary, the series are cointegrated.
B. THE ERROR CORRECTION MODEL (ECM):
The ECM captures both the short-run dynamics and the long-run equilibrium relationship.
ΔY_t = α_0 + α_1 * (Y_{t-1} – β_0 – β_1 * X_{t-1}) + Σ δ_i * ΔY_{t-i} + Σ γ_i * ΔX_{t-i} + ε_t
Where:
-
(Y_{t-1} – β_0 – β_1 * X_{t-1}) = The error correction term (deviation from long-run equilibrium).
-
α_1 = The speed of adjustment coefficient (negative, typically between -1 and 0).
Interpretation:
-
If α_1 = -0.2, it means that 20% of the previous period’s deviation from equilibrium is corrected in the current period.
-
The ECM is widely used in FinTech revenue forecasting because it can capture the long-term relationship between revenue and key drivers (e.g., transaction volume, GDP growth) while also modeling short-term fluctuations.
9. VECTOR AUTOREGRESSION (VAR)
A VAR model captures the linear interdependencies among multiple time series variables.
THE VAR(p) MODEL:
Y_t = c + Φ_1 * Y_{t-1} + Φ_2 * Y_{t-2} + … + Φ_p * Y_{t-p} + ε_t
Where:
-
Y_t = (Y_{1,t}, Y_{2,t}, …, Y_{k,t})’ is a k × 1 vector of endogenous variables.
-
c = k × 1 vector of constants.
-
Φ_i = k × k matrices of coefficients.
-
ε_t = k × 1 vector of white noise error terms.
IMPULSE RESPONSE FUNCTIONS (IRF):
IRFs trace the response of each variable to a one-standard-deviation shock in one of the other variables. This is useful for understanding the dynamic impact of a shock (e.g., a regulatory change) on FinTech revenue.
10. FORECAST ACCURACY METRICS
A. MEAN ABSOLUTE ERROR (MAE):
MAE = (1/n) * Σ |Y_t – Ŷ_t|
B. ROOT MEAN SQUARED ERROR (RMSE):
RMSE = sqrt( (1/n) * Σ (Y_t – Ŷ_t)^2 )
RMSE penalizes large errors more heavily than MAE (because of the squaring). It is the most commonly used metric.
C. MEAN ABSOLUTE PERCENTAGE ERROR (MAPE):
MAPE = (1/n) * Σ |(Y_t – Ŷ_t) / Y_t| * 100%
D. THEIL’S U-STATISTIC:
Measures forecast accuracy relative to a naive forecast (the random walk without drift).
U = sqrt( (1/n) * Σ (Y_t – Ŷ_t)^2 ) / sqrt( (1/n) * Σ (Y_t – Y_{t-1})^2 )
-
If U = 1, the forecast is no better than a naive random walk.
-
If U < 1, the forecast outperforms the naive model.
-
If U > 1, the forecast is worse than the naive model.
11. VOLATILITY MODELING – ARCH AND GARCH
Financial time series often exhibit volatility clustering (large changes tend to be followed by large changes) and volatility persistence.
A. AUTOREGRESSIVE CONDITIONAL HETEROSKEDASTICITY (ARCH):
An ARCH(q) model models the variance of the error term as a function of past squared errors.
ε_t = σ_t * z_t, where z_t ~ N(0, 1)
σ_t^2 = α_0 + α_1 * ε_{t-1}^2 + α_2 * ε_{t-2}^2 + … + α_q * ε_{t-q}^2
B. GENERALIZED ARCH (GARCH):
A GARCH(p, q) model adds lagged conditional variances to the variance equation.
σ_t^2 = α_0 + Σ_{i=1}^q α_i * ε_{t-i}^2 + Σ_{j=1}^p β_j * σ_{t-j}^2
GARCH(1,1) – The Most Common Specification:
σ_t^2 = α_0 + α_1 * ε_{t-1}^2 + β_1 * σ_{t-1}^2
Where:
-
α_1 captures the impact of recent shocks.
-
β_1 captures the persistence of volatility.
-
If α_1 + β_1 < 1, the volatility process is stationary (the unconditional variance is finite).
-
If α_1 + β_1 is close to 1, volatility is highly persistent (near-integrated).
Application in FinTech Revenue Forecasting:
-
Revenue volatility (e.g., transaction volume volatility) can be modeled using GARCH.
-
The GARCH forecasted variance can be used to estimate the expected range of future revenue, which is critical for treasury planning and risk management.
12. PRODUCTION FORECASTING PIPELINE FOR A FINTECH PLATFORM
STEP 1: DATA COLLECTION AND PREPROCESSING:
-
Extract historical transaction data, revenue data, and driver variables (e.g., number of users, GDP, consumer spending, marketing spend).
-
Clean the data (handle missing values, outliers).
-
Aggregate the data to the appropriate frequency (daily, weekly, monthly).
STEP 2: EXPLORATORY DATA ANALYSIS (EDA):
-
Plot the time series and decompose it into trend, seasonal, and residual components.
-
Compute ACF and PACF plots.
-
Test for stationarity using the ADF test.
STEP 3: MODEL SELECTION AND ESTIMATION:
-
Select candidate models (e.g., Exponential Smoothing, ARIMA, SARIMA, VAR).
-
Estimate the model parameters using MLE.
-
Use information criteria (AIC, BIC) to select the best model.
STEP 4: DIAGNOSTIC CHECKING:
-
Test residuals for autocorrelation (Ljung-Box Q-test).
-
Test residuals for normality (Jarque-Bera test).
-
Test residuals for heteroskedasticity (ARCH-LM test).
STEP 5: FORECAST GENERATION:
-
Generate point forecasts and prediction intervals (confidence bands).
-
Use Monte Carlo simulation to incorporate uncertainty from volatility (GARCH) into the forecast distribution.
STEP 6: MODEL DEPLOYMENT AND MONITORING:
-
Deploy the model to a production environment (e.g., using a REST API or scheduled batch job).
-
Monitor forecast accuracy continuously (e.g., weekly rolling evaluation of RMSE).
-
Retrain the model periodically (e.g., monthly) to adapt to changing market conditions.
STEP 7: INTEGRATION WITH FP&A:
-
Feed the revenue forecasts into the FP&A system (which generates the three-statement financial model).
-
Run scenario analysis (e.g., best-case, base-case, worst-case) to support strategic planning and capital allocation decisions.
Â