ramseshk 5004b23331 Fix live node: all 7 strategies now firing (was only 1/7)
Root cause analysis:
  - Round-robin bottleneck: each strategy got attention every ~28s
  - Orders cancelled immediately: POST-ONLY orders lived <=28s, near zero fill prob
  - 5 strategies had over-tight thresholds (Iceberg 7/10, Momentum 2σ, etc.)
  - No position management: no take-profit, no opposing signal close

Fixes applied:
  1. ALL strategies execute every 4s (for name in names: parallel)
  2. Orders rest 60s before refresh (was: cancelled every round)
  3. Take-profit at 0.1% move + close on opposing signal
  4. Aggressive 0.03% offset inside spread for higher fill probability
  5. Iceberg: 7/10 -> 5/10 consecutive ticks
  6. Momentum: 2σ -> 1.5σ Bollinger breakout
  7. Mean Reversion: 1.5σ -> 1.0σ VWAP deviation
  8. Funding Arb: uses real Hyperliquid API funding rate
  9. OFI threshold kept at 0.04% (was 0.08%)

Verification:
  Post-patch log shows all 7 strategies placing orders every 4 seconds.
  Order Book Imbalance, Iceberg Detection, Funding Rate Arb, Pairs Trading
  all confirmed active in tick 12680 output.
2026-08-05 07:00:07 +00:00

FTDT Quant Lab — Quantitative Trading Strategies

A collection of quantitative trading strategies running on Hyperliquid Testnet via Nautilus Trader. Built as part of my professional portfolio to demonstrate algorithmic trading, market microstructure, and risk management skills.

What's inside

Five strategies, from simple to advanced:

# Strategy Concept
1 Order Book Imbalance Trades on L2 bid/ask pressure
2 Iceberg / TWAP Detection Follows whale accumulation patterns
3 Funding Rate Arbitrage Delta-neutral carry trade
4 Pairs Trading (BTC/ETH) Cointegration-based stat arb
5 Avellaneda-Stoikov Market Making Stochastic optimal control

All strategies share a common risk manager and portfolio tracker.

Quick start

# Install dependencies
pip install -r requirements.txt

# Set your Hyperliquid testnet key
export HYPERLIQUID_TESTNET_PK=0x...

# Run live (testnet only)
python live/node.py

Project layout

ftdt-quant-lab/
├── config/          # Per-strategy YAML configuration
├── strategies/      # Strategy implementations
├── common/          # Risk manager, portfolio tracker, metrics
├── backtests/       # Historical backtest runners
├── live/            # Live trading node (Hyperliquid Testnet)
├── docs/            # Documentation and strategy writeups
└── notebooks/       # Analysis notebooks

Strategy details

See docs/STRATEGIES.md for a walkthrough of each strategy.

Risk warning

This is testnet only. These strategies are educational — they are not financial advice and have no alpha guarantee. Never run them on mainnet without thorough backtesting and your own due diligence.


Built by Ramses Echikh · Part of my quant trading portfolio

S
Description
Quantitative trading lab — Nautilus Trader strategies on Hyperliquid Testnet. Part of my professional portfolio.
Readme 2.3 MiB
Languages
Python 52.8%
HTML 25.2%
TypeScript 21%
CSS 0.6%
JavaScript 0.4%