Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Black-Scholes

Please see the attached code for an implementation of a standard Black-Scholes model for options pricing and risk management. Includes functions for valuation of first, second, and third order Greeks.

5 responses

Improvements to the Black-Scholes library. We now include a function to compute the implied volatility of an underlying asset given observed option prices. Under Black-Scholes, there is a one-to-one mapping of volatility to option price given a fixed set of other market parameters. The implied volatility is the volatility that would make the price given by the model equal to the observed price.

The implied volatility can be viewed as investors' expectation of the future volatility of an asset. When investing in stocks, one may use the implied vol to measure the riskiness of an asset in the future and adjust a position accordingly.

hopefully we can get some historical option data or surface data to use these.

Andrew - is there anything more you would like to see on Quantopian in terms of option pricing models, algorithms for constructing implied volatility surfaces, etc.? I'd like to be able to improve the convergence rate of the optimization routines used to compute implied volatility.

I think you have most of the basics, another 2nd order greek would be vanna (rate of change of vega with respect to spot)

I'm hoping we'll one day get an interpolated vol surface something like
(secid, daysToMaturity, delta, impliedVol) for each date for the major etfs

also, realizedVol calculation that uses log of price returns like http://www.volx.us/VolFormula.htm, but also includes dividend and corp. action adjustments
as a simple transform like mavg(days)

@ Ryan how come The implied volatility is always 0.8 ? on the print out? can this algo different IV for each individual stocks thanks... ;)