{"id":46127956,"url":"https://github.com/t-kalv/black-scholes-model","last_synced_at":"2026-03-02T03:04:01.243Z","repository":{"id":290182538,"uuid":"973616867","full_name":"T-Kalv/Black-Scholes-Model","owner":"T-Kalv","description":"Implementation of the Black-Scholes Model for Europen option call/put pricing with features including calulating option prices based on mark parameters, estimating implied volatility , live data using Yahoo Finance API and visualising option prices against different factors...","archived":false,"fork":false,"pushed_at":"2025-06-15T21:33:25.000Z","size":175787,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-15T23:03:28.958Z","etag":null,"topics":["black-scholes-equation","black-scholes-model","black-scholes-model-application","european-call","implied-volatility","option-pricing","quant","quantitative-finance","quantitative-trading","streamlit","streamlit-webapp","trading","trading-algorithms","yahoo-finance","yahoo-finance-api"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/T-Kalv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-27T11:28:27.000Z","updated_at":"2025-06-15T21:33:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"77c8c153-ebde-4fb5-a153-a7758eff2a73","html_url":"https://github.com/T-Kalv/Black-Scholes-Model","commit_stats":null,"previous_names":["t-kalv/black-scholes-model"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/T-Kalv/Black-Scholes-Model","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/T-Kalv%2FBlack-Scholes-Model","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/T-Kalv%2FBlack-Scholes-Model/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/T-Kalv%2FBlack-Scholes-Model/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/T-Kalv%2FBlack-Scholes-Model/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/T-Kalv","download_url":"https://codeload.github.com/T-Kalv/Black-Scholes-Model/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/T-Kalv%2FBlack-Scholes-Model/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29991299,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T01:47:34.672Z","status":"online","status_checked_at":"2026-03-02T02:00:07.342Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["black-scholes-equation","black-scholes-model","black-scholes-model-application","european-call","implied-volatility","option-pricing","quant","quantitative-finance","quantitative-trading","streamlit","streamlit-webapp","trading","trading-algorithms","yahoo-finance","yahoo-finance-api"],"created_at":"2026-03-02T03:03:59.871Z","updated_at":"2026-03-02T03:04:01.226Z","avatar_url":"https://github.com/T-Kalv.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Black-Scholes Option Pricing Model\n![GitHub top language](https://img.shields.io/github/languages/top/T-KALV/Black-Scholes-Model?style=plastic)\n![GitHub repo size](https://img.shields.io/github/repo-size/T-KALV/Black-Scholes-Model?style=plastic)\n![GitHub last commit](https://img.shields.io/github/last-commit/T-KALV/Black-Scholes-Model?style=plastic)\n![GitHub commits since latest release (by date including pre-releases)](https://img.shields.io/github/commits-since/T-KALV/Black-Scholes-Model/latest?include_prereleases\u0026style=plastic)\n![GitHub issues](https://img.shields.io/github/issues/T-KALV/Black-Scholes-Model?style=plastic)\n![GitHub all releases](https://img.shields.io/github/downloads/T-KALV/Black-Scholes-Model/total?style=plastic)\n\n\n![image](https://github.com/user-attachments/assets/cf4c797e-c477-4ee9-a5a9-4346052da3eb)\n![image](https://github.com/user-attachments/assets/763318df-982b-4887-9c19-6d76895ddd22)\n\n\u003c!---\n![Screenshot From 2025-04-27 12-48-55](https://github.com/user-attachments/assets/9c020d1d-db49-4313-ad25-a907d2720bff)\n---\u003e\n## About:\n\n### Basic Black-Scholes Algorithm\n- provides theoretical estimate of the price of European call/put option\n\n### Formula:\n- $ S $ = current price of stock\n- $ K $ = strike price of the option\n- $ T $ = time to maturity in years\n- $ r $ = risk-free interest rate\n- $ \\sigma $ = volatility of stock (the standard deviation of returns)\n\n### European Call Option:\n$$C = S \\cdot N(d_1) - K e^{-rT} \\cdot N(d_2)$$\n\n### European Put Option:\n$$P = K e^{-rT} \\cdot N(-d_2) - S \\cdot N(-d_1)$$\n\nWhere:\n$$d_1 = \\frac{\\ln(S/K) + \\left(r + \\frac{\\sigma^2}{2}\\right) T}{\\sigma \\sqrt{T}}$$\n$$d_2 = d_1 - \\sigma \\sqrt{T}$$\n$$N(d) = \\text{cumulative distribution function of the standard normal distribution}$$\n\n### Newton Raphson (Implied Volatility):\n- $ f(\\sigma) = \\text{BlackScholes}(\\sigma) - \\text{MarketPrice} = 0 $\n- $$\\sigma_{\\text{new}} = \\sigma - \\frac{f(\\sigma)}{f'(\\sigma)} = \\sigma - \\frac{\\text{BlackScholes}(\\sigma) - \\text{MarketPrice}}{\\text{Vega}(\\sigma)}$$\n- $ \\text{Vega}(\\sigma) = \\text{rate of change of BlackScholes option price wrt changes in volatility } \\sigma $\n\n### Option Greeks:\n- Delta ($ \\Delta $) = measures price sensitivity to underlying:\n  - Call option: $ \\Delta $ ranges from 0 to 1\n  - Put option: $ \\Delta $ ranges from -1 to 0\n- Gamma ($ \\Gamma $) = measures rate of change of delta\n- Vega ($ \\nu $) = measures sensitivity to volatility\n- Theta ($ \\Theta $) = measures sensitivity to time decay\n- Rho ($ \\rho $) = measures sensitivity to interest rates\n\n### Formula for Option Greeks:\n- For Calls: \n  $$\\Delta = N(d_1)$$\n- For Puts: \n  $$\\Delta = N(d_1) - 1$$\n- where $ N() $ is the standard normal cumulative distribution function\n- \n- $$\\Gamma = \\frac{N'(d_1)}{S \\sigma \\sqrt{T}}$$\n- where $ N'(d_1) $ is the standard normal probability density function\n- \n- $$\\nu = S \\sqrt{T} N'(d_1)$$\n\n\n## Tasks:\n- Implement basic Black Scholes Algotithm\n- Read options list from a csv file and ouput the call and put option price using the black scholes algorithm\n- Implement implied volatility where we reverse the black sholes algo given a market option price find out what the implied volatility value is\n- Visualise Option Prices using matplotlib such as option price vs stock price, option price vs strike price, option price vs volatility, option price vs time to maturity\n- Implement simple Steamlit app that shows these results\n- Add real time market data integration using Yahoo Finance API to retrieve real-world stock data \n- Add a SQL database backend to store and export user stock option queries\n![image](https://github.com/user-attachments/assets/73aded7a-ba87-4cd7-8edc-9c3499a6425a)\n![image](https://github.com/user-attachments/assets/ce9aab0f-b049-4449-9b6b-4f9d692dca9d)\n![image](https://github.com/user-attachments/assets/444c0a2f-5a10-4e62-aaed-e04f3512d56e)\n![image](https://github.com/user-attachments/assets/e8fcc01a-e663-4385-bc83-9ee4b2ed45c7)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft-kalv%2Fblack-scholes-model","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ft-kalv%2Fblack-scholes-model","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft-kalv%2Fblack-scholes-model/lists"}