Skip to content

[Correlation Testing] Half Life Estimation #43

Open

Description

@emmaashi

Even if a spread is stationary, it might revert so slowly that it's impractical to trade, i.e. spread with a half-life of 200 days ties up capital for months. There's currently no way to quantify reversion speed.

Implement: A function calculate_half_life(spread) in analysis/spread.py that fits an OLS regression of spread_change ~ spread_lagged (the Ornstein-Uhlenbeck model) and derives the half-life as -log(2) / beta. The result should be added to the metrics dict from calculate_spread_metrics().

Why: Half-life is the primary metric for ranking pairs by tradeability. Short half-life (5-30 days) = actionable. Long half-life (100+ days) = skip. This lets the analysis produce a ranked list of the best pairs rather than treating all 14 equally.

Activity

  1. changed the title [-][Correlation Testing][/-] [+][Correlation Testing] Half Life Estimation[/+] on Mar 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions