Initial project scaffold: five quant strategies for Hyperliquid Testnet
Set up the directory structure and wrote placeholder logic for: - Order Book Imbalance: trades on L2 bid/ask skew - Iceberg/TWAP detection: follows whale accumulation patterns - Funding rate arbitrage: delta-neutral carry on perp funding - Pairs trading: BTC/ETH spread mean reversion - Avellaneda-Stoikov market making: optimal bid/ask quoting Also added shared risk manager, portfolio tracker, and a plain-language strategy walkthrough in docs/.
This commit is contained in:
@@ -0,0 +1,101 @@
|
||||
# FTDT Quant Lab - Strategy Walkthrough
|
||||
|
||||
A plain-language explanation of each strategy: what it does,
|
||||
why it works (or might work), and what to watch out for.
|
||||
|
||||
---
|
||||
|
||||
## 1. Order Book Imbalance
|
||||
|
||||
**What it does:**
|
||||
Watches the order book in real time. If there are way more
|
||||
buy orders than sell orders stacked up, it buys. If the
|
||||
opposite, it sells.
|
||||
|
||||
**Why it might work:**
|
||||
When one side of the book is heavy, market orders eat into
|
||||
that side and push the price toward the thinner side. You're
|
||||
basically front-running that move.
|
||||
|
||||
**Risks:**
|
||||
- Fake walls — someone puts up a huge order to bait you,
|
||||
then cancels it.
|
||||
- Low signal quality in ranging markets.
|
||||
|
||||
---
|
||||
|
||||
## 2. Iceberg / TWAP Detection
|
||||
|
||||
**What it does:**
|
||||
Looks for big traders slicing their orders into small pieces.
|
||||
When it spots the pattern, it trades in the same direction.
|
||||
|
||||
**Why it might work:**
|
||||
If someone is accumulating a lot of BTC slowly, they probably
|
||||
know something (or at least their buying pressure will move
|
||||
the price). You're piggybacking their flow.
|
||||
|
||||
**Risks:**
|
||||
- False positives — random noise looks like a pattern.
|
||||
- The whale could be wrong. You're copying someone who
|
||||
might lose money.
|
||||
|
||||
---
|
||||
|
||||
## 3. Funding Rate Arbitrage
|
||||
|
||||
**What it does:**
|
||||
Hyperliquid charges a funding rate every 8 hours. When it's
|
||||
positive, people who are long pay people who are short.
|
||||
This strategy goes long spot (no funding) and short perp
|
||||
(collects funding), staying delta-neutral the whole time.
|
||||
|
||||
**Why it works:**
|
||||
It doesn't bet on direction — it bets on the funding
|
||||
mechanism itself. You earn the rate regardless of whether
|
||||
BTC goes up or down.
|
||||
|
||||
**Risks:**
|
||||
- Funding rate can flip (you'd have to close and reopen
|
||||
the other way).
|
||||
- Execution risk — if one leg fails, you're no longer
|
||||
delta-neutral.
|
||||
|
||||
---
|
||||
|
||||
## 4. Pairs Trading (BTC/ETH)
|
||||
|
||||
**What it does:**
|
||||
Tracks the price ratio between BTC and ETH. When the spread
|
||||
gets unusually wide, it bets it will narrow. Short the
|
||||
expensive one, long the cheap one.
|
||||
|
||||
**Why it might work:**
|
||||
BTC and ETH tend to move together over time. Big moves apart
|
||||
from each other often snap back. This trades the snap-back.
|
||||
|
||||
**Risks:**
|
||||
- Regime change — if something fundamentally changes the
|
||||
BTC/ETH relationship, the spread might never revert.
|
||||
- Needs enough data to calculate a reliable mean.
|
||||
|
||||
---
|
||||
|
||||
## 5. Avellaneda-Stoikov Market Making
|
||||
|
||||
**What it does:**
|
||||
Places buy and sell orders at optimal prices around the
|
||||
midpoint, adjusting based on how much inventory you're
|
||||
holding and how much time is left in your trading session.
|
||||
|
||||
**Why it works:**
|
||||
Market makers profit from the spread (buy low, sell high).
|
||||
The A-S model tells you exactly where to place your bid
|
||||
and ask to balance profit vs risk.
|
||||
|
||||
**Risks:**
|
||||
- Adverse selection — someone who knows more than you
|
||||
picks off your quotes.
|
||||
- Requires low latency and accurate volatility estimates.
|
||||
- More of a "keep the machine running" strategy than
|
||||
a get-rich-quick one. The edge is small per trade.
|
||||
Reference in New Issue
Block a user