Quant / Research / Software · Completed study
Kalman Pairs Research
Kalman hedge-ratio estimation and historical evaluation for two ETF pairs.
- My role
- Independent researcher and developer
- Period
- 2026 · historical study
- Source
- Private implementation · public overview
The question
What changes when a hedge ratio is estimated as observations arrive rather than held fixed?
Python · NumPy · pandas · Kalman filtering · Historical evaluationMy contribution
Implemented the adaptive estimator, position accounting, historical selection procedure, and numerical checks.
01 / problem
Adaptive hedge-ratio estimation
A hedge ratio compresses a relationship between assets into a number, but that relationship can change. This study uses an online Kalman filter to track a hedge ratio and intercept as new daily observations arrive.
I connected the estimator to a complete historical evaluation because a sensible filter can still sit inside an unrealistic backtest. The work makes the joins between observation, estimate, position, and return accounting explicit.
02 / architecture
Architecture
- An online state update produces a changing hedge ratio, intercept, and forecast-error information.
- A position state machine turns the estimator's output into entry, exit, and hold behavior.
- Gross-normalized dynamic hedge weights feed return and turnover-cost accounting.
- The coded study compares GDX/GLD and EWA/EWC, selecting parameters and a pair on 2011–2018 before reporting the saved setup on 2019–2025.
03 / decisions
Information timing and selection
An estimator is causal here if its result at a date uses only observations available through that date. That is an information-flow property, not a claim that one asset economically causes the other.
The later evaluation window is separated from the coded parameter-selection step. However, the earlier history of assembling the candidate-pair list was not recorded. The split cannot establish independence from every earlier research decision.
04 / evaluation
Testing
The estimator tests include recovery of known coefficients and a truncation comparison: estimates before a stopping point should agree whether later observations are present or absent. Separate tests cover the position state machine, burn-in behavior, return accounting, and turnover costs.
Those checks give evidence about implementation behavior. They do not establish an executable strategy, a persistent edge, or the validity of every selection and execution assumption around the calculation.
05 / limitations
Execution assumptions and limitations
- The setup assumes a signal formed using a closing price can execute at that same close. Lagging positions for the next return does not resolve that optimistic assumption.
- Two pairs and one historical split provide limited evidence; the prior candidate-selection history is unknown.
- Daily-price accounting leaves intraday execution, borrowing, financing, and capacity largely outside the experiment.
- Dynamic hedge weights do not establish dollar neutrality, factor neutrality, or a market-neutral portfolio.
06 / next
Next steps
A stronger study would record the candidate-selection history, define an executable decision and fill timeline, and evaluate more pairs and periods under that frozen procedure. Those are follow-up requirements, rather than claims about the completed study.
Private implementation
Source code and research data are private. This case study is the public overview.
Public overview reviewed 8 September 2026.