11.7

MBS Trading

PYTHON PLUGIN Structured Relative Value

Description

Strategy 11.7: Buy MBS passthroughs when OAS is above historical average, duration-hedge with swaps

Strategy Logic

Strategy 11.7: MBS Passthrough Trading. Buy mortgage-backed security passthroughs and duration-hedge with interest-rate swaps. The main risk is prepayment risk which affects the effective duration. Hedge ratio estimated from dP/dR -- the price sensitivity of the MBS to the swap rate. Signal: BUY when the option-adjusted spread (OAS) is above its rolling historical average, indicating the MBS is cheap relative to the swap curve. Required columns: oas (option-adjusted spread). Falls back to close-based mean-reversion if OAS is unavailable.

Parameters

Parameter Default Value Type
lookback 120 int
entry_z 1.0 float
exit_z 0.0 float

Risk Configuration

Risk Parameter Value
Max Position Pct 8.0%
Stop Loss Pct 5.0%
Take Profit Pct 8.0%
Max Drawdown Pct 12.0%