Pairs Trading for a portfolio rebalance
Built for students learning it for a class or exam. See the concept move instead of memorizing formulas — and check your homework intuition. Simulate a portfolio rebalance live below — adjust the inputs and watch it respond, right in your browser.
Controls
Presets
Ordinary least squares finds the line that minimizes the sum of squared vertical residuals (the gray drop-lines). R² measures the fraction of variance the line explains — 1 is perfect, 0 is useless. Add noise or remove points to watch the fit and R² degrade.
Data Inspector
Governing equation
Runs locally in your browser — free forever. Scale to the cloud when reality gets heavy.
Controls
Presets
Geometric Brownian motion models a price with constant drift and random volatility — the assumption behind Black-Scholes. Running hundreds of simulated paths reveals the full distribution of outcomes, not just an average. Educational tool, not investment advice.
Data Inspector
Governing equation
Runs locally in your browser — free forever. Scale to the cloud when reality gets heavy.
More with Pairs Trading
Frequently asked questions
- Is this good for students?
- Yes — this version of "Pairs Trading for a portfolio rebalance" is framed for students learning it for a class or exam. See the concept move instead of memorizing formulas — and check your homework intuition.
- Do I need to install anything?
- No. It runs in any modern browser, free, with no account required.