sidepickDWG NO. SP-2026-03 · REV A
Sheet 01 - Entry

Building my trading bot: rules before code.

Every trading bot post starts with the code. This one starts with the rules — because the code is the easy part, and the rules are the only part that keeps money alive.

Why build at all. I do not sell signals, I do not copy trade, and I do not want a black box. A bot that executes my rules, on my risk settings, with a kill switch I control — that is the only automation I trust. Everything else is renting somebody else’s judgment.

The rules, written before any strategy code:

  1. Spot only. No leverage. Leverage does not increase edge; it increases the speed of ruin. The bot cannot borrow, short, or touch margin — enforced at the exchange-API level, not by willpower.
  2. Backtest first, testnet second, tiny size third. No real capital until the strategy survives historical data, then paper trading, then the smallest size that still hurts a little.
  3. Only the yield enters the market. The principal from the investing pillar is never traded. The bot gets an allowance carved out of realized yield — if it blows up, the portfolio does not notice.
  4. Specs before code. Every behavior is written as a specification first: inputs, order types, failure modes, what happens when the exchange API goes down mid-order. Code implements the spec; nothing freelances.
  5. Kill switches everywhere. Max daily loss, max consecutive losses, stale-data halt, manual panic button. A bot without a leash is not a tool — it is a liability with an API key.

The stack is deliberately boring: TypeScript, a fast runtime, a small HTTP framework for the control panel, and a unified exchange library so the venue is a configuration value, not a rewrite. Boring stacks have fewer 3 AM surprises.

What the bot will never do: martingale into a losing position, trade without a stop, run a strategy with negative expectancy (Expectancy Calculator gets the final vote on every idea), or risk more per trade than the math allows (Kelly & Risk of Ruin sets the ceiling, Position Size Calculator sets the floor).

Try it
The same math that will gate every trade the bot takes: how much can one position risk before ruin stops being theoretical?

Right now there is no strategy code — and that is the point of Part 1. Rules first, then the first backtest. Part 2 will cover what the backtest actually said, including the ideas that died.

This is a build log, not a signal service. Nothing here tells you what to buy.

RevDateDescription
A2026-09-30Initial issue.
Drawn by
sidepick
Field notes

Anonymous notes on building wealth through coding, investing, and trading. Every number published is a real position, stated as % of book — no absolute amounts, no names, no institutions. The scoreboard is the proof of work; the policy is the method.

← Previous entryStart here: the Sidepick path.Next entry →Net yield is the only yield.