ramseshk 8855c013a6 3D Order Book Depth Map: Plotly.js + Three.js live visualization
Architecture:
- depth-map-utils.ts: L2RingBuffer, l2SnapshotsToSurface, computeImbalance
  └─ O(1) ring buffer, 60-snapshot capacity
  └─ Surface matrix: ±50 bps × 100 resolution
  └─ Imbalance formula: I = (V_b-V_a)/(V_b+V_a) with wall detection

- depth-map-plotly.tsx: Plotly.js 3D Surface
  └─ 7-stop warm colorscale (dark→amber→gold)
  └─ contour projection, ambient+diffuse lighting
  └─ Live imbalance overlay: gauge bar + formula
  └─ uirevision for stable camera on updates

- depth-map-three.tsx: Three.js high-perf alternative
  └─ BufferGeometry + vertex colors + OrbitControls
  └─ 60fps suitable, WebGL renderer with alpha
  └─ Warm gradient matching Plotly colorscale
  └─ Double-sided faces, dark grid helper

- obi-detail.tsx: Combined strategy detail panel
  └─ Engine toggle: Plotly.js ↔ Three.js
  └─ Synthetic data generation for testing
  └─ 6-stat metrics row (PnL, BTC B&H, Sharpe, Hit Rate, Max DD, Signal)
  └─ Equity curve comparison + trade history table

- Page integration: OBI strategy triggers dedicated 3D view
2026-08-05 06:11:33 +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 51.5%
HTML 24%
TypeScript 23.5%
CSS 0.6%
JavaScript 0.4%