feat: NautilusTrader + VectorBT unified framework for Hyperliquid

Add complete framework for testing and deploying quant strategies:

Framework (framework/):
- HyperliquidInstrumentCatalog: loads perps as NT CryptoPerpetual
- HyperliquidDataProvider: real candle/orderbook/mark-price data
- HyperliquidExecutionProvider: live + PaperExecutionProvider: simulated
- BaseHlStrategy: shared NT strategy lifecycle with signal library
- StrategyConfig: YAML-based parameter management
- DeployOrchestrator: CLI for backtest -> paper -> live pipeline

Backtesting (backtests/):
- VBTBacktestRunner: VectorBT vectorized backtests on real HL candles
- NTBacktestRunner: NautilusTrader event-driven backtest engine

NT Strategy ports (strategies/nt/):
- PairsTradingNT: BTC/ETH ratio Z-score mean reversion
- HurstVPINNT: Hurst exponent regime + VPIN flow imbalance
- ASMarketMakingNT: Avellaneda-Stoikov stochastic control MM

E2E verified: real HL candles fetch, VectorBT backtest (Sharpe 5.2
on Hurst/VPIN), instrument catalog, deploy CLI --list, strategy signals.
Existing live/node.py and paper_trader.py unchanged.
This commit is contained in:
ramseshk
2026-08-06 17:23:49 +08:00
parent 08a95e8fe2
commit f5ffe4baee
16 changed files with 22419 additions and 20 deletions
+27
View File
@@ -0,0 +1,27 @@
"""
FTDT Quant Lab — NautilusTrader + VectorBT Framework.
Unified pipeline: Hyperliquid data → VectorBT fast backtest →
NautilusTrader event-driven backtest → paper trading → live deployment.
Core components:
- data: HyperliquidDataProvider (historical + streaming)
- instruments: HyperliquidInstrumentCatalog (CryptoPerpetual loader)
- execution: HyperliquidExecutionProvider (live + paper)
- base_strategy: BaseHlStrategy (shared NT lifecycle)
- config: StrategyConfig (YAML parameter management)
- deploy: DeployOrchestrator (backtest → paper → live CLI)
"""
from framework.instruments import HyperliquidInstrumentCatalog
from framework.data import HyperliquidDataProvider
from framework.base_strategy import BaseHlStrategy, StrategyConfig
from framework.deploy import DeployOrchestrator
__all__ = [
"HyperliquidInstrumentCatalog",
"HyperliquidDataProvider",
"BaseHlStrategy",
"StrategyConfig",
"DeployOrchestrator",
]