CNPS24_BASIS MEAN REVERSION — Strategy by PhaisinhOnline

By PhaisinhOnline

Performance Metrics

Description

CNPS24 BASIS MEAN REVERSION V3CNPS24 is a relative-value mean-reversion strategy designed around the price relationship between VN30 futures and the VN30 spot index.Unlike a conventional directional indicator strategy, the primary signal is derived from the futures-versus-spot basis.━━━━━━━━━━━━━━━━━━1. STRATEGY CONCEPT━━━━━━━━━━━━━━━━━━The strategy calculates:Futures Price−VN30 Spot Index=Intraday BasisThe basis is then standardized using its recent historical mean and volatility.This produces a Basis Z-Score.The strategy attempts to identify temporary extreme premiums or discounts and trade their normalization.━━━━━━━━━━━━━━━━━━2. REFERENCE MARKET━━━━━━━━━━━━━━━━━━Default Spot Reference:HOSE:VN30The futures price is taken from the active chart.The quality and availability of the reference symbol are therefore important to the model.━━━━━━━━━━━━━━━━━━3. BASIS MODEL━━━━━━━━━━━━━━━━━━Default parameters:Basis Mean / Z Window: 60 barsLong Basis Volatility Window: 180 barsThe shorter window estimates the current mean and Z-score.The longer window is used to evaluate the broader volatility regime of the basis.━━━━━━━━━━━━━━━━━━4. LONG SETUP━━━━━━━━━━━━━━━━━━A Long setup begins when futures trade at an unusually large discount relative to spot.Sequence:Basis Z = +Entry Z→ Extreme premium detected→ Short setup is armed→ Basis begins to hook downward→ Price confirmation appears→ SHORTThe concept is to trade normalization after futures become statistically expensive relative to the spot reference.━━━━━━━━━━━━━━━━━━6. EXTREME CONTROL━━━━━━━━━━━━━━━━━━The strategy limits how extreme the accepted entry condition can become.Default Maximum Acceptable Absolute Z:3.50This prevents the model from automatically treating every increasingly extreme spread as a better mean-reversion opportunity.A very large Z-score may instead indicate a regime change, data issue or persistent repricing.━━━━━━━━━━━━━━━━━━7. PRICE CONFIRMATION━━━━━━━━━━━━━━━━━━Basis normalization alone is not sufficient for entry.The strategy also evaluates price action.Default confirmation components include:EMA Length: 9Minimum Candle Body / Range: 40%Previous High / Low Break: ONEMA Confirmation: ONThis adds directional confirmation to the statistical basis signal.━━━━━━━━━━━━━━━━━━8. VOLATILITY REGIME FILTER━━━━━━━━━━━━━━━━━━CNPS24 includes a basis-volatility regime filter.Default:EnabledMaximum Short-Term / Long-Term Basis Volatility Ratio:1.80The strategy can therefore reject setups when short-term basis volatility becomes unusually unstable relative to its longer-term behavior.━━━━━━━━━━━━━━━━━━9. HARD RISK MANAGEMENT━━━━━━━━━━━━━━━━━━Default:Stop Loss: 6 pointsTake Profit: 12 pointsTheoretical fixed Risk/Reward:1:2Position Size:3 contractsPyramiding is disabled.━━━━━━━━━━━━━━━━━━10. STATISTICAL EXIT━━━━━━━━━━━━━━━━━━The strategy can exit before the fixed Take Profit when the basis has already returned close to its statistical mean.Default Mean-Reversion Exit:Absolute Basis Z <= 0.25However, the statistical exit is only allowed after the trade has reached a minimum open profit.Default Minimum Profit:2 pointsThis prevents the strategy from closing a position at the statistical mean while the directional trade is still unprofitable.━━━━━━━━━━━━━━━━━━11. OPTIONAL EMERGENCY CONTROLS━━━━━━━━━━━━━━━━━━The strategy includes an optional Z-score emergency stop.Default:OFFAn optional time stop is also available.These controls are not part of the default execution path but can be evaluated during research.━━━━━━━━━━━━━━━━━━12. TRADE CONTROL━━━━━━━━━━━━━━━━━━Default:Maximum Trades Per Day: 2Cooldown After Exit: 10 barsBreak-Even: Not usedThe strategy is intentionally cost-aware because spread signals on low timeframes can otherwise generate excessive turnover.━━━━━━━━━━━━━━━━━━13. SESSION MANAGEMENT━━━━━━━━━━━━━━━━━━Default timezone:Asia/Ho_Chi_MinhThe strategy uses separate morning and afternoon entry windows.The final entry time occurs before the end of the futures trading session.Open positions are force-closed according to the configured session-end rule.━━━━━━━━━━━━━━━━━━14. BACKTEST ASSUMPTIONS━━━━━━━━━━━━━━━━━━Initial Capital: 100,000,000Position Size: 3 contractsCommission: 10,000 VND per contractSlippage: 3 ticksPyramiding: 0━━━━━━━━━━━━━━━━━━15. IMPORTANT MODEL CONSIDERATIONS━━━━━━━━━━━━━━━━━━CNPS24 is fundamentally different from a standard trend-following system.Its edge depends on the relationship between two instruments.Backtesting should therefore pay particular attention to:• Spot reference availability• Data synchronization• Basis behavior across expiries• Intraday volatility• Entry Z threshold• Mean-reversion speed• Transaction costs• Structural changes in futures premium / discount━━━━━━━━━━━━━━━━━━DISCLAIMER━━━━━━━━━━━━━━━━━━This strategy is provided for educational, analytical and backtesting purposes only.It does not constitute financial advice or a recommendation to trade a relative-value position.Past statistical relationships may change and do not guarantee future convergence.Trading futures and leveraged financial instruments involves substantial risk. Users are responsible for all trading and risk-management decisions.

Browse all 5,900+ TradingView Pine Script strategies

View on TradingView