Transcription
If you sell options, covered calls, cash secured puts, you probably stared at an option chain and wondered which contract is actually the best one to sell or buy. So, I decided to build a tool to help, a free option scanner made with Cloud Code. I built it in a few nights. It finds the best options from Yahoo Finance option chains and shows them to you in a chart and two tables. Let me demonstrate.
>> [snorts] >> Let's say you have 100 shares of Disney and you're interested in making some extra income on these shares by selling a covered call. You'd like to keep the option for at least a year so you can be taxed at the long-term rate on the premium you collect. It also works for shorter dated options. Let's do the scan and see what it finds.
So, the spot is the stock's current price shown here and on the chart, this vertical line. It found three expirations and you can select each one here in the drop down and that will update the chart as well as the tables here. The one it selects first is the expiration that contains the best option shown in the bottom table. This one. And you can see the next earnings date. Earnings have a big effect on option volatility when they're near.
Now, let's take a good look at the chart. Each dot on the chart is a call for Disney at this expiration that meets our scan criteria. The bigger green dots are the more attractive options, meaning their volatility is higher than what the other options suggest it should be. This expiration only has one attractive option. But, look at this one. It has four. But, none is good as the one in the other expiration. The dashed line is what the option scanner says each strike's implied volatility should be. To be fancy, it's a fitted volatility surface. Again, the green dots are sitting above the line. That means the market is pricing those options richer than their neighbors. More premium for the same amount of risk. Those are the calls to consider selling. The smaller red dots are the opposite, cheaper than they should be. If you're buying calls, you'd be interested in those. Hover over any dot and you get the strike, the expiration, how many percentage points it sits above the surface, the delta, open interest. That's valuable info to help you decide whether to sell it. Also, consider your situation and circumstances. We'll spend a little more time on the chart and then go over the two tables. Then we'll talk about what you need to set this up and start using it. It's quick and easy. And lastly, I'll describe how I made it with Claude. Please consider liking and subscribing if you're enjoying this content.
All right, back to the chart. It provides a great way to see the attractiveness of all your options for a given expiration. A stock's option chain should form a smooth surface plotting the implied volatility against the strike. It traces a shape, the volatility smile. Smooth transitions between strikes. Market makers like to keep it that way. The dashed line in the chart is that smooth shape fit to the chain. When an option's actual IV sits noticeably above the line, something made it more expensive than its neighbors. A stale quote, a thin market, event risk that isn't evenly distributed, or just an inefficiency. That's the option you want to consider first to sell. The color of the dot tells you the gap in percentage points between the actual IV and the fitted surface. We call it IV plus PP. Small gaps under three percentage points means the option is uniformly priced and the ranking is mostly just noise. If you can find some with five or more points above the line, it could be a genuine signal.
Let's scroll down to the two tables. The first is the chain view. It shows every option in the expiration selected and the chart drop down above sorted by strike. It's like reading an option chain from your broker with extra information. The rows are shaded. Green means it's IV plus PP is meaningfully above the average for that expiration, like this one. Gray means its price is close to its expected price and red, which this we don't have any red ones, means the price of the option is less than usual. So, the shading does the filtering for you. You can see in seconds which strikes have rich premium and which ones are unremarkable. The other shadings in the table are yellow. Yellow bid and ask cells mean the spread is wider than typical for this chain. Spread is the gap between what buyers will pay and sellers will accept. A wide spread means your real execution price may land worse than the mid price suggests. Yellow OI or vol means open interest or today's volume is low, which makes it harder to fill at a good price. Hover over column headers with yellow shaded cells and it explains what the yellow color means. You can also hover over the IV plus PP column header for a more detailed explanation of it.
Let's move down to the top candidates table. The highest ranked options by IV plus PP pulled from every expiration. All chains are shown here. The top table showed me everything for a single expiration sorted by strike, but this table shows me the best 10 regardless of expiration or strike sorted by IV plus PP. Here's the delta column. Delta's the approximate probability of being assigned at expiration. A delta of 0.30 means roughly a 30% chance the stock closes above your strike at expiration for a covered call. Annual percent is the annualized yield on the premium you'd collect for calls relative to the stock's current price. It's a good measure of how much income you'd make by selling the call and should usually move in the same direction as the delta. More risk of losing out on underlying gains means more income. For puts, annualized percent is relative to the strike, which is the capital you'd be putting at risk. Annualized percent let you compare options across different expiration on the same income footing.
Let's talk about IV plus PP. This is the key metric to understand. This is wonky but an important concept to understand when using this tool. PP stands for percentage points and that is deliberately different from percent. They are not the same thing. Here's why it matters. Implied volatility itself is already a percentage. 45%, 50%, so on. When you talk about the gap between the two of those numbers, you have to be careful. Going from 45% to 48% is plus three percentage points. Calling that plus 3% would be wrong. The relative percent change there is more like plus 6.7%. So two practical takeaways from that. One, when you read a plus five PP signal in the table or see a green dot floating five units above the fitted curve, that's an absolute IV gap. Same unit on every strike and every expiration, which is what makes the ranking comparable across the whole chain. Two, do not confuse IVPP with a return. A plus five PP option is not paying you 5%. The annual percent column of the table is your actual annualized yield on the premium collected or paid. That's where you can check on the real return on capital. So, PP is the language of volatility difference. Once you've got that distinction, then you'll have a better understanding of the tool.
Let's see what other filters we have to play with. If you have an existing option you'd like to roll, you can check this roll an existing radio button. Fields appear for your current strike and expiration. I currently have a December 140 Disney call I'm considering rolling. So, let's put that in. You have to be accurate with your strike and expiration date if you want the net credit to show up correctly. Mine's December 18th, so we'll hit scan and see what it finds. There's the best one we talked about earlier. And here you see a new net credit column show up in both tables. So, everything's coming up as a credit here, which is good. The best one would give us a credit of a dollar 68. If these were negative values, it would be a debit roll and you'd have to pay more to close the existing call than than you're getting for selling the new call.
Flip the direction radio button from sell to buy and several things invert. You're looking for the most underpriced options now. The dots furthest below the curve. and by mode the color scale flips. Green now means cheap relative to the surface. So the green dots below the curve are the candidates. You can set it to calls, puts, or both. You can change the minimum days to expiration or the max. Zero means no max. And then you can also set the open interest, the minimum open interest. Here's the delta range slider. The default is 10 to 75. That's a wide range that covers everything from conservative out of the money strikes to some in the money ones. Set this to whatever your preference is. And the top end value let you control how many candidates you want to see in the bottom top candidate table across all expirations.
The portfolio tab is a nice feature that could save you some time. You can upload your entire brokerage transaction log CSV format. It supports Schwab, Robinhood, Fidelity, and Merrill. You have to tell it which format. The tool detects every open position in the log and scans each one for good options. This doesn't actually upload your log anywhere. It all stays local. I'll do one of my Schwab accounts just to demonstrate. Found 10 positions. It's scanning them all. And it shows you the chart for each one.
Now, how would you run this yourself? This is all explained in detail in the option scanner read me in the repo. Step one is to get the repo. Go to the GitHub repository linked in the description. Either download the zip or clone it. Make sure you're in the stockpile repo. You'll need get installed if you want to clone it, and step two is make sure Python's installed. You'll need Python 3.12 or newer. You can go to python.org, download and run the installer for your platform. Then step three, this project uses UV, which is a fast Python package manager. One command installs it. On Mac or Linux, do this, and on Windows, do that from PowerShell. Then step four is to install the dependencies. And UV does it all. All you have to do is run this command. That installs everything, Yahoo Finance, Streamlit, etc., and takes about 30 seconds the first time. Step five, start the web app from the stockpile directory, one command. Let's run it. That opens the app in your browser at localhost port 8501. From here on, you don't need the terminal, just type in a ticker, hit scan, and have fun. It's Again, the readme in the option scanner folder has the full setup instructions. Everything in this video is documented there.
One important thing, if you use the portfolio scanner, everything stays on your machine. It never leaves, and Anthropic never sees it. The only exception is that it reaches out to Yahoo Finance to get quotes.
Now, let me show you what it actually took to build this because I think it might surprise you. I built 95% of this tool, the scanner, the IV surface model, the roll the roll mode, the portfolio scan, the HTML reports, the Streamlit web UI, and about 20 back and forth messages with Claude Code. Here's a sample of what those conversations look like. I asked, "Thinking of building a tool to look at option chain and help me pick the best option to sell. I want to target leaps for long-term capital gains on premium. Note the earnings date." Claude suggested the UI to use and built it in a few minutes once I confirmed. I asked, "How do I run it?" Claude told me, "Let's add a delta range filter. Let's implement HTML output, buy mode, and short-dated options. How about making a full portfolio scanner for from a broker transaction log? We can leverage the code we used for the other tools in this project. Don't stop and ask me anything, just do it." I described what I wanted, Claude built it, I tested it, reviewed, came up with new ideas, asked for changes, a couple more days of polish, and here it is. Claude also helped me tremendously with the YouTube script. And guess who made this slide? It wasn't me.
The result is just under 2,000 lines of Python across 10 source files, option chain fetching, IV surface fitting, earnings deduction, HTML report generation, portfolio parsing, and the Streamlit app, and several other things. 95% written part-time in a couple of nights. Then some polish this weekend while working on this YouTube episode. I'm going to make a claim here that I can't prove, but I believe is in the right ballpark. This took roughly 1/20th the effort it would have taken BC, before Claude. If I even considered it before, I would have probably given up. Think about what before Claude looks like for a project like this. You'd spend an evening just researching the right library for IV surface fitting, reading documentation, looking at Stack Overflow answers that are 3 years old and half wrong, another evening getting the option chain data in a usable shape, a week on the HTML report, another session on the Streamlit UI. You'd hit walls, debug things that shouldn't be broken, context switch back to the docs to keep them updated, and a hundred other things. I didn't do any of that. I described what I wanted. Claude knew what libraries to use, knew the right mathematical approach, wrote the boilerplate, and kept all the context in his head across sessions. My effort was deciding what I wanted, not figuring out how to build it. I did occasionally coach Claude into better refactorings. And he made a few strange decisions about things to display, but easily fixed with iterations. He messed up just enough so I can still feel useful as a developer, rather than just an idea man. The bottleneck used to be implementation. Now it's just knowing what to ask and nudging Claude in the right direction.
One caveat about the data source. Everything here comes from Yahoo Finance, which is free and requires no account. That's a real advantage for getting started, but Yahoo Finance has limitations. The implied volatility numbers it returns are sometimes stale, especially on thinly traded strikes where the last trade was hours or days ago. The Greeks aren't provided at all. Delta here is calculated from Black-Scholes using Yahoo's IV, which means if the IV is stale, the delta is too. And for leaps specifically, wide bid-ask spreads and low volume means some of the IV readings are noise rather than signals. None of this breaks the tool. It still surfaces real patterns, but you should treat the output as a starting point for further research, not a trading signal on its own. Always verify the bid-ask spread on your broker before acting on anything. Stale IV also tends to show up as a single dot far from its neighbors with no obvious reason. If something looks too good to be true on the chart, it usually is. A natural future enhancement would be plugging in a better data source, like the Schwab developer API, free for account holders, that returns full option chains with real-time quotes and proper Greeks. That would make this significantly more accurate, especially for the IV surface fitting. And that's on my to-do list.
And the fine print. This tool is free, open source software provided as is with no warranty of any kind. There's no guarantee of accuracy, completeness, or fitness for any purpose. Nothing this tool produces should be interpreted as a guarantee of any trading outcome. This is not financial advice. Option trading involves substantial risk of loss and is not right for every investor. Do your own research before acting on anything this scanner services. The author is not responsible for any losses or other damages from using this software. That's it. Hope you find the option scanner useful. Please leave a comment, good or bad. Let me know how you're using it or how I could make it better. Take a look at my previous two episodes about other tools in this repo. They should have popped up a few seconds ago.