### Option Software Screnshots

Well anyway like I said in my last post, I wrote a real-time options probability calculator in C#. This is to aide the mechanics of evaluating potential options trades once I have a stock I am intersted in. I still need to develop software to aide the picking of the actual stocks.

Screenshot 1: The options quote and greeks (Click on the picture for a larger image)

Screenshot 2: The option probabilities (Click on the picture for a larger image)

Here's how the software works. I have a separate tabbed worksheet for each option strategy type. Currently, only 2 worksheets are implemented: Naked Puts and Naked Calls. (Straddles and combinations will probably be next.) Once you enter a stock symbol, a list of available contracts is presented to you, and a real-time quote of the stock symbol turns on at the top of the page, above the option worksheets. I would prefer to be able to load all of the option contracts for a given security in the worksheets. Unfortunately, interactive brokers limits the number of real-time quotes I can subscribe to at any particular time, and that would exceed the limits. Therefore, the contracts must be evaluated in the worksheets, one expiration date at a time, which the user can pick. There is a second set of expiration dates which is disabled. This is for the future implementation of the time-spreads worksheet.

Once the user picks the expiration date, all of the strikes with quotes are automatically selected. Alternatively, the user can choose specific strikes if desired. Once the user chooses which strikes to evaluate, by clicking the "Load Options" button, the worksheets become "alive". In the case of the Naked Put worksheet, real-time quotes of all of the puts for the selected strikes start to update, along with the computed quantities. In addition, the "cumulative-weighted-IV" for all of the strikes at the current expiration begins to be displayed. This is a weighted average of all of the contracts individual implied volatilities, weighted by how far out of the money they are, and how much volume they have traded today. This quantitiy is only updated every 5 seconds.

The first screenshot displays the basic option quote, the "greeks" from the black-scholes model, and the implied volatilities for each contract. All of these are displayed in real-time, as the quote updates. The second screenshot shows the probabilities. Most of these are also displayed in real-time, but some are computed at a fixed 5 second interval.

Profit Prob: This is the probability of profit at expiration. Given a volatility assumption, this is the probability that the stock will be above the "break-even" price for a particular naked put sale at the put's expiration.

No Touch Prob: I call the next quantity the "No-Touch Probability". This is the probability that the put will never go below it's strike between now and the expiration date. Any time the stock drops below the naked put's strike price I will definately be "sweating" and may close the trade, so it is very nice to have an idea of how likely this is ahead of time. The free web-based probability calculator I was using doesn't compute this quantity.

Expected Profit: Assuming you could make the exact same trade a large number of times, and the stock's movements were distributed randomly every time with the given volatility, this is how much money you would expect to make per trade at the expiration date. To compute this quantity, I intigrate the probability function multiplied by the option price at every possible stock price. The method of intigration I use is trapazoidal intigration, and is very basic and slow, so this quantity is only updated every 5 seconds. I'm not sure if this value is being computed accurately. The values computed seem reasonable for the out of the money options, but they seem to balloon when the option is in-the-money. I don't sell naked in-the-money options so this isn't terribly important in itself, but this reduces my confidence in the code. Until I've used the program more, and gotten more opportunities to compare the computed values to the free web based probability calculators, I won't feel very confident using this value.

Yield: This is simply how much the premium the option would yield, if the option were to expire worthless and no leverage were to be used. Basically, this is the premium divided by the strike price (and then scaled to an annualized basis.)

Expected Yield: This is the same as the yield above, but instead of the premium, I use the expected profit for computing the yield.

The controls above the options quote allow the user to change the parameters used for the calculated fields:

Volatility: The volatility assumption is the key input for all of the computations the program makes. All of these computed numbers are only as accurate as the volatility assumption. These radio buttions allow the user to change the volatility used for these calulations. By default, for each contract, the volatility used is that contract's implied volatility. Alternatively, I can specify to use the cumulative-weighted IV for all of the options, or put in my own assumption. For example, right now the implied volatility for the S&P is extremely low. So, if one were to sell a SPY naked put, it might make sense to put a higher volatility estimate than the current implied volatility, since volatility tends to mean-revert. If there were naked puts that looked favorible with the low volatility estimate, they would be less favorable with a higher volatility, so entering a higher volatility estimate would be more conservative.

Price for Calculations: This allows you to choose which market quote to use for the calculations. By default the put worksheet uses the curent bid. If I feel that it might be possible to split the bid, I could use the halfway point, or if I felt that I could get filled on the offer I could use the offer price instead. For getting the correct implied volatility, it might make sense to use the last sale price in a liquid option. After the bell, I have to use the Closing price.

Black Scholes Parameters: The last set of controls are for entering the specific values required for the black-scholes model.

Recalculate Button: After you change the black-scholes parameters, the worksheet will not reflect the changes for a particular contract until the next quote from IB forces an update. Clicking this button, updates all of the calculated values immediately.

Weighted IV: This is a weighted average of all of the contract's implied volatility, where each IV is weighted accourding to the volume of contracts traded so far today, and it's distance from the underlying stock's current price.

## 2 Comments:

Impressive. Would it be possible to port the software to a web interface and allow other interactive broker users to pull quotes specific to what they would like to see?

Would you consider selling the software, or is it just for personal use?

If you did sell, would there be liability if a function of yours was wrong and someone lost money from it?

To put it in a web-based interface and have it interact with the users TWS software would be problematic I think. It might be feasable, though if it was ported to java. An alternative, would be a non-real-time web-based interface. That could be implemented pretty easily, given a data source. The data could probably come in the form of links to finance.yahoo.com's 15 minute delayed quotes. Galatime does this, so it must be possible.

I have definately considered the possibility of developing this into a commercial application. (After all writing software and selling it is what I do for a living.) Once the program is a little more complete, and if it proves useful to me, I might post a free beta on this blog and elite trader to see how much interest there is. If the interest turned out to be there, I could potentially get my company behind it, which would bring substantially larger resources into the development.

I actually like the idea of a web version (written using Java Script and .NET XML web services) I might go ahead and do that just for fun, and see how much blogad clicks it could generate.

Liability I'm sure would be an issue. This could be mitigated with the relevent disclaimers I would think.

Right now writing options software (and even trading options) are really just a hobby.

Post a Comment

## Links to this post:

Create a Link

<< Home