How to Build a Model That Adapts in Real Time
Why rolling retraining isn't enough, and what to do instead.
In the previous article, we began our online learning theory journey by introducing a model that can take multiple models’ forecasts and spit out a combined forecast that is often superior to any given model and is mathematically guaranteed to perform similarly to the best model.
The models we used to forecast returns were themself not “online” though. They were trained on a warm-up set and then kept frozen. The first improvement that comes to mind is simply retraining them periodically, but it turns out there is a more powerful method that lets you learn every single timestep and not miss out on crucial shifts.
That’s what we’ll be implementing in this article.
I write about quantitative trading the way it’s actually practiced:
Robust models and portfolios, combining signals and strategies, understanding the assumptions behind your models.
Topics I write about include portfolio construction, market making, risk management, research methodology, and more.
If this way of thinking resonates, you’ll probably like what I publish.
What you’ll learn
Why rolling window retraining is fundamentally limited and what assumptions it silently makes about your data.
How AROWR works: a second-order Bayesian online regression algorithm that maintains a full posterior over model weights and updates every single timestep.
How ARCOR extends AROWR with a principled covariance reset mechanism that detects when the market has changed and restores the model's ability to adapt.
How to implement AROWR and ARCOR from scratch in Python and apply them to any regression problem that updates in real time.
How we applied ARCOR to BTC beta estimation across 355 crypto assets over 4 years, significantly improving performance over rolling OLS, especially during LUNA, FTX, and similar situations.


