# dbrojas/optlib

A library for financial options pricing written in Python.

Repository: https://github.com/dbrojas/optlib
Canonical: https://ross.abutalabs.com/products/optlib
Language: Python
License: MIT
License Family: permissive
Topics: options, derivatives, derivatives-pricing, finance, volatility, tdameritrade-api, stocks, api-client
Last push: 2022-11-18T19:12:59+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 2208, "days_push": 1384, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1629, forks 235 (observed 2026-08-28T04:05:13.909660+00:00)

## What it is
A Python library for pricing financial options using closed-form solutions like Generalized Black-Scholes, Asian options, spread options (Kirk's approximation), and the Bjerksund-Stensland American option approximation. It also includes implied volatility calculations and an API client for fetching option chains and historical data from TDAmeritrade.

## Use cases
- price european options with black-scholes in python
- calculate implied volatility from option prices
- value american options with bjerksund-stensland approximation
- compute option greeks and sensitivity analysis
- fetch option chains from tdameritrade api
- price asian and spread options

## When to choose
- you need closed-form option pricing formulas in pure Python
- you want implied volatility or greeks calculations without heavy dependencies
- you use TDAmeritrade's API to pull option chains and historical data

## When to avoid
- you need Monte Carlo or numerical PDE pricing methods
- you require actively maintained software with recent releases
- you need production-grade American option greeks (currently approximated via GBS)

## Facets
- artifact type: library
- maturity: maintenance
- function: sdk, math, data-science
- domain: fintech, mathematics, apis
- platform: python, cross-platform
- tags: options-pricing, black-scholes, implied-volatility, greek-letters, financial-derivatives, tdameritrade, option-chains, quantitative-finance

## Member repositories
- dbrojas/optlib (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:13.909660+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:48:16.680003+00:00, confidence not recorded.
  - readme: https://github.com/dbrojas/optlib (fetched 2026-08-28T04:05:13.909660+00:00, sha e824c354d9e7)
- Data as of 2026-08-30T08:39:29.467469+00:00.
