Week 01 · Build Your Own Automated Options Trading System

Why automate,
and what "automated"
really means.

A bot follows your rules without flinching. You stay the head chef. The pots and the timers are no longer your job.

12-week course · 1–2 hours / week
Week 1 of 12
No code yet · concepts & vocabulary
This week, in one glance

Five things, always in the same order.

Every week of this course follows the same five-beat structure. Look in the same place for the same kind of thing.

1
The idea
A bot follows your rules without flinching. You stay the head chef.
2
The outcome
You can explain what an automated trading system does — in plain words.
3
New vocabulary
bot · headless · scheduler · log file · exit code
4
Hands-on
Write three of your trading rules as precise if-then sentences.
5
War story
One careless kill command stopped two strategies. Per-strategy name tags are now mandatory.
1 · The idea

You are not being replaced. You are being promoted.

Manual trader

  • Watches the chart for the entry.
  • Clicks "BUY" and types the quantity.
  • Sets a stop-loss — if they remember.
  • Sits at the screen until 3:30 PM.
  • Skips lunch. Misses the kid's call. Trades while distracted.
  • One bad day kills six good ones.

Head chef + automation

  • Writes the rules once, on a calm Sunday evening.
  • The bot watches every tick. No blinking.
  • Stop-loss is placed in the same breath as entry.
  • You go for lunch. The bot doesn't.
  • You review the trade log in the evening.
  • Your discipline is now code, not willpower.
Automation is not "the bot trades." It is "your best self trades, every day, even when you're tired."
The chef analogy, unpacked

The bot is your line cook. You are still the chef.

🍳

The chef (you)

Decides the menu. Tastes the soup. Hires and fires recipes. Reads the trade log every evening and tweaks the recipe for tomorrow.

The line cook (the bot)

Executes the recipe to the second. Doesn't improvise. Doesn't second-guess. Doesn't get angry after a losing trade. Doesn't take revenge trades.

📋

The recipe (the strategy)

Precise enough that a stranger could cook it. Written down. Versioned. Tested. If you cannot write it down, you cannot automate it.

"You stay the head chef" is not flattery. It is a job description. The chef who doesn't taste the soup gets bad soup.
2 · By the end of this week

You can explain it to your spouse, in plain words.

You can say, in one sentence: "My bot is a program that watches the market and follows the trading rules I wrote, even when I'm not at the screen."
You can name the five new words from this week — and use each one in a sentence that makes sense.
You have three of your own trading rules written as if … then … sentences, with no fuzzy words like "around" or "soon".
You know why a careful operator types kill -INT $(cat optioncracker.lock) and never pkill python.
If you can explain a thing in plain words, you understand it. If not, you don't — yet. That's fine. This is week one.
3 · New vocabulary

Five words you'll use every week from now on.

bot
A program that follows rules you wrote, without supervision, on a clock.
main_equity.py
headless
No window, no mouse, no human. It runs in the background and writes to a log.
nohup ./start.sh &
scheduler
The clock that wakes the bot up — cron on Linux, Task Scheduler on Windows.
9:03 AM weekdays
log file
A dated text file the bot writes every action into. Your evening newspaper.
logs/optioncracker_2026-05-15.log
exit code
A number the bot returns when it stops. 0 = clean. Anything else = check the log.
exit 0 · exit 1 · exit 137
Don't memorize the definitions. Use the words in conversation this week. They'll stick.
4 · The hands-on bit — part 1

A rule the bot can follow is an if … then … sentence.

No "around", no "soon", no "maybe". Numbers. Times. Comparisons.

Too fuzzy
"Enter near the open if the trend looks good."
Bot-ready
IF time is between 09:17 and 09:31 AND NIFTY straddle has decayed by ≥ 1% from 09:15 open THEN sell 1 lot of the ATM CE at LIMIT.
Too fuzzy
"Get out if the loss is too much."
Bot-ready
IF mark-to-market loss on the position ≥ 50% of entry premium THEN place a market exit and stop adding to this leg today.
4 · The hands-on bit — your task

Write three of your rules — bot-ready.

What to do this week (30 minutes, paper or notes app)

  1. Pick three things you already do when you trade: an entry, an exit, and a "do not trade today" rule.
  2. Rewrite each one as a single IF <condition> THEN <action> sentence.
  3. Read it back. If a stranger couldn't follow it without asking you a question, it isn't done.
  4. Keep the page. We'll come back to it in Week 6 when you turn one of them into code.
Hint: every word like "around", "after a bit", "if it looks weak" is a place where the bot would freeze. Replace with a number, a time, or a comparison.
5 · A real-money war story · 2026-05-05

One careless command stopped two strategies.

An operator wanted to restart IVDrift. They typed a broad pattern. The pattern also matched Option Cracker. OC died mid-day with positions open. Real money damage followed.

What got typed

Looked fine. Worked on the dev box. Killed two production strategies on the live server.

# intent: stop IVDrift
pkill -f python
# reality: matched main_iv_drift.py AND
#          main_equity.py (Option Cracker)

What we do now

Each strategy has a dedicated kill script that matches only its own entry-point name. The operator's intent is unambiguous and tested.

# intent: stop IVDrift, only IVDrift
./scripts/kill_iv_drift.sh
# matches: main_iv_drift\.py
# never matches: main_equity.py
The lesson, pinned

Per-strategy name tags are now mandatory.

1
careless command
2
strategies killed
7
strategies today — each with its own log, lock, and kill script

The rule going forward (it lives in scripts/kill_<strategy>.sh and in this course's bones): every strategy gets its own log file, its own lock file, and its own kill script that matches only that strategy's entry-point filename. No broad patterns. No "just python". Ever.

Operator intent must be unambiguous on a bad morning. Automation is only safe if stopping it is also safe.
Week 1 — takeaway

A bot is your discipline,
compiled into code.

If you cannot write your rule as an IF … THEN … sentence, you do not have a rule yet — you have a feeling. The work of Week 1 is turning feelings into sentences.

End of Week 1

Next: Meet Claude,
your coding partner who never sleeps.

source: cowork/Course_Outline_12_Weeks · Week 1
← → navigate · F fullscreen · click to advance
1 / 12