ivolatility-backtesting 1.1.0__tar.gz → 1.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of ivolatility-backtesting might be problematic. Click here for more details.
- {ivolatility_backtesting-1.1.0 → ivolatility_backtesting-1.3.0}/PKG-INFO +72 -70
- {ivolatility_backtesting-1.1.0 → ivolatility_backtesting-1.3.0}/ivolatility_backtesting/__init__.py +10 -4
- {ivolatility_backtesting-1.1.0 → ivolatility_backtesting-1.3.0}/ivolatility_backtesting/ivolatility_backtesting.py +424 -258
- {ivolatility_backtesting-1.1.0 → ivolatility_backtesting-1.3.0}/ivolatility_backtesting.egg-info/PKG-INFO +72 -70
- {ivolatility_backtesting-1.1.0 → ivolatility_backtesting-1.3.0}/ivolatility_backtesting.egg-info/requires.txt +1 -0
- {ivolatility_backtesting-1.1.0 → ivolatility_backtesting-1.3.0}/pyproject.toml +3 -2
- {ivolatility_backtesting-1.1.0 → ivolatility_backtesting-1.3.0}/setup.cfg +4 -4
- {ivolatility_backtesting-1.1.0 → ivolatility_backtesting-1.3.0}/LICENSE +0 -0
- {ivolatility_backtesting-1.1.0 → ivolatility_backtesting-1.3.0}/README.md +0 -0
- {ivolatility_backtesting-1.1.0 → ivolatility_backtesting-1.3.0}/ivolatility_backtesting.egg-info/SOURCES.txt +0 -0
- {ivolatility_backtesting-1.1.0 → ivolatility_backtesting-1.3.0}/ivolatility_backtesting.egg-info/dependency_links.txt +0 -0
- {ivolatility_backtesting-1.1.0 → ivolatility_backtesting-1.3.0}/ivolatility_backtesting.egg-info/top_level.txt +0 -0
|
@@ -1,70 +1,72 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
2
|
-
Name: ivolatility_backtesting
|
|
3
|
-
Version: 1.
|
|
4
|
-
Summary: A universal backtesting framework for financial strategies using the IVolatility API.
|
|
5
|
-
Author-email: IVolatility <support@ivolatility.com>
|
|
6
|
-
Project-URL: Homepage, https://ivolatility.com
|
|
7
|
-
Keywords: backtesting,finance,trading,ivolatility
|
|
8
|
-
Classifier: Programming Language :: Python :: 3
|
|
9
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
10
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
11
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
-
Classifier: Operating System :: OS Independent
|
|
16
|
-
Requires-Python: >=3.8
|
|
17
|
-
Description-Content-Type: text/markdown
|
|
18
|
-
License-File: LICENSE
|
|
19
|
-
Requires-Dist: pandas>=1.5.0
|
|
20
|
-
Requires-Dist: numpy>=1.21.0
|
|
21
|
-
Requires-Dist: matplotlib>=3.5.0
|
|
22
|
-
Requires-Dist: seaborn>=0.11.0
|
|
23
|
-
Requires-Dist: ivolatility>=1.8.2
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
-
|
|
68
|
-
-
|
|
69
|
-
-
|
|
70
|
-
-
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ivolatility_backtesting
|
|
3
|
+
Version: 1.3.0
|
|
4
|
+
Summary: A universal backtesting framework for financial strategies using the IVolatility API.
|
|
5
|
+
Author-email: IVolatility <support@ivolatility.com>
|
|
6
|
+
Project-URL: Homepage, https://ivolatility.com
|
|
7
|
+
Keywords: backtesting,finance,trading,ivolatility
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Requires-Python: >=3.8
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
License-File: LICENSE
|
|
19
|
+
Requires-Dist: pandas>=1.5.0
|
|
20
|
+
Requires-Dist: numpy>=1.21.0
|
|
21
|
+
Requires-Dist: matplotlib>=3.5.0
|
|
22
|
+
Requires-Dist: seaborn>=0.11.0
|
|
23
|
+
Requires-Dist: ivolatility>=1.8.2
|
|
24
|
+
Requires-Dist: psutil>=7.1.0
|
|
25
|
+
Dynamic: license-file
|
|
26
|
+
|
|
27
|
+
# IVolatility Backtesting
|
|
28
|
+
A universal backtesting framework for financial strategies using the IVolatility API.
|
|
29
|
+
|
|
30
|
+
## Installation
|
|
31
|
+
```bash
|
|
32
|
+
pip install ivolatility_backtesting
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Usage
|
|
36
|
+
```python
|
|
37
|
+
from ivolatility_backtesting import run_backtest, init_api
|
|
38
|
+
|
|
39
|
+
# Initialize API
|
|
40
|
+
init_api("your-api-key")
|
|
41
|
+
|
|
42
|
+
# Define your strategy
|
|
43
|
+
def my_strategy(config):
|
|
44
|
+
# Strategy logic
|
|
45
|
+
return BacktestResults(
|
|
46
|
+
equity_curve=[100000, 110000],
|
|
47
|
+
equity_dates=["2023-01-01", "2023-01-02"],
|
|
48
|
+
trades=[{"pnl": 1000, "entry_date": "2023-01-01", "exit_date": "2023-01-02"}],
|
|
49
|
+
initial_capital=100000,
|
|
50
|
+
config=config
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
# Run backtest
|
|
54
|
+
CONFIG = {
|
|
55
|
+
"initial_capital": 100000,
|
|
56
|
+
"start_date": "2023-01-01",
|
|
57
|
+
"end_date": "2024-01-01",
|
|
58
|
+
"strategy_name": "My Strategy"
|
|
59
|
+
}
|
|
60
|
+
analyzer = run_backtest(my_strategy, CONFIG)
|
|
61
|
+
|
|
62
|
+
# Access metrics
|
|
63
|
+
print(f"Sharpe Ratio: {analyzer.metrics['sharpe']:.2f}")
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Requirements
|
|
67
|
+
- Python >= 3.8
|
|
68
|
+
- pandas >= 1.5.0
|
|
69
|
+
- numpy >= 1.21.0
|
|
70
|
+
- matplotlib >= 3.5.0
|
|
71
|
+
- seaborn >= 0.11.0
|
|
72
|
+
- ivolatility >= 1.8.2
|
{ivolatility_backtesting-1.1.0 → ivolatility_backtesting-1.3.0}/ivolatility_backtesting/__init__.py
RENAMED
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
from .ivolatility_backtesting import (
|
|
2
2
|
BacktestResults, BacktestAnalyzer, ResultsReporter,
|
|
3
3
|
ChartGenerator, ResultsExporter, run_backtest,
|
|
4
|
-
init_api,
|
|
4
|
+
init_api, api_call, APIHelper, APIManager,
|
|
5
|
+
ResourceMonitor, create_progress_bar, update_progress, format_time
|
|
5
6
|
)
|
|
6
7
|
|
|
7
8
|
__all__ = [
|
|
8
9
|
'BacktestResults',
|
|
9
|
-
'BacktestAnalyzer',
|
|
10
|
+
'BacktestAnalyzer',
|
|
10
11
|
'ResultsReporter',
|
|
11
12
|
'ChartGenerator',
|
|
12
13
|
'ResultsExporter',
|
|
13
14
|
'run_backtest',
|
|
14
15
|
'init_api',
|
|
15
|
-
'
|
|
16
|
-
'
|
|
16
|
+
'api_call',
|
|
17
|
+
'APIHelper',
|
|
18
|
+
'APIManager',
|
|
19
|
+
'ResourceMonitor',
|
|
20
|
+
'create_progress_bar',
|
|
21
|
+
'update_progress',
|
|
22
|
+
'format_time'
|
|
17
23
|
]
|