Metadata-Version: 2.4
Name: deflated-sharpe-metrics
Version: 0.1.0
Summary: A general-purpose implementation of the Deflated Sharpe Ratio.
Author-email: Karan Kapoor <karankapoor2801@gmail.com>
Project-URL: Homepage, https://github.com/KaranKapoor2801/deflated-sharpe-metrics
Project-URL: Bug Tracker, https://github.com/KaranKapoor2801/deflated-sharpe-metrics/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Developers
Classifier: Topic :: Office/Business :: Financial :: Investment
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: numpy>=1.20.0
Requires-Dist: scipy>=1.7.0

# Deflated Sharpe Ratio

A Python library for computing the Deflated Sharpe Ratio (DSR), which controls for inflationary effects in financial backtests such as multiple testing, selection bias, and non-normal returns.

## Installation

```bash
pip install deflated-sharpe
```

## Usage

```python
import numpy as np
from deflated_sharpe import deflated_sharpe_ratio

returns = np.random.normal(0.001, 0.02, 1000)

dsr = deflated_sharpe_ratio(
    returns=returns,
    num_trials=100,
    variance_of_trials=0.25,
    skewness=0.0,
    kurtosis=3.0,
    risk_free_rate=0.0
)

print(f"Deflated Sharpe Ratio: {dsr:.4f}")
```
