Metadata-Version: 2.4
Name: quantadesh
Version: 0.1.0
Summary: A unified, developer-friendly quantitative finance toolkit for Python — options pricing, Greeks, Monte Carlo, portfolio risk, and clean market data.
Author-email: Adesh Patel <analystibpateladesh@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/analystibpateladesh/quantadesh
Project-URL: Documentation, https://github.com/analystibpateladesh/quantadesh
Project-URL: Source, https://github.com/analystibpateladesh/quantadesh
Project-URL: Issues, https://github.com/analystibpateladesh/quantadesh/issues
Keywords: quant,finance,options,black-scholes,monte-carlo,portfolio,risk,var,cvar,trading
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Office/Business :: Financial :: Investment
Classifier: Topic :: Scientific/Engineering :: Mathematics
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.23
Requires-Dist: scipy>=1.10
Requires-Dist: pandas>=2.0
Provides-Extra: market
Requires-Dist: yfinance>=0.2.40; extra == "market"
Provides-Extra: dev
Requires-Dist: pytest>=7; extra == "dev"
Requires-Dist: pytest-cov; extra == "dev"
Requires-Dist: build; extra == "dev"
Requires-Dist: twine; extra == "dev"
Provides-Extra: docs
Requires-Dist: mkdocs>=1.6; extra == "docs"
Requires-Dist: mkdocs-material>=9.5; extra == "docs"
Requires-Dist: mkdocstrings[python]>=0.25; extra == "docs"
Provides-Extra: all
Requires-Dist: yfinance>=0.2.40; extra == "all"
Requires-Dist: pytest>=7; extra == "all"
Requires-Dist: pytest-cov; extra == "all"
Requires-Dist: mkdocs>=1.6; extra == "all"
Requires-Dist: mkdocs-material>=9.5; extra == "all"
Requires-Dist: mkdocstrings[python]>=0.25; extra == "all"
Dynamic: license-file

# 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](https://img.shields.io/badge/pypi-quantadesh-blue)](https://pypi.org/project/quantadesh/)
[![Python](https://img.shields.io/badge/python-3.9%2B-blue)]()
[![License: MIT](https://img.shields.io/badge/license-MIT-green)]()

Built by **Adesh Patel** ([github](https://github.com/analystibpateladesh)).

---

## 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.

```python
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

```bash
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
```python
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
```python
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)
```python
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
