Has anyone seen any algorithms / pseudo code or actual code for calculating the greeks or implied volatility? I've seen the different calculus formulas but haven't seen any code-like algorithm. Anyone else?
Take a look at: Option Pricing Models and Volatility Using Excel-VBA (Wiley Finance) By Rouah and Vainberg ISBN-10: 0471794643 There's a lot of Excel-VBA code in there that addresses your question.
Thanks, I found an excel implementation and will look at creating a version for my Java market analysis tool. Cheers,
Hm, the excel implementation (the popular one that advertised as an Excel Options Workbook) is bugged. Has anyone seen other psuedo-code or source code for computing IVol?
I think I have it all working now. The normal distribution part was not calculating correctly. My algorithm seems to work pretty good for most symbols, but sometimes it disagrees with morningstar.com but agrees with other option calculators. Does anyone have insight into how morningstar is calculating IV?
Take a look at the book by the "Collector": http://www.amazon.com/Complete-Guid...d_bbs_1?ie=UTF8&s=books&qid=1202723900&sr=8-1 If you need more hand holding take a look at Hull.