Skip to main content

A unified, developer-friendly quantitative finance toolkit for Python — options pricing, Greeks, Monte Carlo, portfolio risk, and clean market data.

Project description

quantadesh

A unified, developer-friendly quantitative finance toolkit for Python — options pricing, Greeks, Monte Carlo, portfolio risk, and clean market data, all behind one consistent API.

PyPI Python License: MIT

Built by Adesh Patel (github).


Why quantadesh?

Every quant project starts the same way: rewriting Black-Scholes, hand-rolling Monte Carlo, wrestling with yfinance, building yet another portfolio class. quantadesh ends that loop with one consistent, batteries-included API.

from quantadesh import Option

opt = Option("call", S=100, K=110, T=1, r=0.05, sigma=0.20)

opt.price()                                # Black-Scholes
opt.price(method="binomial", steps=500, american=True)
opt.price(method="monte_carlo", paths=50_000, seed=42)
opt.greeks()                               # {'delta': ..., 'gamma': ..., ...}

Install

pip install quantadesh
pip install "quantadesh[market]"      # add yfinance for market data
pip install "quantadesh[all]"         # everything: market + tests + docs

Features

Module What it gives you
models Black-Scholes, CRR Binomial Trees (American/European), Monte Carlo with antithetic variates
greeks Analytical Δ, Γ, Vega, Θ, ρ + numerical finite-difference Greeks
Option Object-oriented wrapper combining pricing + Greeks
market Clean Market.download() wrapper around yfinance
Portfolio Multi-asset returns, vol, Sharpe, VaR, CVaR, max drawdown
timeseries Returns, log returns, rolling vol, Sharpe, Sortino, max drawdown

Examples

Options & Greeks

from quantadesh import Option

opt = Option("put", S=100, K=95, T=0.5, r=0.04, sigma=0.25)
print(opt.price())                          # Black-Scholes price
print(opt.greeks())                         # All Greeks
print(opt.price(method="monte_carlo", paths=100_000, seed=1))

Portfolio risk

from quantadesh import Market, Portfolio

prices = Market.download(["AAPL", "MSFT", "GOOG"], period="2y")
pf = Portfolio(prices, weights={"AAPL": 0.4, "MSFT": 0.4, "GOOG": 0.2})

print(pf.summary())
# {'expected_return': 0.18, 'volatility': 0.21, 'sharpe': 0.86,
#  'var_95': 0.024, 'cvar_95': 0.036, 'max_drawdown': -0.27, ...}

Functional API (NumPy-style)

from quantadesh import bs_price, mc_price, all_greeks

bs_price("call", S=100, K=110, T=1, r=0.05, sigma=0.2)
all_greeks("put", S=100, K=110, T=1, r=0.05, sigma=0.2)
mc_price("call", S=100, K=110, T=1, r=0.05, sigma=0.2, paths=20_000, seed=0)

Roadmap

  • v0.2 — Implied volatility solver, vol surface, exotic options (Asian, barrier)
  • v0.3 — Markowitz mean-variance optimizer, efficient frontier
  • v0.4 — Fama-French factor models, CAPM, beta utilities
  • v1.0 — Stable API, full docs site, 95%+ test coverage

License

MIT © Adesh Patel

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

quantadesh-0.1.0.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

quantadesh-0.1.0-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

Details for the file quantadesh-0.1.0.tar.gz.

File metadata

  • Download URL: quantadesh-0.1.0.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for quantadesh-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e54bbf1e9ed9a97feeb41b45b45bca33d4fb2469d1589823f5249950ec0bbd39
MD5 ac006b65a8b9f7faed9e1e743ed11372
BLAKE2b-256 9155bb290328d503f889d8c3ec0b943aebbcff740154ac8de4a56b77340041db

See more details on using hashes here.

File details

Details for the file quantadesh-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: quantadesh-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for quantadesh-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e3f4a0f8dd3eb4da8f19a3d21241b15e2059bc4698ac0112db47fef1f921a1d7
MD5 2139abaa4b4a0bf52038776074404010
BLAKE2b-256 9c0a3ae67f0e893bbf91757f498262289e0f312c83571be44d723d15540e0368

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page