trading

Options Trading Basics: A Developer's Guide to Calls, Puts, and Greeks

Options explained like a software engineer: calls/puts as if/else logic, Greeks as partial derivatives, and why most retail traders lose money (and how to avoid it).

April 8, 2026·8 min read·
#options#trading#investing#risk-management#income

Options confused me until I thought about them like code. Once I made that mental model shift, the entire thing clicked.

This is options trading explained from first principles — no jargon walls, just the mechanics, the math, and the risk traps.

Disclaimer: This is educational content, not financial advice. Options can result in complete loss of capital. Trade only with money you can afford to lose.

Options Are Conditional Contracts

A stock is simple: you own it, it goes up, you profit.

An option is a conditional contract — you're buying the right (not obligation) to buy or sell at a specific price, before a specific date.

Think of it as:

# CALL option - right to BUY
def call_option(stock_price, strike_price, premium_paid):
    if stock_price > strike_price:
        profit = stock_price - strike_price - premium_paid
    else:
        profit = -premium_paid  # lose only what you paid
    return profit

# PUT option - right to SELL
def put_option(stock_price, strike_price, premium_paid):
    if stock_price < strike_price:
        profit = strike_price - stock_price - premium_paid
    else:
        profit = -premium_paid  # lose only what you paid
    return profit

Your maximum loss on buying an option = the premium you paid. That's it.

Key Terms You Actually Need

Strike price: The price at which you have the right to buy (call) or sell (put) the stock.

Expiration date: The contract expires worthless if not exercised by this date.

Premium: What you pay for the option contract. 1 contract = 100 shares, so a $2.50 premium = $250 out of pocket.

In-the-money (ITM): The option has intrinsic value right now.

  • Call ITM: stock price > strike
  • Put ITM: stock price < strike

Out-of-the-money (OTM): The option has no intrinsic value — only "hope" value (time value).

At-the-money (ATM): Strike ≈ current stock price.

A Real Example

NVIDIA (NVDA) is trading at $900.

You buy 1 NVDA call option:

  • Strike: $950 (OTM — NVDA would need to rise $50 to be ITM)
  • Expiration: 30 days out
  • Premium: $15/share × 100 shares = $1,500 cost

Scenario A: NVDA rises to $1,000 by expiration

  • Intrinsic value: $1,000 - $950 = $50/share
  • Profit: ($50 - $15) × 100 = $3,500 profit on $1,500 investment = 233% return

Scenario B: NVDA stays at $900

  • Option expires worthless (OTM at expiration)
  • Loss: $1,500 (100% of premium)

Scenario C: NVDA rises to $940 (close but not enough)

  • Still OTM, likely worth ~$2 near expiration
  • Loss: $1,300 (87% of premium)

This is why most options buyers lose money. The stock can go up and you still lose.

The Greeks: Your Risk Dashboard

Greeks are partial derivatives of the option price. If you've done calculus or understand how rate-of-change works in code, this is just a function with multiple inputs.

Delta (Δ) — Sensitivity to Stock Price

Delta tells you how much the option price moves per $1 move in the stock.

  • ATM call ≈ 0.50 delta → stock up $1, option up $0.50
  • Deep ITM call ≈ 0.90 delta → moves almost like owning stock
  • Far OTM call ≈ 0.05 delta → barely reacts to stock movement
# Delta = ∂option_price / ∂stock_price
# Approximately: if stock moves $X, option moves $X × delta
new_option_value = current_option_value + (stock_move × delta)

Practical use: Delta also approximates the probability an option expires ITM. A 0.30 delta call has ~30% chance of expiring ITM.

Theta (Θ) — Time Decay

Options lose value every day just from time passing. Theta is how much value the option loses per day.

  • An ATM option with 30 days left might have theta = -$0.05/day
  • At 7 days left, theta might be -$0.20/day (decay accelerates near expiration)

This is why options buyers need big, fast moves. Every day you're fighting theta decay.

# Each day that passes:
option_value -= abs(theta)

Key insight: Theta works FOR the option seller. Selling options means time is your ally.

Gamma (Γ) — Rate of Change of Delta

Gamma is the derivative of delta — how fast delta changes as stock moves.

High gamma = delta changes quickly = more explosive but also more dangerous.

ATM options near expiration have the highest gamma. A $1 move can flip an ATM option from slightly profitable to worthless.

Vega (V) — Sensitivity to Volatility

Vega measures how much option price changes per 1% change in implied volatility (IV).

When IV spikes (market fear, earnings, macro events), option premiums inflate. When IV collapses, they deflate.

The volatility trap: Buy options before earnings expecting a big move. The stock moves 5%. Options still lose value. Why? IV crushed (IV crush) after the known catalyst passes, killing the premium.

# IV crush example:
pre_earnings_premium = $8.00  # IV = 80%
post_earnings_premium = $3.00  # IV drops to 30%, even though stock moved

Why Most Retail Traders Lose

Problem 1: Buying OTM options hoping for lottery tickets OTM options need a large, fast move to profit. The stock can rise 5% and the option still loses 70% of value if it doesn't reach the strike.

Problem 2: Holding through theta decay An option that's slightly ITM but 45 days away is mostly time value. Waiting too long lets theta eat your profit margin.

Problem 3: Ignoring IV level Buying options when IV is historically high (like during market panic) means you're overpaying. IV almost always reverts lower, crushing your premium.

Problem 4: Over-leveraging A $100 option on $10,000 stock seems "cheap." But you can lose 100% of $100 every time. 10 losing trades = -$1,000. Add it up.

Strategies That Actually Work for Beginners

Covered Calls (Low Risk, Income Generation)

Own 100 shares → sell a call above current price → collect premium.

  • You cap your upside at the strike price
  • You collect income regardless of stock direction
  • Effective for stocks you want to hold long-term
Own: 100 shares AAPL at $180
Sell: $190 call, 30 days out, collect $2.50 = $250

Best case: AAPL hits $190 → you sell shares at $190 + keep $250 premium = $12.50/share total gain
Worst case: AAPL drops → you keep $250 to offset losses

Cash-Secured Puts (Buy Stocks at a Discount)

Put aside cash to buy stock → sell a put below current price → collect premium.

  • You agree to buy the stock at a lower price if it falls
  • If it doesn't fall, you keep the premium as income
  • Warren Buffett's preferred method for entering positions
AAPL at $180, you'd happily buy at $170
Sell: $170 put, 30 days out, collect $3.00 = $300

Outcome A: AAPL stays above $170 → keep $300 premium, no stock purchase
Outcome B: AAPL drops to $165 → you buy 100 shares at $170 (effective cost: $167 after premium)

Long Calls on Strong Momentum (Defined Risk Speculation)

Instead of buying stock outright, buy a slightly ITM call:

  • 0.70+ delta (so it behaves close to owning stock)
  • 60-90 days out (enough time for the move)
  • On stocks in confirmed uptrend with strong fundamentals

Your max loss = premium paid. That's your stop-loss built in.

Position Sizing for Options

Because options can go to zero, position sizing is critical.

Rule: Never put more than 2-5% of portfolio in a single speculative options position.

portfolio = 10_000  # $10,000 portfolio
max_options_risk = portfolio * 0.03  # 3% rule
max_premium = 300  # never pay more than $300 for a speculative options trade

For covered calls and cash-secured puts, size based on your willingness to own/sell the underlying stock.

Tools Every Options Trader Uses

| Tool | Purpose | |------|---------| | Options chain | See all strikes/expirations | | IV Rank/Percentile | Is IV high or low vs history? | | Profit/Loss diagram | Visualize payoff at expiration | | Greeks dashboard | Monitor delta/theta exposure |

Most brokerages (Interactive Brokers, Tastytrade, Think or Swim) include these free.

FAQ

Q: Can I lose more than I invest in options? A: If you buy options — no, maximum loss = premium paid. If you sell naked options (without owning the underlying) — yes, theoretically unlimited loss. Never sell naked options as a beginner.

Q: How do I know which strike to choose? A: For speculation, 0.30–0.40 delta balances cost and probability. For income (covered calls), 0.20–0.30 delta gives high probability of keeping the premium with reasonable premium income.

Q: What's the minimum account size for options? A: Most brokerages require $2,000+ for options approval. Practically, you want at least $5,000 to size positions properly without concentration risk.

Q: Should I trade weekly options? A: Weekly options have the highest theta decay and gamma risk. They're for experienced traders making precise short-term bets. Start with 30-60 day expirations while learning.

#options#trading#investing#risk-management#income
D
DevToCashAuthor

Senior DevOps/SRE Engineer · 10+ years · Professional Trader (IDX, Crypto, US Equities)

I write about real infrastructure patterns and trading strategies I use in production and in live markets. No courses, no affiliate hype — just documentation of what actually works.

More about me →