4. The checklist before putting real money in
Level 12: Testing, deploying and taking the step
This is the last module of the course and the last of the academy. First, turning six levels into a concrete list you can look at on the day you put real money in. Then, looking back and seeing the whole map.
The list, point by point
1. The signal engine that trades is the same module you tested, with no logic duplicated in two places. (Level 7)
2. The decision is deterministic: same input, same output, with no clock and no unseeded randomness inside. (Level 7)
3. Every order carries a stable intent identifier and resending it does not create a second one. (Level 8)
4. The state survives a restart and its schema version is checked on startup. (Level 8)
5. The calendar is in data, not in conditionals: holidays, half sessions, clock changes, expiries. (Level 9)
6. A missed cycle has a written policy: what is done with the late signal and what is discarded. (Level 9)
7. Structured logging of the decision and its inputs, not just of the result. (Level 10)
8. Automatic reconciliation against the broker at startup, at the close and periodically. (Level 10)
9. Alerts that separate the serious from the odd and that reach somebody able to act. (Level 10)
10. A manual kill switch reachable in under a minute, tested this month. (Level 11)
11. Automatic cut-offs on daily loss, on number of orders and on discrepancy, with thresholds written down before trading. (Level 11)
12. A procedure for the worst day that somebody other than you can execute. (Level 11)
13. Tests with a simulated broker covering partial fill, rejection, data gap and timeout. (Level 12)
14. A version comparison test over a fixed stretch of data. (Level 12)
15. A rehearsed rollback, with the previous version installed and the state read in both directions. (Level 12)
16. Rungs climbed and measured: real cost with small capital, compared with the backtest's assumption. (Level 12)
The list is executed, not read
A good part of those points check themselves, and what checks itself does not get forgotten on a rushed Monday.
def prevuelo(sistema, broker, config):
fallos = []
if sistema.hash_git != config.hash_git_aprobado:
fallos.append("la version en ejecucion no es la aprobada")
if not sistema.estado_cuadra_con(broker):
fallos.append("estado y broker no cuadran")
if config.perdida_diaria_maxima is None:
fallos.append("sin corte por perdida diaria")
if sistema.dias_desde_prueba_del_interruptor() > 30:
fallos.append("el interruptor no se prueba desde hace demasiado")
if not sistema.canal_de_alertas_responde():
fallos.append("las alertas no llegan a ninguna parte")
return fallos
pendientes = prevuelo(sistema, broker, config)
if pendientes:
raise SystemExit("no se habilita el envio de ordenes: " + "; ".join(pendientes))And on the day you switch to real money you leave a record, because six months from now nobody will remember which version or which limits it started with.
import json, hashlib, datetime
def acta_de_arranque(ruta_config, hash_git, capital, limites):
with open(ruta_config, "rb") as f:
hash_config = hashlib.sha256(f.read()).hexdigest()[:12]
return json.dumps({
"momento": datetime.datetime.now(datetime.timezone.utc).isoformat(),
"version_codigo": hash_git,
"hash_config": hash_config,
"capital_asignado": capital,
"perdida_diaria_maxima": limites["perdida_diaria"],
"quien_puede_parar": limites["responsable"],
}, ensure_ascii=False)A worked scenario, with figures invented for the example: a system that sends about 200 orders a day starts up with a sign error in its position closing and buys on every cycle. With point 11 in place, the cut-off on order count stops it around the fortieth; without it, it carries on to the close. Same mistake, five times the cost. The list does not prevent the error: it bounds what it costs.
The academy's map
- The no-code track. Market theory, Macro and Costs. What a market is and who is on the other side, how the price of money and central banks condition everything else, and why commissions, the spread and taxes decide more outcomes than most brilliant ideas.
- The intermediate track. Mathematics and statistics, Derivatives, and Risk and portfolio management. How you tell a real difference from a chance one, what futures and options really are and what risks they bring, and how a position is sized so as to still be alive after a bad run.
- The hard track. Technical, from Python from scratch through to trading at a broker; Data and production, this very course, which obtains information you can trust and then makes everything above hold up running on its own; and Expectations and edge, which asks what price is already discounted and where an edge might exist.
Where to go next
What is missing now is not more material, it is measurement. Go back to Mathematics and statistics when you have results of your own to judge, because the question "is this an edge or is it luck?" only has an answer there. Go back to Costs when you measure your real slippage, and to Risk when it is time to decide the size. And remember what this course has at no point given you: a strategy. An impeccable system executing an idea with no edge loses money with admirable punctuality.
The warning, unvarnished
All of this is education, not financial advice. Nothing you have read is a recommendation to buy or sell any asset, nor is it adapted to your situation, your objectives or your risk tolerance. Trading carries the risk of loss, including the total loss of capital. And an automated system amplifies both the good calls and the mistakes: the same mechanism that repeats a good decision tirelessly repeats the bad one at the same speed, without hesitating and without warning. That is why this module's list is not bureaucracy. It is the only thing separating a failure from a disaster.