/Black-Scholes-Option

Black Scholes PDE to calculate Option price and Greek Letter

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

Black Scholes Option Pricing

Followers Stars Issue Commit

Program Description

This program is to calculate price and greak letter for regular option by Black Scholes method. Since using Black Scholes, price and greak letter can be compute efficiently within O(1). There are also different pricing models and I will work on them in the near future.

The formula for Black Scholes pricing and and greak letters is shown below. If you wish to dig into more, there are abundant of resource on the internet and I am planing on writing a medium on it.

  • Call Price: The theoretic price for call option

  • Put Price: The theoretic price for put option

  • Delta: Measure the rate change of option price w.r.t underlying stock price

  • Gamma: Measure the rate change of Delta w.r.t underlying stock price

  • Vega: Measure the sensitive of price to volatility

  • Rho: Measure the sensitive of price to interest rate

  • Theta: Time decay, namely, measure the sensitive of price to maturity time

Basic Information

  • Author: Albert Lin
  • School: National Taiwna University
  • Version: Python3
  • Library: Numpy Scipy Decimal

Usage

Input format

  • Inputs: S (stock price), X (strike price), r (continuously compounded annual interest rate in percentage), d (continuously compounded annual dividend rate in percentage), s (annual volatility in percentage), T (time to maturity in years), t (current time in year).
100 110 5 1 30 2 0.5  

Output format

  • Output: Call/ Put Option price and greak letter
=== Call Option ===
Call Option Price: 12.91346
Call Delta: 0.52694
Call Gamma: 0.01066
Call Vega: 47.94845
Call Rho: 59.67123
Call Theta: -6.56279

=== Put Option ===
Put Option Price: 16.45405
Put Delta: -0.45817
Put Gamma: 0.01066
Put Vega: 47.94845
Put Rho: -93.40644
Put Theta: -1.64954

Reference

Quantative Finance Fintech Prof.Han

Links to Me!

Gmail Medium Facebook LinkedIn