← BoonWui portfolioPython version

Disclaimer: Data may be delayed, incomplete or inaccurate. For education and research only. Use at your own risk. Not financial advice.

Calendar Spread Analyser

Paste two contract months and see whether their spread mean-reverts. The spread is fitted as an Ornstein–Uhlenbeck process on a rolling window. You get its fair level, half-life and z-score signals, plus a simple backtest.

Model

The example data is simulated, not real market prices. Spread = near − far. Value per point is RM25 for one FCPO spread lot.

Signal today
–
Spread now
–
Fair level (θ)
–
Z-score
–
Half-life
–
Backtest P&L
–
Trades · win rate
–

Spread and its fair level

SpreadFair level θ±entry band

Z-score

Backtest equity, RM

Short the spread when z is above the entry level, long when below; exit when z returns inside the exit level. Trades only when the half-life is under the maximum.

Research tool. Backtests ignore slippage and roll timing and can overfit. Not trading advice.