Coder Social home page Coder Social logo

babymetal287 / option_calculations Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tienusss/option_calculations

0.0 0.0 0.0 30 KB

Python script to calculate a couple of options (financial derivatives) and Implied Volatilities for American and European options.

Python 100.00%

option_calculations's Introduction

Option_Calculations

In this repositories you can find script for calculating the prices and implied volatilities of plain-vanilla options (American and European).

Leisen-Reimer.py

With the Leisen-Reimer.py script you are able to calculate the price for European- and American Plain-vanilla options (for options with non-dividend paying underlyings). There is also a functionality to return the delta, gamma and a list of the price, delta and gamma. This code is transalted from a VBA code in the book "The Complete Guide to Option Pricing Formulas" by Espen Gaarder Haug.

The script requires numpy.

Black-Scholes_Implied_Volatility.py

With the Black-Scholes_Implied_Volatility.py script you are able to calculate the implied volatility of plain vanilla European options. The script is based on Black-Scholes and Brent's method is used to determine the implied volatility. You can use the Call_IV or Put_IV function for directly calculating the implied volatility of a call or put. Or you can use the Calculate_IV_Call_Put function for which have to indicate if the option is a call or put. Both methods deliver the same results.

The script requires scipy and numpy.

Leisen-Reimer_IV.py

With the Leisen-Reimer_IV.py script you are able to calculate the implied volatiliy of plain vanilla European and American options. The script is based on the Leisen-Reimer method and Brent's method is used to determine the implied volatility.

The script requires scipy and numpy.

Future updates

In the near future I will upload a Implied Volatility calculator for option with dividend paying underlyings (discrete). Furthermore also a script to calculate the value of barrier options with the Black-Scholes formulas.

option_calculations's People

Contributors

tienusss avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.