Sophos Alpha

Quant finance articles

Coming soon

Knowledge and education should be open to everyone. The articles explain the ideas the market runs on, one topic at a time, for traders and investors who want the math behind them.

We are building an open library of articles on quantitative finance, a reference that anyone can read, cite and use. Its scope follows the standard textbooks, from forwards, swaps and binomial trees to Black-Scholes-Merton, the Greeks, volatility smiles and Value-at-Risk. Every formula is written out in full in LaTeX; many articles will add the R and Python code and the charts it draws, and some will be pure mathematics. Four of the subjects, each with two examples, are below.

Subscribe to get notified when Articles are live

Volatility and options

Volatility is the size of the moves a price makes, and there are two ways to see it. Realized volatility is measured from the moves that have already happened, as the standard deviation of daily returns scaled to a year. Implied volatility is read from option prices: it is the volatility that makes the pricing model return the price the market is paying.

The articles start from the lognormal model of stock prices behind Black, Scholes and Merton, then explain why implied volatility forms a smile across strikes and a term structure across expiries. Delta, gamma, theta and vega each get their own article. Gamma also has a market-wide reading: summed across every option dealers are estimated to hold, it says whether their hedging dampens moves or amplifies them.

Volatility also clusters: calm days follow calm days and large moves follow large moves. GARCH models describe that pattern and forecast it, and the articles fit them to index data step by step.

Scatter of next-day S&P 500 returns against dealer gamma: wide when gamma is negative, tight when positivedealer gammanext-day return
Dealer gamma: the S&P 500's next-day move against estimated dealer gamma. Short gamma on the left, wide. Long gamma on the right, tight.
GEX=Γ·OI·100callsGEX=Γ·OI·(−100)puts
Two stacked panels: daily standardized residuals scattered around zero above, and the annualized conditional volatility below, spiking in turbulent stretches and decaying afterresidualsvolatilitytime
GARCH(1,1): the S&P 500's daily returns fitted with a GARCH(1,1) model. Above, the standardized residuals; below, the annualized conditional volatility, which spikes when large moves cluster and decays back after.
σn2=ω+αun−12+βσn−12

Portfolio construction

A portfolio is a set of weights, and every way of choosing them trades return against risk and against how far the answer can be trusted. The articles start from the basics: portfolio return and volatility, correlation, the Sharpe ratio, and what diversification does to the risk of the whole.

From there, mean-variance optimisation and the efficient frontier: the portfolios that give the most return for each level of risk, how they are found with quadratic programming, and what changes when short selling is allowed. Then the methods built for uncertain inputs: equal weights, risk parity, hierarchical risk parity, and resampling, which shows how far an optimal portfolio moves when its inputs move a little.

The last articles cover upkeep: how often to rebalance, how much drift to allow before trading, and what costs do to each of those choices.

A cloud of random portfolios shaded darker as the Sharpe ratio rises, bounded on the left by a dashed frontier, with four stocks markedMELIMETAMSFTTSLAvolatilityexpected return
Efficient frontier: a hundred thousand random portfolios of four stocks, a sample drawn here, shaded darker as the Sharpe ratio rises. The dashed line is the lowest volatility any long-only mix can reach at each return; its upper half is the efficient frontier.
minωTΣωs.t.ωT𝟏=1,ω≥0,ωTμ=μp
Two efficient frontiers: the one that allows short selling lies to the left of the one that does notlong-onlyshort selling allowedportfolio riskportfolio return
Short selling: efficient frontiers of four ETFs from five years of monthly returns, with and without short selling. Removing the constraint can never move the frontier right; here it moves it left at every return, the same return for less risk.
min(−d⊺b+0.5b⊺Db)subject toA⊺b≥b0

Machine learning

Machine learning fits models to data rather than writing the rules by hand. The articles build it up from the smallest piece, a single perceptron that weighs its inputs and passes the sum through an activation, and gradient descent, the method that trains its weights, to networks with hidden layers trained on factor data.

From there, tree ensembles such as random forests and gradient boosting, forecasting a time series by recasting it as a regression problem, and the deep learning architectures built for sequences. Probabilistic forecasting gets its own series: models that return a range of outcomes with their likelihoods instead of a single number, and Bayesian methods that update as new data arrives.

Each model is tested on data it was not trained on, with walk-forward splits where the order of time matters, and with the metrics that show whether a forecast beats a simple baseline.

A bowl-shaped loss surface in three dimensions, with a path running down its side from a starting point to the optimal point at the bottomstarting pointoptimal pointabloss
Gradient descent: the loss surface (a − 8)² + (b − 2)² and the path from the starting point to the optimal point. Each step is the learning rate times the gradient, taken against it, so the steps shrink as the slope flattens.
∇f(a,b)=[dfdadfdb]=[2(a−8)2(b−2)]θ=θ−η×Δf(a,b)
An hourly series with a daily cycle, then a forecast period where a dashed median and two shaded prediction bands follow the dotted actual valuestrainingactualforecast80 and 90% intervalstimestamptarget
Quantile regression: an hourly series from the M4 forecasting competition, then 48 hours forecast by LightGBM models trained on the quantile loss, one per quantile. Each hour is predicted from the actual hours before it; the shading is the 80 and 90 percent intervals.
Lq(yt,y^tq)={(yt−y^tq)×q,ifyt≥y^tq(y^tq−yt)×(1−q),ifyt<y^tq}

Statistics and econometrics

The statistics under every other subject. The articles start with returns: simple and log, daily to monthly, cumulated over time, and the distributions they follow, including the fat tails and volatility clustering that set market data apart from the textbook normal.

Then the measures and models built on them: Value-at-Risk and expected shortfall, the CAPM and the market model estimated by regression, the Fama and French factor models, rolling betas, and the tests for heteroskedasticity, autocorrelation and stationarity that decide whether a regression can be trusted. Time series models follow, from exponential smoothing to ARIMA.

Monte Carlo simulation closes the subject: geometric Brownian motion to simulate price paths, and the same engine used to price options and estimate risk.

A peaked density of daily portfolio profit and loss over a wider normal curve, with vertical lines at the 1% and 5% one-day Value-at-Risk on the loss side1% VaR5% VaRprofit and lossdensity
Historical Value-at-Risk: five years of daily returns applied to a three-stock portfolio's holdings at the end of the sample. The solid curve is the density of the simulated profit and loss, the dashed curve a normal one with the same mean and spread; the lines mark the 1% and 5% one-day VaR.
πt=VAMZNRtAMZN+VGOOGRtGOOG+VAAPLRtAAPL
A hundred simulated price paths fanning out from one starting price, their average as a bold line, and the actual price as a second linetimeprice
Monte Carlo simulation: a hundred price paths for IBM over one month, simulated with geometric Brownian motion from the last price, using the mean and volatility of the year before. The bold line is their average; the other solid line is the price that followed.
dSS=μdt+σdz

Who it is for

Quant enthusiasts
Every method written out: the formula, the R and Python code, and the chart the code draws, so a result can be run again rather than taken on trust.
Portfolio managers
A clear reference on the methods behind portfolio and risk decisions: what each one assumes, what it measures and where it breaks down.
Institutional investors
Plain explanations of the measures in risk reports and research notes, from volatility and Value-at-Risk to factor exposures and dealer gamma.
Anyone learning about risk
How risk is measured, from the first definition to working code, for readers who want to understand the numbers rather than repeat them.

The articles will be published here as they are finished. Until then the weekly research and the notes go out on Substack.

Subscribe on Substack