Aglorithm / Pseudeo-Code to calculate Greeks / IV

Discussion in 'Automated Trading' started by shortorlong, Feb 9, 2008.

  1. 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?
     
  2. JGB

    JGB

    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.
     
  3. Thanks, I found an excel implementation and will look at creating a version for my Java market analysis tool.

    Cheers,
     
  4. 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?
     
  5. 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?
     
  6. JGB is right, the VBA book is a very good reference.
     
  7. wenzi

    wenzi

  8. panzerman

    panzerman

    #10     Feb 11, 2008