Skip to content
GetProfitable
Search
Dictionary

Residuals

What the model failed to explain: actual minus predicted. In pairs trading the residual is the thing you actually trade.

Inspecting residuals is how you find out whether a model is wrong in a structured way. If they fan out as the input grows you have heteroskedasticity. If today's residual predicts tomorrow's you have autocorrelation and are leaving information on the table. If they cluster around events you are missing a variable.

In a pairs trade, you regress A on B, take the residual series as the spread, and trade its z-score. The whole strategy is the bet that the residual is stationary and will return toward zero.

Practical check: plot residuals against time and against fitted values before believing any regression output. Ten seconds of looking catches errors that summary statistics hide.

Related: ols-regression, heteroskedasticity, spread, cointegration

See it drawn

Original diagrams for the ideas on this page. Illustrative, not real market data.

Bid-ask spread in an order bookSell orders stacked above buy orders with a gap between the best of each.SELLERS (asks)50.0690050.051,40050.0460050.011,10050.002,30049.99800spread = 0.03BUYERS (bids)
The bid-ask spread. Buy orders sit below, sell orders above, and the gap between the best bid (50.01) and best ask (50.04) is the spread you pay to cross. Bar length shows the size resting at each price.

Educational only, not advice. Spotted an error? Post in Site Feedback.