#005 / DEVELOPMENT NOTE
Satoshi Trinity: teaching a trading bot some manners
My mining crew chases blocks. This project chases a different question: can I build a trading strategy whose results survive a closer look? Meet Satoshi Trinity, my Freqtrade workshop on Xubuntu. There is Python, there are charts, and there is a laptop that has heard “just one more test” more often than it deserves.
This is a hobby and continuing-education project: a way to learn software development, data analysis and risk controls. I am not building an income plan around it. Leveraged crypto trading can lose money quickly, including the entire capital committed. This article documents my experiment; it is not a recommendation to trade or copy the setup.
The workbench: a laptop, not a secret trading bunker
The audited setup uses Freqtrade 2026.4 in Docker, Kraken Futures with isolated margin, twelve configured pairs and a 15-minute strategy. The machine is a Lenovo IdeaPad with an Intel Core i7-8550U, roughly 8 GB of RAM and Intel graphics. CPU experiments are the order of the day. No mysterious GPU is hiding under the coffee cup.
The reference live strategy is V29.11. FreqAI and SmartMemory are disabled in that active path. The research workspace is separate: copied trade records, frozen data, versioned reports and comparisons. The audit described here made no changes to the live bot.
How the project grew up
- July–August 2026 / V23: AI-conviction and SmartMemory experiments left a useful trail of 259 real trades. Their combined net result was −5.53 USD. Plenty to learn from; no victory parade.
- September / the V27–V29 family: the archived strategy chain moved through breakout, delayed positioning data, open-interest confirmation and market-regime filters. Research branches explored how those ingredients should work together; their existence alone does not prove a profitable improvement.
- V29.8 → V29.9: an alternative breadth entry route was rejected. V29.9 instead required a three-of-five directional majority in a four-hour BTC/ETH/SOL/XRP/AVAX panel to confirm an existing entry. Broad market agreement became a gate, rather than another excuse to jump in.
- V29.10 → V29.11: breakout and breadth parameters became explicit; leverage could range from 1× to 3× using information available at entry. V29.11 added a profit ratchet and a 12% trade-profit exit, with an exception for unusually strong continuing trends.
- 1–5 October / twelve audit phases: we inspected loss sources, entries, exits, AI, memory, data quality and infrastructure plans. The final phase replayed V29.11 against one small V29.12 risk-cap candidate. The candidate remains research-only.
Code corner: helping winners keep their shoes
V29.11 leaves the entry logic inherited from V29.10 and adds profit protection. This real excerpt activates a proposed profit floor at 12% trade profit: at least 8%, or 65% of the current profit when that is higher. These are leveraged trade-profit ratios, not annual returns or account-wide gains.
def _v2911_locked_profit(current_profit: float) -> Optional[float]:
"""Return a profit floor only after the agreed 12% activation."""
if current_profit >= 0.12:
return max(0.08, current_profit * 0.65)
return NoneBefore activation the helper returns no new profit floor; afterwards the stop logic uses it. A separate exit normally takes profit at 12%, unless the documented strong-trend conditions hold. An intended stop level cannot guarantee the actual fill price or final net result.
Code corner: an initial stop gets a ruler
The audit found three cases where the ATR-based initial stop distance widened the leverage-adjusted risk beyond the configured static stop contract. V29.12 tests a small correction. The older path bounded raw price distance using ATR; the new path also caps it by the configured trade-risk distance divided by leverage.
requested_atr_risk = min(
0.025,
max(0.008, float(entry_atr_pct) * float(atr_multiplier)),
)
static_raw_cap = configured / safe_leverage
return min(requested_atr_risk, static_raw_cap)For example, a 3% configured trade-risk distance at 3× leverage becomes a maximum 1% raw price distance in this calculation. Entries, leverage selection, stake and the existing profit-lock path are inherited. Fees, gaps and slippage still affect real losses. This is a risk-control hypothesis, not a magic profit button.
Code corner: inspect the records, leave the bot alone
connection = sqlite3.connect(f"file:{path}?mode=ro", uri=True)
connection.row_factory = sqlite3.Row
connection.execute("PRAGMA query_only=ON")The analysis opens a copied database read-only and enables query-only mode. It also separates a trade’s entry version from the version that later managed its exit. A winner opened under V29.10 and closed under V29.11 should not quietly become proof that every native V29.11 entry works.
What did it earn? Three different answers
Historical simulation: both variants were replayed from 15 April to 5 October 2026, ending at 00:00 UTC on the latter date. The 173-day run used a simulated 1,000 USD starting wallet, 30 USD stake, at most five open trades, 5-minute detail candles, mark/funding data and a 0.1% fee on each entry and exit. Protections were enabled; AI and memory were off.
| Metric | V29.11 / baseline | V29.12 / candidate |
|---|---|---|
| Trades | 210 | 211 |
| Netto / Net USD | +43.99 | +48.24 |
| Return / 1,000 USD | +4.40% | +4.82% |
| Profit factor | 1.618 | 1.701 |
| Max. drawdown / USD | 10.79 | 10.79 |
| Max. drawdown / account | 1.0693% | 1.0688% |
| Positive Wochen / positive weeks | 4 / 10 | 4 / 10 |
V29.12 improves this run by 4.25 USD. Its simulated average net result is about 0.23 USD per trade, versus 0.21 USD for the baseline. This is historical expectancy, not expected future income. Changing exits also changes available slots and later trades, so the improvement is path-dependent. The profit factor is gross winning trade profit divided by gross losing trade loss; above one here does not establish future profitability.
Actual recorded trading: the 5 October snapshot contains 42 closed V29 trades and two open ones. The mixed V29.10/V29.11 closed-trade net is +7.69 USD. Restricting it to the 29 closed trades opened natively under V29.11 gives −3.71 USD and a profit factor of 0.639. The last twenty closed V29 trades total −3.59 USD. Fees and funding are already included in the reported net fields; open positions are excluded. This is not a whole-wallet return.
Dry-run and future profit: this package provides no completed V29.12 forward dry-run result. There is no defensible monthly-income forecast. A green historical total does not pay next month’s coffee bill. Future profit remains unproven; losses are possible.
The ten-week reality check
The gate required at least seven profitable weeks out of ten. Both variants managed four. Two strong weeks make the overall chart look cheerful, but the gate still says FAIL — no live promotion. The candidate’s selected test slices total +39.54 USD; they are part of the full replay and must not be added to its +48.24 USD.
The historical window overlaps earlier strategy development, so it is not a fresh untouched holdout. Better data made the comparison reproducible: 48 price/volume series, 24 mark/funding series and twelve external positioning-metric series. Two known single-hour funding gaps at the source remain documented. The replay is usable, not perfectly gap-free. Backtests also make execution assumptions, including no slippage on qualifying fills, as explained in the official Freqtrade documentation.
AI gets homework before it gets the keys
XGBoost and LightGBM were screened on CPU in a model comparison. Their proxy profit factors were 0.740 and 0.714, with zero profitable weeks out of ten for either model. That was a model screen, not a complete strategy backtest. Neither became a champion; FreqAI remains off.
SmartMemory has a similar lesson: the historical groups were too small and too dependent on when they occurred to show a reliable benefit. Comparing early “off” trades with later “on” trades cannot isolate the effect of memory from a changed market. The bot does not get extra credibility just because a feature sounds clever.
What comes next in the notebook
The proposed next step is better telemetry without changing trading behaviour: make entry decisions, stop stages and outcomes easier to trace. A monitoring stack and read-only tool interfaces have been designed, but are plans rather than installed features. Broad parameter optimisation remains on hold. The source project report records 76 passing audit tests; that is evidence about the checks, not a certificate of profit.
My favourite progress here is a cleaner experiment: fewer mysteries, better comparisons and the confidence to park a candidate that fails its own rules. The laptop keeps its job. The coffee mug too. The “guaranteed passive income” banner has not made the shortlist.
Report dated 5 October 2026. Based on archived project reports and evidence at commit 31407bf: data foundation, entry/exit analysis, model comparison and SmartMemory audit. The live-trade snapshot is from 10:41 UTC that day. Code excerpts are from the archived strategy and analysis files. Research status may change after this snapshot.