IVolatility Backtesting
A universal backtesting framework for financial strategies using the IVolatility API.
Installation
pip install ivolatility_backtesting
Usage
from ivolatility_backtesting import run_backtest, init_api
# Initialize API
init_api("your-api-key")
# Define your strategy
def my_strategy(config):
# Strategy logic
return BacktestResults(
equity_curve=[100000, 110000],
equity_dates=["2023-01-01", "2023-01-02"],
trades=[{"pnl": 1000, "entry_date": "2023-01-01", "exit_date": "2023-01-02"}],
initial_capital=100000,
config=config
)
# Run backtest
CONFIG = {
"initial_capital": 100000,
"start_date": "2023-01-01",
"end_date": "2024-01-01",
"strategy_name": "My Strategy"
}
analyzer = run_backtest(my_strategy, CONFIG)
# Access metrics
print(f"Sharpe Ratio: {analyzer.metrics['sharpe']:.2f}")
Requirements
- Python >= 3.8
- pandas >= 1.5.0
- numpy >= 1.21.0
- matplotlib >= 3.5.0
- seaborn >= 0.11.0
- ivolatility >= 1.8.2
Test CI
Test CI1
Metadata
Release files for ivolatility-backtesting 2.163
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ivolatility_backtesting-2.163.tar.gz | 434.9 kB | Without provenance | Details for ivolatility_backtesting-2.163.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ivolatility_backtesting-2.163-py3-none-any.whl | Python 3 | none | any | Details for ivolatility_backtesting-2.163-py3-none-any.whl |
Total release size: 805.3 kB
Release files / ivolatility_backtesting-2.163.tar.gz
| Download URL | ivolatility_backtesting-2.163.tar.gz |
|---|---|
| Size | 434.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
03113ee43bf5f13a4331f89e90359c7e4d32226e0660505344ae0908ba4a77db
|
|
BLAKE2b-256 checksum How to use checksums |
435b0be993a39b6158b83d72df906bd93c6b079b5ae7b7d9dfce160fa5e9044f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / ivolatility_backtesting-2.163-py3-none-any.whl
| Download URL | ivolatility_backtesting-2.163-py3-none-any.whl |
|---|---|
| Size | 370.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d91ca46d82e9c9f09ea913c2e64d5c17783b00ab51a79952bb2abe0c56e9bdb9
|
|
BLAKE2b-256 checksum How to use checksums |
00bb22a6a1e662348c48bf20aaef02dad419258251b504748c9ef8bfffb2f150
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Security for ivolatility-backtesting 2.163
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.