The Option-Graph Project Option-Graph.com

Final Checks and Testing

    Your calculator is now complete except for turning it into a stand-alone program that does not need Visual Basic to run.

     Before we create the final ".exe" file though, we should do a couple tests.

     First, check through all the "code behind", on "EquityOption.vb", on "Form1.vb", and on "OptionCalcs.vb", and look for anything underlined with blue squiggly lines or red underscores.

     A blue squiggly line usually means the Name of something has been misspelled. If you find anything like that, go back to the step where that item was added and check the spelling of the Name of the control.

     A red underscore usually means something is missing or superfluous, such as a ")" that should be there, or an extra one that should not be there.

     If you get any of these type of error marks and can't figure out what the problem is, remove the function and re-paste it from the page where it was supplied.

     If you get error marks or error messages that you cannot figure out, just copy the entire function where the problem appears and send it in an e-mail to this contact
and we will take a look at it.

     Second, Visual Basic provides a way to test your program from within Visual Basic, without making it an .exe file first. This is called Debugging.

     Look at the Visual Basic menu bar and you should see a green triangle. If you hover your mouse over the green triangle it should say "Start Debugging (F5). You can either click the button or press the F5 key to start debugging your program.

     Debugging your program will make it run, exactly as if it was a stand-alone program. You should be able to enter all the details about an option except the IV, click the "Find IV" button, and have it display the IV for you. Or you can enter all the details about an option except the price, click the "Find Price" button, and have it display the price that matches the IV.

     Try looking at option quotes from your broker or any other source, preferably one that shows "bid", "ask", and "IV" values. Enter all the option details and calculate the IV or price.

     The price should calculate as somewhere between the "bid" and "ask", in other words, midmarket, if you use the correct IV. The calculated IV at a midmarket price should come very close to the IV from the quote.

     If things don't seem right, it could be because the options you are looking at are on a stock that pays a dividend. A dividend will make actual put prices look too expensive, and actual call prices look too cheap, compared to what the calculator shows. You can either look up the yearly dividend and enter it in the calculator, or you can test option prices on a stock that you know does not pay a dividend.

     On the other hand, you may want to test to see that the dividend function is working properly. Try looking at the options on a stock such as Verizon, symbol VZ, which pays a $2.00 yearly dividend as of this writing. If you do not enter the dividend amount, actual put prices will be more than the calculator shows, and actual call prices will be less. Now enter 2.00 in the dividend field and recalculate, and the calculated prices should be pretty close to the actual market.

     Another reason the calculator may not match actual prices is because actual prices usually show a "volatility smile" or a "volatility smirk". A volatility smile refers to an ATM option having a certain volatility, and both OTM and ITM options having higher volatilities. If you graphed the volatility versus strike price you would get a "smile" shape.

     To make your calculator match the actual prices, you need to use the actual IV. You cannot assume volatility at different strike prices is the same, and you cannot assume volatility on calls and puts, even at the same strike price, is the same. You cannot assume volatility on different expiration dates is the same.

     One final reason for actual option prices not matching your calculator is the current "risk-free" interest rate. We have set our default rate to "near zero", or .005 (1/2 of 1%) to match the rates at the current time. In the future, you may need to use a different value, such as .05 to mean "5%".

     AN IMPORTANT TIP for entering numbers into the calculator: You do not actually need to use the up-down arrows in the various NumericUpDown controls. It is usually faster to double-click the number that is already in the control, and type the new number you want, including any decimal point. If you try to type something other than a number, the program will "ding" you.

     TIP #2: The calculator should show you the MIDMARKET price, meaning somewhere between the "bid" and the "ask". It cannot know anything about the actual "bid" and "ask" prices in the market.

     The "bid" price in the market usually comes from traders trying to get a bargain when they BUY an option, and it could be 1 cent or $1 below the midmarket. The "ask" price in the market usually comes from traders trying to get a bargain when they SELL an option, and it can also be near or far from midmarket.

    

Home Page Downloads
Previous Step: The Code Behind the Buttons
Next Step: Making and Using the .EXE File

Copyright 2017 option-info.com Privacy Policy

Questions, corrections, suggestions, comments to: this contact

Want to learn options, find strategies? Visit www.option-info.com