by Jonathan Widarsa
on the theory and practice of unveiling structure behind data.
-

When Variance Has a Memory
Read more: When Variance Has a MemoryEvery ARIMA model that we write carries an assumption we might not have explicitly stated. When we consider the error term εt\varepsilon_t, we assume that where σ2\sigma^2 is a constant. We call this homoskedasticity, and for many applications, it’s honestly reasonable enough. However, some data (e.g., financial time series) have a well-documented habit of violating it. Take a look at the plot for the S&P 500’s log returns above. It’s clear that the magnitude of daily swings isn’t constant across time. We observe that markets go through stretches of relative calm (e.g., mid-2023 to mid-2024) and then abruptly enter periods…
-

Beyond Constant Volatility
Read more: Beyond Constant VolatilityIn our Black-Scholes post, we saw that the log-return over any interval assumed by the model is normally distributed with variance proportional to σ2T\sigma^2 T, where σ\sigma is a constant. This implies three things that empirical data consistently contradict: no volatility clustering (large moves tend to follow large moves in real markets), no mean-reversion (volatility spikes during crises and subsides afterward), and symmetric returns (market exhibits negative skew). These limitations give rise to the Heston model. Unlike the Black-Scholes, this model lets variance vt=σt2v_t = \sigma_t^2 evolve as its own stochastic process, correlated with the stock price process. The correlation…
-

How Black-Scholes Came to Be
Read more: How Black-Scholes Came to Behe Black-Scholes model is inarguably one of the most important formulas to ever exist. Lots of people have seen it and memorized it, and some have applied it derivatives pricing to actually accumulate wealth. Personally, I’m deeply interested in how it came to be simply because fully understanding the system gives a level of intuition unlike anyone blatantly memorizing the formula can have. So, unlike my other posts, I’ve decided to comprehensively show the derivation (abstracting non-trivial calculations) of the Black-Scholes formula, and only later explain the intuition of the model that many know. *** How should we model a…
-

Tracking Concealed Truths
Read more: Tracking Concealed TruthsIf there’s anything we’ve learnt after spending time with hidden Markov models (HMMs), it’s that HMMs are based on a powerful idea: the world has a hidden state that evolves over time, and all we ever get to observe is noisy, indirect measurements of that state. HMMs gave us a clean framework for reasoning about this under discrete state spaces. But, then, what happens when the hidden state is continuous? What about the exact position of a moving car, or the true temperature of a chemical reactor? Enumerating every possible state is no longer feasible, and so we need a…
-

A Drunk and Her Dog
Read more: A Drunk and Her DogThis is a story of cointegration: of common misconceptions about the relationship between multiple time series and how cointegration brings a new perspective to this. Much of the concept of cointegration I’ve encountered comes with in-depth technical details and derivations that often makes it more challenging than it looks, so I thought I’d like to present this by weaving a more storytelling approach that, fingers crossed, still captures (with some rigor) the main ideas behind the topic. *** Let’s start by defining two completely independent random walks, generated as ARIMA(0,1,0) processes as where εt∼i.i.d.(0,σε2)\varepsilon_t \sim \text{i.i.d.}(0, \sigma_\varepsilon^2) and νt∼i.i.d.(0,σν2)\nu_t \sim…
-

Trees Can Predict?
Read more: Trees Can Predict?Most statistical models begin with some assumption about the world. In linear regression, we assume the relationship between inputs and output is a weighted sum, while in logistic regression, we assume the log-odds of a class is linear in the features. However, while they do give us interpretable coefficients and elegant closed-form solutions, they’re still assumptions. And reality often doesn’t cooperate. Decision trees take a different philosophical stance. Rather than imposing a functional form on the data, they ask a simpler question at every step: what is the best way to split this data into two groups such that each…