Skip to main content

Option Chain Relative Value Script for ThinkOrSwim (Free Download)

IndicatorFreeAdvanced41 min videoJun 14, 2020

An option chain script for ThinkOrSwim that shows how much each option has gained or lost in a few days, plus the 4 bullish plays I set up with it.

Option Chain Relative Value on a MSFT chart in ThinkOrSwim
On this page

Overview

In this video I walk through how I set up option plays in 4 stocks, all with a bullish bias: Microsoft, Facebook, Delta Air Lines and ZYXI (Zynex). Along the way I share an option chain script for ThinkOrSwim that shows how much each option's price has changed since a set number of days ago, as a percentage, so you can see which strikes gained the most in a sell-off.

The goal is a theta-positive portfolio: mostly selling puts on stocks I'd be happy to own, plus a few defined-risk trades: call spreads with at least a 1:1 risk-to-reward, and butterflies. It's a raw, unscripted look at my process, for traders who know the basics and want to see how the Greeks, the chart and the option chain fit together.

Key Takeaways

  • The Option Chain Relative Value script is a custom quote column for the ThinkOrSwim option chain. It shows each option's percent change in price since a set number of days ago: 5 days in the video, changed to 2, 4 or 1 for the other stocks.
  • In the video, SPY's 304 call had lost 44% of its value over 5 days, while the puts had gained 153%.
  • A second, commented-out calculation shows the option's price as a percentage of the stock price. The IBD rule of thumb is 4% or less at the money: SPY read 3%, Microsoft about 4% and ZYXI 10%.
  • I sell the out-of-the-money puts that gained the most, on stocks I'm willing to own, 30 to 45 days out. In the video, Microsoft's 145 put at $0.55 gave a break-even of $144.45.
  • For defined risk I used call debit spreads with at least a 1:1 risk-to-reward, 190/195 in Microsoft and 22.5/25 in ZYXI (risking $70 to make up to $180), plus butterflies around $37 in Delta Air Lines.

What the Option Chain Relative Value Script Shows

The Option Chain Relative Value script is a custom quote column for the option chain in ThinkOrSwim's Trade tab. It compares each option's closing price today with its close a set number of days ago and prints the change as a percentage, so you see at a glance which strikes gained the most.

In the video the lookback started at 5 days, which reached back to the Monday before the sell-off, the peak in most stocks. On SPY, the 304 call was 44% cheaper than 5 days earlier and the puts had gained 153%. The lookback is one number in the script, and I changed it for each stock:

StockLookback in the videoWhy
SPY5 daysBack to the Monday before the sell-off
Microsoft2 days5 days didn't fit Microsoft's move. I wanted the puts that gained the most in the last 2 days.
Delta Air Lines4 daysI counted back the days of the sell-off on the chart
ZYXI1 dayTo see what the puts did in Friday's trading

A change beyond 50% in either direction prints in green or red, so a liquid chain shows plenty of colored numbers. To change the lookback, open the custom quote's script from the Trade tab, edit the number of days and click Apply.

Option Price as a Percent of the Stock Price

The option-to-stock price calculation is the script's other condition, and it's commented out by default. The formula is the option's price divided by the stock's price, following the IBD approach: an at-the-money option should cost 4% of the stock price or less.

StockOption price as a percent of the stockMy read in the video
ZYXI10% for the option I was pricingInsane: far too expensive to buy
MicrosoftAbout 4% at the money, 33-day seriesEven a safer stock touching 4% is a sign
SPY3% at the money, 14-day seriesBelow the 4% mark

Seeing a percentage beside each strike saves the mental math as you scan down the chain.

The Option Greeks I Review First

The option Greeks describe how an option's price responds to time, volatility and the stock's price. I review them at the start of the video:

  • Theta is time decay, the value an option loses each day. It speeds up inside 30 days to expiration, so I sell options about 30 to 45 days out.
  • Implied volatility (IV) is uncertainty, priced in. High IV makes premium expensive, so I'd rather sell it. Low IV is when buying makes more sense: you're long vega and want volatility to expand.
  • Delta is directional exposure. A 51 delta option gains about 51 cents a share when the stock rises $1.
  • Gamma is the rate of change in delta. Vega is how much the option's price changes for a 1-point change in implied volatility.

IV percentile shows where today's implied volatility sits against its own range over the past year, so a low reading means options are cheap next to their usual level. ThinkOrSwim shows it below the option chain. In the video it read 31% in Microsoft, 33% in Facebook, 32% in Delta Air Lines and 52% in ZYXI.

Every options trade is built from 4 pieces: buy a call, sell a call, buy a put or sell a put. These are the Greeks each piece gives you:

PositionDeltaGammaThetaVega
Buy a callPositivePositiveNegativePositive
Sell a callNegativeNegativePositiveNegative
Buy a putNegativePositiveNegativePositive
Sell a putPositiveNegativePositiveNegative

Microsoft: Short Puts and a Call Debit Spread

Microsoft was one of the 2 conservative names in the video, a stock I don't mind owning at a lower price. On the daily chart it was still on its way to the 127.2% Fibonacci extension at $206.46, and it had bounced into a cluster of Fibonacci retracement support from $184 to $186. Our Fibonacci Trading Course covers how I draw these levels.

For timing, I like the 1-hour Edge Signals arrow after price bounces into one of these zones. If price breaks out of the zone instead, you never get the arrow and your capital is spared.

Selling Puts

I'd be a happy buyer of Microsoft around $165, near the 50% retracement and the 200-day moving average. On the 33-day chain, the 165 put still paid a good premium and had gained 75% over 5 days.

Five days didn't fit Microsoft's sell-off, so I changed the lookback to 2. One strike stood out most, but it was quoted at 1 cent to 50 cents, too wide to expect a fill. The 135 to 155 puts had also gained a lot and still paid manageable premiums.

The 145 put paid about $0.41 to $0.55. At $0.55, the break-even is $144.45, below the halfback level on the chart. If Microsoft finishes below the strike, you're assigned 100 shares per put sold. On the Analyze tab the position showed positive theta and delta, with negative gamma and vega.

If I'm assigned, I can sell covered calls against the shares and run the wheel. Our free covered call calculator shows the return on each call in the option chain, and the members-only Wheel Option Calculator covers both sides.

The Defined-Risk Version

A call debit spread pairs a long call with a short call at a higher strike, and I set it up often in this video. The short call offsets part of the long call's theta, more so with strikes close together, but gives up some delta, vega and gamma and caps your profit. To me that trade-off is worth it more often than not.

For Microsoft I'd give the trade more time: the 47-day series or the next monthly options, which I find are usually the more liquid ones. With IV percentile at 31%, buying a spread still made sense. The at-the-money spread paid less than 1:1, so I moved up one strike to the 190/195 call debit spread for a 1:1 risk-to-reward.

Its break-even was $192.39, above the stock price, with the 127.2% extension as the target. If Microsoft chops sideways instead, the short call offsets part of the theta loss.

Facebook: Selling Puts at the Halfback Level

Facebook (now Meta Platforms) was set up much like Microsoft: still on its way to the 127.2% extension, with a Fibonacci cluster near $221.29 that I'd like price to touch first, and a 1-hour Edge Signals confirmation already in.

Squeeze momentum on Facebook was positive in the near term but fading on longer timeframes, with red on the 4-hour and 2-hour, so I expected a choppy grind higher. Our free multi-timeframe Squeeze indicator shows those squeezes on one chart.

IV percentile was 33%, with implied volatility around 46% to 48%. On the 33-day chain, the 165 put, with good open interest, was up 300% over the sell-off, and the 180 and 185 puts paid more. I'm not a happy buyer at $228, but at the halfback level near $180 or below, I would be.

I wouldn't turn this into a put spread. If Facebook falls that far, my pain is buying a stock I don't mind owning, near $180. The other choice is an at-the-money call spread like Microsoft's, paying less than $2.50 for a $5-wide spread so the reward at least matches the risk. A call bought outright loses value fast if your timing is off.

Delta Air Lines: Selling High IV With Butterflies

Delta Air Lines was the high-IV play in the video, picked for the airline sector's relative strength. Its squeezes, from the 3-minute to the 2-hour chart, showed positive momentum almost across the board. On the daily chart it had hit its 127.2% and 161.8% extensions, pulled back, then gapped higher after an Edge Signals arrow.

With a 4-day lookback, almost every put in the 33-day series had gained, and a cluster of strikes stood out at 173%, 154% and 176%. Implied volatility was 114%, and up to 143% in the nearest 5-day expiration, while IV percentile was 32%.

At 114% IV I'd rather sell premium than pay for it. The 18 put in that cluster paid $46, a break-even of $17.54, near the previous low. The Analyze tab's max loss assumes the stock goes to zero, but the real pain is being assigned shares at the strike.

Butterflies Around a $37 Pin

For defined risk, I looked for Delta Air Lines to grind up and pin near $37 by the July 17 expiration, 33 days out. A butterfly buys 1 option at a lower strike, sells 2 at the middle strike (the body) and buys 1 at a higher strike. It pays the most if the stock finishes at the body. I priced 4 versions:

ButterflyStrikesCostWhat the Analyze tab showed
Put butterfly34 / 37 / 4033-cent debit$265 max profit, only at expiration. About $16 if Delta rips higher sooner. Negative theta and vega.
Broken-wing put butterfly33 / 37 / 40Net credit$43 max risk to the downside, no upside risk, a $57 gain if Delta overshoots
Call butterfly34 / 37 / 4048-cent debitPositive delta, negative theta
Skewed call butterflyWings skewed in my favor80-cent debit$80 max loss. A $20 gain (25%) if Delta overshoots, about $57 (71%) near $37. Positive theta.

The plain butterflies had negative theta, so they lose money every day I'm wrong. A broken-wing butterfly has wings at uneven distances from the body: moving the lower put from 34 to 33 turned the trade into a credit. The put side had little volume at 37, so I also priced calls, and the skewed call version needs no stop because the $80 is the risk.

Commissions matter on a trade this small. A butterfly's 4 contracts mean 8 contract commissions for a round trip, and at the 75 cents a contract I used in the video, that's $6 of the put butterfly's $16. With $0 options commissions, you keep the full $16 on $33.

ZYXI: Puts and a Spread on a High Short Interest Stock

ZYXI (Zynex) was the most aggressive play in the video. It was in a strong uptrend with an Edge Signals arrow, had been on the IBD 50 list for some time, had shown up on the Volatility Box live scanner, and had short interest of 18.86%. It hadn't reached its 127.2% extension yet.

The option chain was another story. IV percentile was 52%, there were no weekly options, and the stock was hard to borrow, so I expected an illiquid chain. I set the lookback to 1 day to see what the puts did in Friday's trading.

On the nearer expiration, the 20 put had gained 15% and paid about 65 cents with the stock at $22.19, a break-even of $19.35, on a wide spread. On the 33-day chain I skipped a strike with an open interest of 1. The 15 put had gained 95%, with 97 open contracts and 14 traded that day.

The 15 put paid $60, 3 days before entering the last 30 days, where theta speeds up. Its $14.40 break-even sat between the 50-day and 200-day simple moving averages, near old resistance. If you'd own ZYXI there, getting paid $60 to wait is how I'd build a longer-term position.

A Call Debit Spread for the Squeeze

If you only want to trade the squeeze, I'd skip buying calls at around 115% IV: whether it's a 60 delta or a 70 delta, I know I'm overpaying. My first call debit spread risked $155 to make $95, worse than 1:1.

The 22.5/25 call debit spread cost 70 cents: $70 of risk to make up to $180 if ZYXI finished at $25 or higher, with a break-even of about $23.19 and the chart's target near $26.10. These trades are lower-probability and lower-risk by design: the setup supplies the edge, and the spread keeps the cost small.

How I Use the Column When Selling Puts

The relative value column is a filter for picking strikes, and the chart still decides the trade. These are my steps from the video:

  1. Pick a stock I'm willing to own and find the price where I'd be a happy buyer, like a 50% retracement or the 200-day moving average.
  2. Go out to the expiration about 30 to 45 days away.
  3. Set the lookback to the start of the recent sell-off, and look for the out-of-the-money puts that gained the most.
  4. Skip strikes with little open interest or volume, or a bid and ask too wide to fill.
  5. Check the break-even against the chart, and check the Analyze tab for positive theta.

The break-even on a short put is the strike minus the premium. Our free cash-secured put calculator shows it, with the premium return, for every put strike.

A short put can be assigned, which means buying 100 shares at the strike for each contract, and the stock can keep falling after that. Sell puts only where you want to own the stock, and size them as a small part of your account. A bought option or debit spread can go to zero, so the premium you pay is the amount at risk.

Common Problems With the Script

Most option chain script problems come from thin trading:

  • Loading errors or blank cells. The script compares closing prices, and those need trades. A strike with no closes has nothing to compare, so ThinkOrSwim shows a loading error or no number, as on ZYXI's chain.
  • After-hours quotes. I recorded on a weekend, so the bids and asks were after-hours. Wait for live pricing before you size a trade.
  • Adding the column. The script goes in a custom quote on the option chain. Our covered call calculator tutorial shows how to add one, step by step.
  • Finding the code. This page has no download or Code tab for the script. In the video I mention that it's linked in the YouTube video's description.

Download

Option Chain Relative Value Script

Download the complete Option Chain Relative Value Scanner for ThinkOrSwim. This download includes:

  • Custom ThinkScript for comparing option prices across time periods
  • Percentage change calculations for puts and calls
  • Option-to-stock price ratio analysis tool
  • Customizable lookback period settings

Download free

Video: Option Chain Relative Value, built line by line

41 minutes on YouTube.

Watch on YouTube

Questions

What does the option chain relative value script show?

It shows each option's percent change in price since a set number of days ago, as a custom quote column on the ThinkOrSwim option chain. In the video, with a 5-day lookback, SPY's 304 call read 44% cheaper while the puts had gained 153%. A second, commented-out calculation shows the option's price as a percentage of the stock price.

How do I change the lookback period in the script?

Open the custom quote's script from the option chain in the Trade tab, change the number of days and click Apply. In the video I used 5 days for SPY, 2 for Microsoft, 4 for Delta Air Lines and 1 for ZYXI, matching the stretch of trading I wanted to measure on each stock.

What is the IBD 4% rule for options?

It's a rule of thumb that an at-the-money option should cost 4% of the stock price or less. In the video, SPY's 14-day at-the-money option was 3% of the stock price, Microsoft's 33-day option about 4%, and ZYXI's option 10%, which told me its calls were too expensive to buy outright.

Why does the option chain show loading errors?

The script compares each option's closing prices, and an option with no trades has no close to compare. ThinkOrSwim then shows a loading error or no number. In the video, ZYXI's illiquid chain had many blank strikes, while more liquid chains showed more green and red numbers.

How many days out should I sell puts?

I sell puts about 30 to 45 days out. Theta decay speeds up inside 30 days, so starting a little earlier puts you in the trade for the fastest decay. In the video I used the 33-day series, and ZYXI's 15 put was 3 days from crossing the 30-day mark.

What happens if a short put is assigned?

You buy 100 shares at the strike for each put you sold, and the premium lowers your cost. In the video, Microsoft's 145 put at $0.55 gave a break-even of $144.45. From there, I'd sell covered calls against the shares and run the wheel.

Why use a call debit spread instead of buying a call?

A bought call has negative theta, so it loses value every day the stock doesn't move. Selling a higher-strike call offsets part of that decay, at the cost of capping your profit. In the video I looked for spreads with at least a 1:1 risk-to-reward, like Microsoft's 190/195 call spread.

What is a broken-wing butterfly?

It's a butterfly with wings at uneven distances from the body. In the video, moving Delta Air Lines' lower put wing from 34 to 33, around a 37 body, turned a 33-cent debit into a net credit with $43 of downside risk and no upside risk.

Get each new indicator by email

One email on Sundays with the week's new tool and its code. A free account also unlocks every .txt download.

No credit card. Unsubscribe anytime.