Project 2 · Spikes and holidays

Cash-flow forecaster

A money-transfer business pre-funds each payout corridor every morning. This project takes the Project 1 seasonal model and fixes the three kinds of day that break it: random spikes, scheduled spikes (a payroll run every other Friday) and holidays in the receiving country. One fix at a time, five versions, each measured on the same backtest.

Horizon

What each version adds

Average error per corridor-day. Each bar shows the change from the previous version.

Which days each fix helps

Average error by type of day. Each step improves its own target; random spikes stay unpredictable for every version.

Explore the forecasts

A year of walk-forward forecasts (2025) for one corridor. Pick a corridor and versions, or jump to a holiday.

Corridor
Jump to
Versions
Days around a holiday (surge before, catch-up after) Holiday (volume drops) Random spike (not forecastable) Payroll Friday

Results table

The five versions

  1. Baseline: the Project 1 model, recent level × weekday factor × payday factor.
  2. + Spike GMM: a Gaussian mixture flags random spikes in the residuals; the baseline is refitted without them, so they stop inflating every ordinary day.
  3. + Holidays: holidays are cleaned out too, then each holiday's effect is learned from past years (surge before, drop on the day, catch-up after) and multiplied back in.
  4. Prophet + Fourier: a different family. Fourier seasonalities (weekly, every 14 days, monthly, yearly) treat repeating spikes like the payroll run as seasonality, so they get forecast.
  5. Prophet + Fourier + GMM: the mixture runs on Prophet's residuals, so it removes only the spikes the seasonality can't explain. Predictable patterns go into the forecast; random spikes stay out.

Data: three simulated corridors with known weekday, payday, holiday and spike effects. The same pipeline also runs on public U.S. Treasury data, where the Fourier approach is the one that helps. The full method with formulas is in the methodology.