Strategy Optimizer: the honest parameter search.
A complete guide to the GOGA Strategy Optimizer — how it searches, what it rejects, and how to read the results. For admins, traders, and curious users. No profit promises, no financial advice.
Educational content. The optimizer runs backtests on historical data — past performance does not guarantee future results. Nothing here is financial advice.
What is the Optimizer?
The Strategy Optimizer is a parameter-search engine for crypto trading strategies. It takes a strategy (like Donchian channels, EMA crossover, RSI reversal), a universe of coins, and a grid or genetic search space — then runs thousands of backtests to find configurations that survive honest testing.
Key principle: the optimizer never lies. It models fees, slippage, leverage, and splits data into In-Sample (IS) for tuning and Out-of-Sample (OOS) for validation. A configuration that looks great on IS but fails on OOS is overfit — and the optimizer tells you so.
деда4 Preset
The деда4 preset button (⚡ in the admin optimizer) sets the search axes to the exact specification from the деда4 requirements:
- Stop-loss: 0.5% → 1.5%, step 0.03%
- Take-profit: 0.5% → 5%, step 0.03%
- Slippage: 10 bps per side (0.1%)
- Max DD cap: 15% (discard)
- Objective: mathematical expectation (avg trade return)
- Mode: genetic, host = niko2
0.5 means 0.5%, not 0.005. This matches how traders think, not how code stores fractions.Slippage Input
The Slippage (bps/side) input controls how much price slippage is modeled per trade side. Default: 10 bps = 0.1% per side, matching деда4. An empty field preserves legacy behavior — old jobs are not repriced.
Slippage is a real cost. A strategy that looks profitable at 0 slippage may be unprofitable at 10 bps. The optimizer applies it symmetrically to entry and exit, in both realistic and plain modes.
Fitness Functions
The optimizer can rank trials by several fitness objectives. Choose the one that matches your goal:
| Objective | What it measures | When to use |
|---|---|---|
is_net | Net profit % | Maximize total return |
is_expectancy | Avg trade return | деда4 default — reward per trade |
sharpe | Return / volatility | Smoother equity curve |
sortino | Downside-only Sharpe | Asymmetric risk |
calmar | Annual return / max DD | Reward per unit of pain |
profit_factor | Gross profit / gross loss | Winners must outweigh losers |
fitness | Composite score + hard gates | Balanced default |
Sortino and expectancy are now written to trail columns (both IS and OOS), visible in the results table and CSV export.
Max DD Cap (discard)
The Max DD % (discard) input sets a hard cap on account drawdown. Default: 15%. A coin whose IS drawdown exceeds the cap is failed and discarded — its trial gets objective = NULL and can never be a winner. This is the деда4 rule: "iterations that don't pass are thrown away."
dd_cap_exceeded = true). Validate is the truth report; the gate already punishes drawdown.Strategy Parameter Optimization
Beyond exit parameters (stop, target, trail), the optimizer can search entry parameters — the strategy's own periods and thresholds. The launch form pulls the catalog from the strategy registry (60 strategies) and draws Start/Step/Stop rows for the selected strategy's parameters:
- Donchian:
n(channel period) - EMA crossover:
e_fast,e_slow - RSI reversal:
rsi_period,rsi_lo,rsi_hi
The gene carries these as e_fast etc. The Before→After equity chart honestly recomputes the signal with the new parameters. Verified: e_fast=5 produced 79 trades vs 38 for the base config — a real change, not a cosmetic overlay.
2D Heatmap & CSV Export
In the job detail view, two TradingView-style conveniences are available:
- 2D parameter heatmap: two X/Y selectors let you pick any two varying parameters. Each cell shows the best objective across all other params. Discarded (DD-capped) trials are excluded. Green plateaus beat lone bright cells — a smooth green region means the edge is robust.
- CSV export: download all trials (search + validate) with every column — objective, IS/OOS metrics, sortino, expectancy, gene JSON, gate verdict, noise flag. For offline analysis in Excel or Python.
MACD & RSI Indicator Panels
Below the Z-Score panel, MACD and RSI chips show the same math the backtests trade with — _ema / _rsi functions, honest warmup gaps, and a live data tail from Gate.io. These are not decorative indicators; they are the actual signals the strategies use.
By design, Z-Score + MACD/RSI are also available on the user optimizer at /app/optimizer (via login-gated proxy /app/api/*).
Case Study: ATOM
The setup
ATOM (Cosmos) was a falling coin — exactly the kind most traders avoid. But Donchian20 trades both directions: shorts profit on drops. A falling coin is only unprofitable for a long-only holder.
The winning configuration
| Strategy | donchian20 @ 4h |
| Stop-loss | 5% |
| Take-profit | 16% |
| Trailing stop | 3% |
| Leverage | 3× |
| Before (base params) | −361% |
| After (optimized) | +296% |
| OOS (out-of-sample) | +290% |
Two honest caveats
What we learned (EDGE Knowledge Base)
Six research notes from the ATOM campaign are seeded in the KB (bilingual, auto-translated via DeepSeek) and shown publicly on /crypto/ATOM and in the Lab:
- Noise floor: why Sharpe must clear √(2·ln N · 365/days)
- Parameter transfer: why one-coin winners are suspect
- Fees: ema9_21 consumed 184% of margin on 614 trades
- History depth: why 200+ candles is the minimum
- "Before→After flatters — OOS is the only exam"
- Drawdown as the honest kill criterion
User Optimizer
Available at /app/optimizer (login required, free):
- "Check YOUR parameters" — instant backtest through the same honest engine (fees, leverage ≤5×, pessimistic fills, IS/OOS). Result: price + trades, equity before/after, Sharpe + Sortino, "✓ beats defaults / ✗ defaults win".
- Run history ("My runs"): every run saved with parameters, IS/OOS, Sortino. A ↩ button restores parameters. Daily limit: 200 tests, fail-closed.
- "Request full optimization" — a full search costs compute, so the request goes to the operator queue. In the admin Runs panel: "📨 User optimization requests" (▶ launched / ✕ rejected / ✓ done).
Access Tiers
| Tier | What you see | Where |
|---|---|---|
| Anonymous | Honest teaser: verdicts, "before −361% → after +296% PAPER_ONLY", research notes, CTA "Sign in — free" | /crypto/ATOM |
| Signed in (free) | Everything: trade chart, equity, statistics, exact parameters, user optimizer | /app/optimizer |
| Admin | Full optimizer: launch jobs, genetic search, heatmap, CSV, presets, user request queue | /app/admin/optimizer |
EDGE Knowledge Base
The EDGE Knowledge Base turns research findings into public knowledge. A research_notes table stores bilingual notes (auto-translated via DeepSeek) that are shown on coin pages and in the Lab as "Research notes — what we learned."
Admins can add new findings with a single POST — translation is automatic. Current notes from the ATOM campaign cover: noise floor, parameter transfer, fee erosion, history depth, OOS as the only exam, and drawdown as the kill criterion.