Shelpid / SETS
git clone https://github.com/Shelpid/SETS.git
Self Improving Trading Machine
+1
stars, 24h · #9,324
+~7
stars, 7 days · #9,972
+274
stars, 30 days · #1,858
275
★ total · +3% this week
82
forks · 0 open issues
Star history (as recorded here)
LanguageJavaScript
License—
Created2026-09-22 (29d ago)
Last push29d ago
Watchers2
OwnerUser
Links
- GitHub: github.com/Shelpid/SETS
- Releases · Issues · Hacker News mentions
README excerpt
# SETS MACHINE ### Self Evolving Trading System A genetic algorithm breeds grid-DCA trading strategies on real BTC candles, kills everything that fails on data it has never seen, and paper-trades the survivor. Live, in your browser. **Run it locally →** · How it works · Honest results · Promo video **96 configs per generation · 8 genes · 4 species · 2 399 real BTCUSDT hours · No build, no npm install, no API keys** ## Watch it evolve Every 4.8 seconds a new generation is born. Immigrants and offspring appear in the gene pool, get backtested, face the out-of-sample gate, and everything that is not an elite dies. The best config that survives the gate takes over the paper grid. | Evolve | Select | Trade | | --- | --- | --- | | Crossover and mutation over 8 genes. Species quotas stop one lucky family from wiping out the rest. | Train on 70% of the tape, then gate on the unseen 30%. Only configs that stay profitable with low drawdown survive. | The leader runs a real grid-DCA bot on the out-of-sample candles: fills, take-profit, stop, fees. | ## Explore your way - **Run / Pause**, **Step** to the next generation, and **1× 2× 4× 8×** speed. - **Click any node** in the gene pool to inspect its genome, train and out-of-sample results. Click empty space or press **Esc** to return to the leader. - Change the **seed** to grow a completely different evolution. Same seed, same result, every time. - Keyboard: **Space** pause, **→** step, **1–4** speed. - URL options: `?seed=42`, `?speed=4`, `?warm=50` (evolve 50 generations instantly on load), `?paused`. - Works on phones: panels stack, nothing scrolls sideways. Full-page screenshot: docs/images/dashboard.png ## Promo 25 s promo video · click to play ## Run locally Requires Python 3 (to serve the files) and any modern browser. [code] Open **http://localhost:8000**. That is all: no npm install, no build step, no keys, no database. Everything runs client-side in plain ES modules. **Host it for free on GitHub Pages:** Settings → Pages → *Deploy from a branch* → `main` / `(root)`. The root `index.html` forwards visitors to `dist/`. **Run the tests** (Node 18+, no dependencies): [code] **Refresh the market data** from Binance's public API (standard library only, no key): [code] ## How it works ### The genome Each strategy is a long-only grid-DCA bot described by 8 genes: | Gene | Range | What it does | | --- | --- | --- | | `family` | 4 species | Entry logic: **Momentum** (z-score above +Z), **Mean revert** (below −Z), **Vol breakout** (close above the previous N-bar high), **Range grid** (inside a quiet band) | | `lookback` | 10–200 h | Window for the rolling mean, deviation and breakout high | | `entryZ` | 0.2–2.5σ | How far price must stretch before the bot enters | | `levels` | 2–8 | Number of buy orders in the grid | | `spacing` | 0.3–3% | Distance between grid levels | | `mult` | 1–2× | Size multiplier per deeper level | | `tp` | 0.3–4% | Take-profit above the