A free cash-secured put calculator for the ThinkorSwim option chain: one column shows each put's premium as a % of the stock price and its breakeven.
Download CalculatorFor educational use. Not investment advice.
In this tutorial I build a cash-secured put calculator for the ThinkorSwim option chain. It’s a custom quote column that prints 2 numbers next to every put strike: the premium you collect as a percentage of the stock price, and the breakeven price you’d own the shares at if you’re assigned.
This is Part 2 of our options calculator series, after the covered call calculator, and the code is a free download. It’s for traders who sell puts to enter a stock at a price they like, or to add to a position they already hold, and who want every strike and expiration priced at a glance.
A cash-secured put is a short put backed by enough cash to buy the shares if you’re assigned: 100 shares at the strike for each contract. You collect the premium up front. If the stock stays above the strike, the put expires and you keep the premium. If it finishes below, you buy the shares at the strike, and the premium you collected lowers your cost to the breakeven price.
I use cash-secured puts as a way to enter a stock at a price I’d be happy to pay, or to add to a position I already have. The calculator answers the 2 questions I ask about every strike: what does the premium pay, and where would I own the shares?
The cash-secured put calculator shows 2 numbers per put strike, split by a bar. Both numbers are based on the put’s last close. The table uses the 27 strike put from the video, which last traded at $1.02:
| Number | What it means | Formula | 27 strike put in the video |
|---|---|---|---|
| Left: premium return | The premium you collect for 1 contract, as a percentage of the cost of 100 shares at the stock’s current price | (put price x 100) / (stock price x 100) | 3.77% |
| Right: breakeven price | Your cost per share if you’re assigned, after the premium | Strike – put price | $27 – $1.02 = $25.98 |
With the column loaded, you can scan a whole expiration series for the strike whose breakeven matches the price you’d want to pay.
The cash-secured put calculator reuses the premium math from our covered call calculator, so I won’t repeat the full Excel walkthrough here. The left number is the same premium return the covered call column shows, applied to a put.
The right number changes. On a covered call, the second number is your return if the shares are called away. On a put, the outcome if exercised is buying shares, so the second number is the breakeven price you’d own them at.
The web calculator at the top of this page prices one put at a time. Enter the stock price, strike, premium and number of contracts, and it shows the premium received, the cash required (strike x 100 per contract), the premium yield and the effective entry if assigned, which is the same breakeven as the ThinkorSwim column. Add the days to expiration for an annualized yield.
The web calculator divides the premium by the cash you’d set aside (strike x 100) instead of the stock price. For an out-of-the-money put, its premium yield reads higher than the ThinkorSwim column, which divides by the stock’s current price.
If you’d rather have the column match the web calculator, here is my suggested edit. It isn’t in the video or the download: in the premiumPct line, swap close(getUnderlyingSymbol()) for getStrike().
def premiumPct = premium/(maxShares * getStrike());
The put calculator lives in a custom quote column on the option chain, the same place as the covered call calculator. Here are the steps from the video:
ThinkorSwim limits how many custom quotes you can use, and dashboard scripts share the same slots. If you run out, free one up or use the wheel calculator, which covers calls and puts in one slot. For help with adding custom code, see how to import a study into ThinkorSwim.
The put calculator’s code is 7 statements of thinkScript, and I wrote it from a blank custom quote in the video.
input maxPctThreshold = 0.5;
def maxShares = 100;
def maxContracts = 1;
maxPctThreshold carries over from the covered call calculator, where the label turns green at 50%. In this download the label is always white, so the input does nothing. maxShares and maxContracts are optional; I list them so they’re easy to change if you want dollar amounts later.
In this script the premium line multiplies by maxShares instead of 100. To see dollars for 2 contracts, set maxShares to 200 and leave maxContracts at 1: the percentage stays the same. Raising both would double the premium return.
def premium = maxContracts * close * maxShares;
def premiumPct = premium/(maxShares * close(getUnderlyingSymbol()));
close is the put’s last price, because the custom quote runs on each strike’s row. Times 100 shares, that’s the premium for 1 contract. close(getUnderlyingSymbol()) reads the stock’s close, so the bottom of the fraction is the cost of 100 shares at today’s price.
def newBreakevenPrice = getStrike() - close;
The breakeven is per share, so it subtracts close, the put’s price per share, from the strike. premium would be the wrong number here, because it’s already multiplied by 100 shares.
AddLabel(yes, AsPercent(premiumPct) + " | " + AsPrice(newBreakevenPrice), color.white);
AddLabel prints the premium return with AsPercent, a divider, and the breakeven with AsPrice, so each put reads like 3.77% | 25.98.
A hand check is the fastest way to trust a new custom quote, and the video does one on the 27 strike put. First, the column matched the wheel calculator on the same strike: 3.77% on both, and a breakeven of $25.98.
Then I commented out the label and printed the put’s close instead, which showed $1.02. The breakeven by hand is 27 minus 1.02, or 25.98, the same number the column showed. Once it matched, I deleted the debugging line and turned the label back on.
BYD (Boyd Gaming) is the stock I used to show the put calculator at work. It came from that day’s Slingshot Squeeze scan results, and the Slingshot Squeeze stats on its chart showed the setup had mostly been successful.
The Market Pulse line gave an entry price of $57.61, a level where I’d be a happy buyer on a pullback. Without the calculator, you’d work out by hand which put gets you in below that price. With it, you read the breakeven column:
| Expiration series | Put strike | Breakeven | Versus the $57.61 Market Pulse entry |
|---|---|---|---|
| 10 days | 55 | $54.88 | Below |
| 45 days | 60 | $56.80 | Below |
In the 10-day series, staying below $57.61 meant going down to the 55 put, with a breakeven of $54.88. In the 45-day series, the 60 strike put had a breakeven of $56.80, still below the Market Pulse line. That’s a put I’d be much more willing to sell. I read these numbers off the wheel calculator in the video, which runs the same put math.
In the video I put the premium on that 60 put at about $275 to $310 for 1 contract. The breakeven column uses the put’s last trade, which works out to $3.20 here (60 minus 56.80), so check the live bid and ask before you sell.
The put calculator is most useful next to a price on the chart where I’d want to own the stock. I pick that level first, from a tool like Market Pulse, then look across expiration series for a strike whose breakeven sits at or below it, and compare what each one pays.
The risk is owning the stock on the way down. If it falls through the strike, you’re assigned 100 shares and hold them through the rest of the drop, with the premium cushioning the loss only down to the breakeven. Decide where you’d sell the shares if the drop continues, and size the trade so that loss is a small, fixed part of your account.
A custom quote prints on both sides of the option chain, so loading the covered call and put calculators together puts both formulas on calls and on puts. Half of those numbers aren’t useful: the covered call math on a put, and the put math on a call.
The wheel option calculator is Part 3 of the series for Volatility Box members, and it combines both scripts into one. It shows covered call returns on the call side and this put math on the put side. Members also get the advanced covered call calculator, which adds a custom cost basis for shares you already own.
Most put calculator problems come from how custom quotes behave in ThinkorSwim:
maxPctThreshold. Set the input as a decimal, such as 0.03 for 3%, because the default 0.5 means 50%.Here is the suggested green-label edit. Replace the AddLabel line in the download with this one:
AddLabel(yes, AsPercent(premiumPct) + " | " + AsPrice(newBreakevenPrice), if premiumPct >= maxPctThreshold then color.green else color.white);
The label text stays the same. Only the color now depends on the premium return.
#Written by TOS Indicators - 2021
#Home of the Volatility Box
#Cash Secured Put Calculator
#Tutorial: https://www.tosindicators.com/indicators/cash-secured-put-calculator
#The following thinkSript code needs to be pasted in a Custom Quote script on the options chain.
input maxPctThreshold = 0.5;
def maxShares = 100;
def maxContracts = 1;
def premium = maxContracts * close * maxShares;
def premiumPct = premium/(maxShares * close(getUnderlyingSymbol()));
def newBreakevenPrice = getStrike() - close;
AddLabel(yes, AsPercent(premiumPct) + " | " + AsPrice(newBreakevenPrice), color.white);Want the .ts file and the one-click import? Both come with a free account.
Join 40,000+ traders using institutional-grade tools for ThinkOrSwim.
Get the Bundle