OPEN-SOURCE SCRIPT
Aggiornato

iFCPO Soyoil Spread

277
iFCPO Soyoil Spread — z-score divergence between FCPO (Bursa Crude Palm Oil Futures) and CBOT soybean oil (ZL/BO).

WHY IT MATTERS
FCPO and soybean oil are 0.85+ correlated long-run (substitute oils in the global vegetable-oil complex). When the FCPO/BO ratio z-score blows out beyond ±2σ over a 50-day lookback, FCPO is statistically rich or cheap vs the global benchmark. Mean-reversion bias kicks in.

HOW TO USE
- z > +2: FCPO over-extended vs BO — bias short / fade longs
- z < −2: FCPO cheap vs BO — bias long / fade shorts
- |z| < 1: ignore — pairs are tracking normally
- 1 < |z| < 2: stretched, watch for reversal

This is a CONTEXT layer — it modifies conviction. NEVER trade z alone. Pair with iFCPO Wick Hunter (entries) + iFCPO Regime Meter (regime) + iFCPO Session Law (timing).

KPIs
- Lookback: 50 daily bars (configurable)
- Extreme threshold: ±2σ (configurable)
- Symbol: CBOT:ZL1! (TradingView's continuous front-month soybean oil)

OUTPUTS
Dimensionless ratio z (FCPO close / BO close), mean / ±1σ / ±2σ hlines, color-graded line (red rich / green cheap / amber stretched), tinted background at extremes, full status table top-right (FCPO, BO, z, state, pair-with).

Open-source. Part of the iFCPO free hero stack.
Note di rilascio
v2.0 Polish — Two upgrades:

1. CRITICAL math fix: Replaced raw FCPO/BO ratio z-score with log-ratio z-score `z(log(FCPO/BO))`. Previous version mixed RM/MT (FCPO) with USD¢/lb (BO) — the resulting ratio drift was dominated by USDMYR + unit-scale, not palm/soy economics. Log-ratio is dimensionally consistent and the z-score now measures relative dislocation around the rolling mean (not arbitrary scale).

2. Repaint fix: Both daily series (BO and FCPO) now pull `close[1]` inside request.security() — locked to confirmed daily bar. Previous version used today's still-forming close which made the z-score noisy intraday.

Header reframed: explicit "STATISTICAL stretch only" disclaimer added — cross-currency arb is imperfect, so read this as a conviction modifier, never an entry.

Ecosystem updates: "Pair with" expanded to include myr-context.

Part of the v3.0 free-tier polish wave.

Declinazione di responsabilità

Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.