OPEN-SOURCE SCRIPT
업데이트됨 iFCPO Soyoil Spread

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.
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.
릴리즈 노트
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.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.