Blog
4 min readNexrade

Position sizing for bot builders (the part people skip)

Why “all-in bots” die, how to think about size without fancy math, hard loss limits, and the difference between research size and production size.

trading · risk · bots · beginners

Everyone wants a better entry signal. Almost nobody wants a boring conversation about size. That is backwards. A mediocre edge with sane size can live. A great-looking edge with drunk size dies on a normal bad week.


Do you need the Kelly criterion?

No — not to start.

Kelly is useful later if you understand the assumptions and you have a real edge estimate. Early on, Kelly is often an excuse to size up.

What you need first:

  • A maximum loss per day / week you can actually tolerate
  • A maximum loss per strategy
  • A size small enough that a bug does not end the account

If you cannot name those three numbers, you are not ready for fancy formulas.


“I’m only risking what I can afford to lose”

That sentence is necessary and not sufficient.

People “afford” losses until the loss is on screen at 3 a.m. and the bot is still firing. Affordability is not a risk system. A risk system is:

  1. Pre-committed limits
  2. Automatic enforcement in code
  3. A pause that requires a human to resume

If the bot can ignore your feelings, it should also be able to ignore your urge to “let it run.”


Research size vs production size

Treat them as different jobs.

ModeGoalSize
Research / demoProve the pipeline worksTiny or paper
Live validationProve fills, fees, and ops match the storySmall enough that being wrong is tuition
ProductionHarvest EV+ carefullyOnly after validation, still far from “max”

Jumping from backtest → full size is how people fund the market’s education budget.


A sizing frame that is good enough for most retail bots

You can get far with rules this plain:

  1. Per trade risk: a small fixed fraction of the strategy’s allocated capital (many people live in low single-digit percent of that sleeve, not the whole net worth).
  2. Per day stop: if you hit it, the bot stops. No “one more signal.”
  3. Per strategy stop: if the strategy hits its max drawdown, size to zero until you re-underwrite the edge.
  4. Correlation tax: five bots on the same coin and the same idea are not five independent risks.

If your “diversification” is five names of the same trade, your real size is bigger than you think.


Leverage is not a strategy

Leverage multiplies everything: edge, error, latency bugs, liquidations, and your own overconfidence.

Questions before you turn leverage up:

  • Does the edge still exist after fees and funding?
  • What happens if the feed is late by two seconds?
  • What happens if you cannot cancel?
  • What happens if the venue partial-fills you into a mess?

If the answer is “the bot will handle it,” show the code path. If there is no code path, there is no plan.


The all-in bot

We have seen the pattern too many times:

  1. Strategy looks good for a stretch
  2. Size increases because “it’s printing”
  3. Regime shifts or a bug hits
  4. Account is not a learning tool anymore — it is a hole

Never, never, never all-in. Not on a signal, not on a bot, not on a “sure” setup. Direction is probability. Size is survival.


What “small” means in practice

Small is not a moral virtue. It is an engineering choice:

  • Small enough that logging and review still happen
  • Small enough that you can stop without emotional negotiation
  • Small enough that a bad deploy is embarrassing, not existential

When the system is boring and the edge is measured after costs, then you earn the right to discuss larger size — slowly.


Bots make sizing mistakes faster

A human can only revenge-trade so many times per night. A bot can do it every second.

So put the brakes in software:

  • Max orders per minute
  • Max open risk
  • Max daily loss
  • Kill switch you can hit when half awake

If your risk model only lives in a notebook, the bot does not have a risk model.


How this connects to building (not just trading)

Position sizing is easier when ops are boring:

  • Reliable public data so you are not guessing the book
  • Clear separation of research traffic and live trading keys
  • Logs you trust more than your memory

Optional tools if you want them later:


Size so you can stay in the game long enough for the law of large numbers to matter.

That is how we still trade — and how we still write bots.

Want to try the path this note describes? Create a free API key, or return to the full list of notes.