HFTCODE.COM
10-Year Treasury Curve Steepener Bot (ZNU6) – Free Python Quant Trading Strategy Source Code
10-Year Treasury Curve Steepener Bot (ZNU6) – Free Python Quant Trading Strategy Source Code
Couldn't load pickup availability
Download the complete, production-grade Python source code for an institutional 10-Year Treasury Curve Steepener trading bot. Built for CBOT 10-Year Treasury Note Futures (ZNU6), this broker-agnostic algorithmic framework is engineered with zero proprietary dependencies—ready to inspect, backtest, and adapt.
⚡ Instant 100% Free Download Includes:
-
Complete Python Source Code:
bot_zn_steepener (2)_portable.py - Broker-Agnostic Plumbing: Ready for paper trading, interactive brokers, or any standard OHLCV data feed.
- Institutional Risk Controls: Dynamic circuit breakers, ATR-based trailing stops, and volatility-regime filters.
-
Pure Standard Library: Runs cleanly on Python 3.10+ (
asyncio,logging,typing).
Strategy Overview
Most retail traders spend months trying to code a systematic strategy from scratch, only to get trapped by curve-fitting or broken API dependencies.
This package provides the complete blueprint for an Institutional 2s10s Steepener Flow Follower. The bot operates on 60-second bar intervals, tracking momentum and breakout dynamics on front-month 10-Year Treasury Futures (ZNU6) while enforcing disciplined ATR volatility scaling and strict capital-preservation rules.
Estimated Strategy Metrics (ZN Benchmark)
Figures represent the median benchmark across 12 institutional ZN backtests (individual configuration estimated):
| Metric | Benchmark Value (Est.) |
|---|---|
| Target Instrument | ZNU6 Futures (CBOT Front-Month) |
| Trade Direction | LONG / SHORT |
| Sharpe Ratio | 1.329 |
| Sortino Ratio | 6.602 |
| Profit Factor | 2.45 |
| Max Drawdown | 0.76% |
| Strategy Grade | Grade A |
Under the Hood: Institutional Quant Architecture
1. Signal & Indicator Engine
- Trend & Momentum: Dual EMA/SMA crossovers paired with RSI and MACD confirmation.
- Breakout Detection: Donchian channel tracking for expansion phases.
- Regime Filter: Realized-volatility and VIX scaling to pause execution in adverse spread conditions.
2. Position Sizing & Trade Management
- Dynamic Sizing: Inverse-volatility (ATR) contract sizing (up to 5 contracts max).
- Scaled Profit-Taking: Tiered R-multiple profit distribution.
- Disciplined Exits: Ratcheting trailing stops, hard invalidation exits, and max-holding-period time stops.
3. Defense & Circuit Breakers
- Consecutive-loss cutoffs & daily/weekly maximum drawdown locks.
- Stale data feed watchdog & CBOT maintenance window protection.
- Full async event telemetry emitting clean JSON audit logs for all orders and fills.
Technical Requirements
- Language: Python 3.10 or newer
-
Dependencies: Zero third-party proprietary libraries required (Built on
asyncio,logging,typing) - Input Data: Any standard 1-minute OHLCV bar stream (CSV, REST, or WebSocket)
- Broker Interface: Decoupled adapter layer—easily routes to paper simulation, Interactive Brokers, Tradovate, NinjaTrader, or proprietary endpoints.
Frequently Asked Questions
Q: Why is this source code free?
A: This codebase is distributed under an open educational quant initiative to provide clean, readable architectural references for algorithmic traders and Python developers.
Q: Does this bot require an expensive data vendor or Redis server?
A: No. All proprietary Rithmic/Redis infrastructure code has been converted into simple, clearly commented execution stubs so you can plug in any data feed or paper engine you prefer.
Q: Can I modify this for other instruments (e.g., ES, NQ, UB)?
A: Yes. Simply update the SYMBOL constant and recalibrate the tick value and ATR parameters in the configuration block.
Detailed breakdown: Inside a Treasury Futures Trading Strategy
This software is provided for EDUCATIONAL AND RESEARCH PURPOSES ONLY and does NOT constitute financial, investment, or trading advice. Futures trading involves substantial risk of loss and is not suitable for all investors. Backtested or estimated past performance is no guarantee of future results. Never trade live capital without thoroughly paper-trading and consulting a licensed financial professional.