Week 02 · Build Your Own Automated Options Trading System

Meet Claude,
your coding partner
who never sleeps.

You describe what you want, in plain English. Claude writes the code. You read the steps before they run. The keyboard is still yours.

Week 2 of 12
Tools installed by end of week
Your first prompt: "show me today's NIFTY price"
This week, in one glance

Same five beats. New topic.

1
The idea
You describe; Claude writes. You read the steps before they run.
2
The outcome
Claude Code installed. You've asked it for today's NIFTY price.
3
New vocabulary
Claude Code · prompt · terminal · model tier · context window
4
Hands-on
Install Claude Code, ask one real question, read every step before saying yes.
5
War story
Claude once wrote a confidently wrong table of expiries. Every number must be looked up, not guessed.
1 · The idea

Not a chatbot. A coworker who lives in your terminal.

A web chatbot (ChatGPT in a browser)

  • You paste code in. You copy answers out.
  • It cannot see your files. It guesses your layout.
  • It cannot run anything. You're the copy-paste mule.
  • One window. One thread. Limited memory of your project.

Claude Code (in your terminal)

  • It opens your files, reads them, edits them — with your permission.
  • It runs commands — after you press Enter.
  • It sees the same folder you see. No copy-paste theatre.
  • It has memory of your project across sessions (MEMORY.md, CLAUDE.md).
You describe what you want. Claude proposes the steps. You approve each one. That is the whole loop.
The Claude Code loop

Three steps. Forever.

🗣

1 · You describe

In plain English. "Show me today's NIFTY closing price." No code yet. The clearer your sentence, the better the result.

📝

2 · Claude proposes

It lists the steps: "I'll fetch the price from this API, write the answer to your screen." Nothing has run yet.

3 · You approve

Read it. If it makes sense, press y. If it doesn't, type back: "use a different API" or "show me the URL first."

The "approve" step is not a formality. On a real-money codebase, "approve" is where you catch the mistake before it costs you.
2 · By the end of this week

Four boxes checked. Nothing more.

Claude Code is installed on your laptop. You can launch it by typing claude in the terminal.
You've asked it one real question — "what is today's NIFTY closing price?" — and got a sensible answer.
You know what each of the five new words means and can use them in a sentence.
You've practised reading the proposed steps before pressing yes. You feel the pause. That pause is the whole game.
No code is written this week. The skill is asking, reading, approving. The code comes in Week 3.
3 · New vocabulary

Five words. Use them this week.

Claude Code
Anthropic's CLI tool. A program you run in your terminal that lets you talk to Claude and have it edit your project.
$ claude
prompt
The sentence you type. Not a magic spell — just a clear request, in plain English.
"show NIFTY close"
terminal
The text window where you type commands. Terminal.app on Mac, WSL on Windows.
Cmd+Space → Terminal
model tier
Which "brain" answers — Haiku is fast, Sonnet is balanced, Opus is the heavyweight for real-money code.
Haiku · Sonnet · Opus
context window
How much your model can "see at once" — files, chat history, docs. Big window = remembers more.
1M tokens (Opus 4.7)
Don't memorise. Drop one of these into a sentence each day this week and they'll stick.
Model tier — three flavours of Claude

Pick the right brain for the job.

Haiku

Fast and cheap. Junior intern speed.
  • Use for: "what does this error mean?" · log scans · quick lookups
  • Strength: answers in seconds, costs pennies
  • Weakness: not for design, not for real-money code

Sonnet

Balanced. Daily driver.
  • Use for: writing most code · refactors · reading docs · everyday work
  • Strength: 90% of the smart, at a fraction of the cost
  • Weakness: will make subtle judgment errors on risky code

Opus

Heavyweight. Real-money default.
  • Use for: order placement code · stop-loss logic · code review · anything where a bug costs ₹
  • Strength: the most careful, the most thorough, the best memory
  • Weakness: slower, costs more — use it when it matters
Rule for this course: anything touching real money runs on Opus. Always.
4 · Your first real prompt

Ask one question. Read the answer.

~/trading — claude
$ claude
Claude Code · Opus 4.7 (1M context)
Type your question. Press Enter when done.

> what is today's NIFTY 50 closing price?

I'll look this up using a web search.
Step 1: I will call WebSearch with the query "NIFTY 50 close today".
Step 2: I will read the result and reply with the number and the date.
⚠  This will perform a web search. Approve? [y/N]
> y

NIFTY 50 closed at 24,825.10 on 2026-05-14 (source: NSE official).
Notice the pause before "Approve?" — that's where you read the plan. Always read the plan.
The pause before "yes"

Three keys decide everything.

y
Approve — once
Run this one step. Ask me again next time. Use this by default when learning.
n
Reject
Don't run it. Tell Claude why — "use a different API", "show me the URL first", "are you sure?"
a
Approve all — session
Trust this kind of step for the rest of the session. Never for order placement. Ever.
"a" feels productive. "y" is the safer habit for this course. There is no rush.
4 · The hands-on bit — your task

Install. Ask. Read. Approve.

What to do this week (60 minutes, once)

  1. Install Claude Code. Open Terminal. Follow the install steps at claude.com/code. When it asks to sign in, sign in.
  2. Launch it. Type claude and press Enter. You should see the welcome banner with the model name.
  3. Ask one real question. Try: "What is today's NIFTY 50 closing price?" Don't paste code. Just type the sentence.
  4. Read the proposed steps before you press y. Out loud, if you need to. Notice the pause. That is the habit we're building.
  5. Ask one more. Try: "What is the lot size of NIFTY options on NSE?" Read the answer. Verify one number against a Google search.
If you have to ask Claude to "be more careful" — that's a great instinct. Write it down. You're already learning to manage the partnership.
5 · A real war story · March 2026

Claude once wrote a confidently wrong table of expiries.

The author asked Claude to "fill in the MCX commodity expiry overrides for the next month." It looked authoritative. It was wrong by 2–4 days on multiple commodities. Trading the wrong expiry on the wrong day = real money damage.

What Claude generated (looked great, was wrong)

// expiry_overrides.json — generated by Claude
{
  "CRUDEOIL": "2026-03-19",  // wrong by 2 days
  "NATURALGAS": "2026-03-20", // actual: 24th
  "GOLDM": "2026-03-24"       // actual: 26th
}
// "Generated from training data and standard
// MCX monthly schedule." — confident. wrong.

The rule we adopted

Expiry dates are never guessed. They come from a verified source — the user's broker terminal screenshot, or the Upstox API.

// Source: screenshot from Upstox terminal,
//         dated 2026-03-01, attached to PR
{
  "CRUDEOIL": "2026-03-21",   // verified ✓
  "NATURALGAS": "2026-03-24", // verified ✓
  "GOLDM": "2026-03-26"       // verified ✓
}
// If unsure: ask the user. Never guess.
The lesson, pinned

Look it up. Don't guess.

3
commodity expiries Claude got wrong
2–4
days off — enough to trade the wrong contract
100%
of expiry dates today come from verified sources

Models, including good ones, will produce confident text on topics where they don't actually know the answer. The defence is not "be smarter." It's a rule: every number that touches a real order — expiry, strike, lot size, margin — must be looked up at runtime from the broker or the API. Never copied from a model's reply.

"It sounded confident" is not evidence. The screenshot is evidence. The API response is evidence.
Week 2 — takeaway

You describe. Claude proposes.
You read, then approve.

Claude is a coworker, not a vending machine. The skill of this course is not "prompting" — it is reading the proposed plan before pressing yes, every time, especially when it looks routine.

End of Week 2

Next: Your first script.

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