ivolatility-backtesting 1.14.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.

File without changes
@@ -0,0 +1,72 @@
1
+ Metadata-Version: 2.4
2
+ Name: ivolatility_backtesting
3
+ Version: 1.14.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
@@ -0,0 +1,46 @@
1
+ # IVolatility Backtesting
2
+ A universal backtesting framework for financial strategies using the IVolatility API.
3
+
4
+ ## Installation
5
+ ```bash
6
+ pip install ivolatility_backtesting
7
+ ```
8
+
9
+ ## Usage
10
+ ```python
11
+ from ivolatility_backtesting import run_backtest, init_api
12
+
13
+ # Initialize API
14
+ init_api("your-api-key")
15
+
16
+ # Define your strategy
17
+ def my_strategy(config):
18
+ # Strategy logic
19
+ return BacktestResults(
20
+ equity_curve=[100000, 110000],
21
+ equity_dates=["2023-01-01", "2023-01-02"],
22
+ trades=[{"pnl": 1000, "entry_date": "2023-01-01", "exit_date": "2023-01-02"}],
23
+ initial_capital=100000,
24
+ config=config
25
+ )
26
+
27
+ # Run backtest
28
+ CONFIG = {
29
+ "initial_capital": 100000,
30
+ "start_date": "2023-01-01",
31
+ "end_date": "2024-01-01",
32
+ "strategy_name": "My Strategy"
33
+ }
34
+ analyzer = run_backtest(my_strategy, CONFIG)
35
+
36
+ # Access metrics
37
+ print(f"Sharpe Ratio: {analyzer.metrics['sharpe']:.2f}")
38
+ ```
39
+
40
+ ## Requirements
41
+ - Python >= 3.8
42
+ - pandas >= 1.5.0
43
+ - numpy >= 1.21.0
44
+ - matplotlib >= 3.5.0
45
+ - seaborn >= 0.11.0
46
+ - ivolatility >= 1.8.2
@@ -0,0 +1,37 @@
1
+ from .ivolatility_backtesting import (
2
+ BacktestResults, BacktestAnalyzer, ResultsReporter,
3
+ ChartGenerator, ResultsExporter, run_backtest, run_backtest_with_stoploss,
4
+ init_api, api_call, APIHelper, APIManager,
5
+ ResourceMonitor, create_progress_bar, update_progress, format_time,
6
+ StopLossManager, PositionManager, StopLossConfig,
7
+ calculate_stoploss_metrics, print_stoploss_section, create_stoploss_charts,
8
+ create_stoploss_comparison_chart,
9
+ optimize_parameters, plot_optimization_results,
10
+ create_optimization_folder,
11
+ preload_options_data,
12
+ preload_data_universal,
13
+ safe_get_greek,
14
+ apply_optimization_preset, list_optimization_presets,
15
+ calculate_combinations_count, print_preset_info,
16
+ get_cache_config, UniversalCacheManager,
17
+ _process_options_df
18
+ )
19
+
20
+ __all__ = [
21
+ 'BacktestResults', 'BacktestAnalyzer', 'ResultsReporter',
22
+ 'ChartGenerator', 'ResultsExporter', 'run_backtest', 'run_backtest_with_stoploss',
23
+ 'init_api', 'api_call', 'APIHelper', 'APIManager',
24
+ 'ResourceMonitor', 'create_progress_bar', 'update_progress', 'format_time',
25
+ 'StopLossManager', 'PositionManager', 'StopLossConfig',
26
+ 'calculate_stoploss_metrics', 'print_stoploss_section', 'create_stoploss_charts',
27
+ 'create_stoploss_comparison_chart',
28
+ 'optimize_parameters', 'plot_optimization_results',
29
+ 'create_optimization_folder',
30
+ 'preload_options_data',
31
+ 'preload_data_universal',
32
+ 'safe_get_greek',
33
+ 'apply_optimization_preset', 'list_optimization_presets',
34
+ 'calculate_combinations_count', 'print_preset_info',
35
+ 'get_cache_config', 'UniversalCacheManager',
36
+ '_process_options_df'
37
+ ]