How it works
Strategies & circuits
What a circuit is: its genome fields, their bounds, and the exact formula behind each signal kind.
The genome#
Each strategy is a small circuit described by six fields. This is its genome.
| Field | Values | Meaning |
|---|---|---|
kind | momentum, meanrev, breakout, trend | Which signal it uses |
market | ETH-USDC, BTC-USDC | Which pool's quotes it trades |
lookback | 3 to 60 quotes | How far back the signal looks |
threshold_bps | 0 to 100 bps | How strong the signal must be to act |
size | 0.1 to 1 | Position size as a fraction of equity |
stop_bps | 20 to 400 bps | Adverse move from entry that triggers a stop |
The population always has 24 circuits. Each circuit has an id like f12-03: born in generation 12, number 3 of that batch.
Signals#
At each quote i the signal returns a target direction: long (1), short (-1), flat (0), or keep (no change). The position taken is direction × size.
In the formulas, p[i] is the price at quote i, L is lookback, th is threshold_bps, and SMA(n) is the simple average of the last n prices up to and including p[i].
Momentum#
Follows the move over the lookback.
r = (p[i] - p[i-L]) / p[i-L] * 10000 // bps
r > th -> long
r < -th -> short
else -> flatMean reversion (meanrev)#
Bets that price returns to its average.
m = SMA(L)
z = (p[i] - m) / m * 10000 // bps
z > th -> short
z < -th -> long
else -> flatBreakout#
Acts when price breaks the range of the previous L quotes. The current quote is not part of the range.
hi = max(p[i-L] .. p[i-1])
lo = min(p[i-L] .. p[i-1])
p[i] > hi * (1 + th/10000) -> long
p[i] < lo * (1 - th/10000) -> short
else -> keep current directionBreakout is the only kind that holds its position inside the range. The other kinds go flat.
Trend#
Compares a fast average with a slow one.
fast = SMA(max(2, floor(L/3)))
slow = SMA(L)
d = (fast - slow) / slow * 10000 // bps
d > th -> long
d < -th -> short
else -> flatThe genesis population#
Generation 1 starts from 24 random circuits. The randomness is seeded from 64 zeros (see seed), so the genesis population is fixed and anyone can recompute it.
- Kinds and markets are spread evenly: 6 circuits per kind, 12 per market.
lookback: a whole number from 3 to 60.threshold_bps: 0 to 20.size: 0.25 to 1.00 in steps of 0.05.stop_bps: 40 to 200.
Mutation can later move each field anywhere inside its full bounds.
Hold baseline#
Each market also has a hold baseline: buy at the first window quote, sell at the last, paying the cost on both sides. It is the bar a circuit has to beat. See Evaluation.
Paper only. No funds are traded. $FOUS is not launched. Nothing here is financial advice.