Pair & Hedge Calculator
Measure the statistical relationship between two names — correlation, betas, hedge ratio and spread z-score — and size a beta-neutral pair to your own risk.
Unlocked by: Professional Trading Masterclass — Stocks tools
you entercalculated
Included with the PTM course
Enrol through this site and this unlocks when your referral is verified.
Save 30% with code ptmrich30pct — enrol at itpm.com through this link.
Already enrolled through this site? Sign in
Worked example — the numbers below are illustrative.
Example data — an illustrative KO/PEP pair, not a live read. Run your own tickers to replace it.
KO vs PEP
250 overlapping sessions · daily EOD data0.71
0.83
0.42
1.34
0.55
0.61
The spread is 1.34 standard deviations above its own mean (mild).
Spread
ln(KO) − 0.42·ln(PEP)Beta-neutral position size
235 sh
≈ 14,706 notional · @ 62.40
36 sh
≈ 6,176 notional · @ 168.90
500
499
0.42
These are share counts that keep the pair beta-neutral at your risk and sigma stop — a statistical relationship, not a recommendation. Whether the pair makes fundamental sense, and which leg to be long or short, is your judgement (that's what the course teaches).
Measure the statistical relationship between two US-listed names — correlation, each leg’s market beta, the hedge ratio and the spread z-score — and size a beta-neutral pair to your own risk.
Steps
- 1
Enter two US-listed tickers (leg A and leg B) and set how much you are willing to risk — a % of your book, or a direct £/$ amount, your choice, nothing defaults.
- 2
Set your stop as a number of spread standard deviations (sigma) — how far the spread can move against you before you are out. Two sigma is a common starting point.
- 3
Read the relationship: correlation of daily returns, each leg’s beta versus the market (SPY), the OLS hedge ratio, and where today’s spread sits on the z-score chart.
- 4
Read the sizing block: the whole-share counts for each leg that keep the pair beta-neutral at your chosen risk and stop.
- 5
Remember what this is: a statistical relationship, not a recommendation. Whether the pair makes fundamental sense — and whether to trade it at all — is your judgement, which is what the course develops.
What the numbers mean
- correlation
What: The Pearson correlation of the two legs’ DAILY RETURNS over the lookback window (−1 to +1).
How to read it: Near +1 = the two names tend to move together day to day, the usual prerequisite for a pairs relationship.
What it is not: It measures co-movement, not cointegration or a stable spread — high correlation alone does not make a tradable pair, and it is not a signal.
- betaAB
What: The return beta of leg A on leg B — how much leg A moves, on average, for a 1-unit move in leg B.
How to read it: A sensitivity of the two names to each other, estimated by OLS on daily returns.
What it is not: It is a historical average, not a fixed ratio and not advice on how to weight the legs.
- betaVsBenchmark
What: Each leg’s beta to the market (SPY) on daily returns — its market sensitivity.
How to read it: Compare the two legs’ betas: similar betas mean the pair already nets out much of the market move.
What it is not: It is estimated from past daily returns and will drift; it is not a guarantee the pair is market-neutral.
- hedgeRatio
What: The OLS hedge ratio h from the log-price regression ln(A) = α + h·ln(B). The spread is ln(A) − h·ln(B).
How to read it: It sets the notional ratio between the two legs so the spread is beta-neutral by construction — the sizing block uses it to split your risk.
What it is not: It is fitted on the whole lookback and assumes the relationship is stable; it is not a forecast and not a claim the spread will revert.
- spreadZScore
What: How many standard deviations today’s spread sits from its own mean over the lookback window.
How to read it: Large positive or negative values mean the spread is historically stretched; near zero means it is around its average.
What it is not: It is a description of the past distribution, NOT a signal to fade or chase — a stretched spread can stretch further, and mean reversion is not guaranteed.
- spreadChart
What: The spread series ln(A) − h·ln(B) over the lookback window, with the current value highlighted.
How to read it: Read how far and how often the spread has wandered from its mean — the shape tells you whether a relationship even looks stable.
What it is not: A tidy-looking mean-reverting chart is historical; it is not evidence the pattern will hold.
- stopSigma
What: Your stop distance expressed in spread standard deviations — how far the spread can move against you before the trade is closed.
How to read it: It converts your risk amount into share counts: a wider sigma stop means a smaller position for the same risk.
What it is not: It is the stop you have chosen, not a suggested level.
- sharesA
What: The whole number of shares of leg A that puts your chosen risk on the pair at your sigma stop.
How to read it: Paired with the leg-B share count via the hedge ratio, this keeps the position beta-neutral.
What it is not: It is a position size, not advice to put the trade on, and not a view on direction — that is your call.
- sharesB
What: The whole number of shares of leg B that hedges leg A at the OLS hedge ratio.
How to read it: Leg B’s notional = hedge ratio × leg A’s notional, converted to shares at leg B’s price and floored.
What it is not: It is a hedge quantity from historical statistics, not a recommendation.
- notionalA
What: The £/$ notional the sizing places on leg A before rounding to whole shares.
How to read it: Derived from your risk amount, your sigma stop and the spread’s standard deviation.
What it is not: It is not the amount at risk — the amount at risk is your chosen risk figure, shown separately.
- notionalB
What: The £/$ notional on leg B: the hedge ratio times leg A’s notional.
How to read it: This is what makes the two legs beta-neutral against each other.
What it is not: It is a hedge notional, not a second independent bet.
- riskAmount
What: The £/$ you decided to risk on the pair, however you set it (a % of book or a direct amount).
How to read it: Every share count here is built so a sigma-stop move loses no more than this.
What it is not: It is not a target and not a recommended risk level — that limit is yours to set.
- riskAtRoundedSize
What: The loss a full sigma-stop move implies once the share counts are floored to whole shares — always at or below your risk amount.
How to read it: The small gap versus your risk amount is the “left on the table” from rounding down, on purpose.
What it is not: It is an estimate from the spread’s historical volatility, not a guaranteed maximum loss (gaps and slippage are real).