vortex-api 2.1.1__tar.gz → 2.1.3__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.
- {vortex_api-2.1.1/vortex_api.egg-info → vortex_api-2.1.3}/PKG-INFO +1 -1
- {vortex_api-2.1.1 → vortex_api-2.1.3}/pyproject.toml +1 -1
- vortex_api-2.1.3/vortex_api/__version__.py +1 -0
- {vortex_api-2.1.1 → vortex_api-2.1.3}/vortex_api/api.py +3 -0
- {vortex_api-2.1.1 → vortex_api-2.1.3}/vortex_api/backtest/__init__.py +8 -1
- {vortex_api-2.1.1 → vortex_api-2.1.3/vortex_api.egg-info}/PKG-INFO +1 -1
- vortex_api-2.1.1/vortex_api/__version__.py +0 -1
- {vortex_api-2.1.1 → vortex_api-2.1.3}/LICENSE +0 -0
- {vortex_api-2.1.1 → vortex_api-2.1.3}/README.md +0 -0
- {vortex_api-2.1.1 → vortex_api-2.1.3}/setup.cfg +0 -0
- {vortex_api-2.1.1 → vortex_api-2.1.3}/vortex_api/__init__.py +0 -0
- {vortex_api-2.1.1 → vortex_api-2.1.3}/vortex_api/backtest/_backtestingpy.py +0 -0
- {vortex_api-2.1.1 → vortex_api-2.1.3}/vortex_api/backtest/_backtrader.py +0 -0
- {vortex_api-2.1.1 → vortex_api-2.1.3}/vortex_api/backtest/_common.py +0 -0
- {vortex_api-2.1.1 → vortex_api-2.1.3}/vortex_api/backtest/_vectorbt.py +0 -0
- {vortex_api-2.1.1 → vortex_api-2.1.3}/vortex_api/vortex_feed.py +0 -0
- {vortex_api-2.1.1 → vortex_api-2.1.3}/vortex_api.egg-info/SOURCES.txt +0 -0
- {vortex_api-2.1.1 → vortex_api-2.1.3}/vortex_api.egg-info/dependency_links.txt +0 -0
- {vortex_api-2.1.1 → vortex_api-2.1.3}/vortex_api.egg-info/requires.txt +0 -0
- {vortex_api-2.1.1 → vortex_api-2.1.3}/vortex_api.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.1.3"
|
|
@@ -14,7 +14,14 @@ Usage from api.py:
|
|
|
14
14
|
|
|
15
15
|
def _is_backtestingpy(result):
|
|
16
16
|
"""Check if result is a backtesting.py stats object (pd.Series with _strategy key)."""
|
|
17
|
-
|
|
17
|
+
if not hasattr(result, "get"):
|
|
18
|
+
return False
|
|
19
|
+
# Primary: backtesting.py always sets _strategy
|
|
20
|
+
if result.get("_strategy") is not None:
|
|
21
|
+
return True
|
|
22
|
+
# Fallback: manually constructed Series with backtesting.py-style keys
|
|
23
|
+
_BT_KEYS = {"Sharpe Ratio", "# Trades", "Return [%]", "Win Rate [%]"}
|
|
24
|
+
return hasattr(result, "index") and len(_BT_KEYS & set(result.index)) >= 3
|
|
18
25
|
|
|
19
26
|
|
|
20
27
|
def _is_vectorbt(result):
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "2.1.1"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|