arbitrix-core 0.1.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.
- arbitrix_core-0.1.0/PKG-INFO +53 -0
- arbitrix_core-0.1.0/README.md +27 -0
- arbitrix_core-0.1.0/pyproject.toml +44 -0
- arbitrix_core-0.1.0/setup.cfg +4 -0
- arbitrix_core-0.1.0/src/arbitrix/__init__.py +20 -0
- arbitrix_core-0.1.0/src/arbitrix/_version.py +3 -0
- arbitrix_core-0.1.0/src/arbitrix/core/__init__.py +20 -0
- arbitrix_core-0.1.0/src/arbitrix/core/backtest/__init__.py +11 -0
- arbitrix_core-0.1.0/src/arbitrix/core/backtest/engine.py +721 -0
- arbitrix_core-0.1.0/src/arbitrix/core/backtest/walkforward.py +62 -0
- arbitrix_core-0.1.0/src/arbitrix/core/cli.py +48 -0
- arbitrix_core-0.1.0/src/arbitrix/core/costs/__init__.py +304 -0
- arbitrix_core-0.1.0/src/arbitrix/core/costs/base.py +448 -0
- arbitrix_core-0.1.0/src/arbitrix/core/costs/models/default.py +58 -0
- arbitrix_core-0.1.0/src/arbitrix/core/costs/registry.py +97 -0
- arbitrix_core-0.1.0/src/arbitrix/core/strategies/VSS.py +428 -0
- arbitrix_core-0.1.0/src/arbitrix/core/strategies/VWMS.py +369 -0
- arbitrix_core-0.1.0/src/arbitrix/core/strategies/__init__.py +18 -0
- arbitrix_core-0.1.0/src/arbitrix/core/strategies/base.py +56 -0
- arbitrix_core-0.1.0/src/arbitrix/core/strategies/breakout_index.py +193 -0
- arbitrix_core-0.1.0/src/arbitrix/core/strategies/carry_trade.py +79 -0
- arbitrix_core-0.1.0/src/arbitrix/core/strategies/meanrev_gold.py +55 -0
- arbitrix_core-0.1.0/src/arbitrix/core/strategies/registry.py +274 -0
- arbitrix_core-0.1.0/src/arbitrix/core/types.py +27 -0
- arbitrix_core-0.1.0/src/arbitrix/core/utils/__init__.py +1 -0
- arbitrix_core-0.1.0/src/arbitrix/core/utils/indicators.py +55 -0
- arbitrix_core-0.1.0/src/arbitrix/core/utils/progress.py +27 -0
- arbitrix_core-0.1.0/src/arbitrix_core.egg-info/PKG-INFO +53 -0
- arbitrix_core-0.1.0/src/arbitrix_core.egg-info/SOURCES.txt +32 -0
- arbitrix_core-0.1.0/src/arbitrix_core.egg-info/dependency_links.txt +1 -0
- arbitrix_core-0.1.0/src/arbitrix_core.egg-info/entry_points.txt +2 -0
- arbitrix_core-0.1.0/src/arbitrix_core.egg-info/requires.txt +14 -0
- arbitrix_core-0.1.0/src/arbitrix_core.egg-info/top_level.txt +1 -0
- arbitrix_core-0.1.0/tests/test_core_backtest.py +80 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: arbitrix-core
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Open-core toolkit for Arbitrix backtesting, strategies, and cost models.
|
|
5
|
+
Author: Arbitrix Team
|
|
6
|
+
Keywords: backtesting,trading,quant,strategies
|
|
7
|
+
Classifier: License :: Other/Proprietary License
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
11
|
+
Classifier: Intended Audience :: Financial and Insurance Industry
|
|
12
|
+
Classifier: Topic :: Office/Business :: Financial :: Investment
|
|
13
|
+
Requires-Python: >=3.10
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
Requires-Dist: numpy>=1.23
|
|
16
|
+
Requires-Dist: pandas>=1.5
|
|
17
|
+
Requires-Dist: scipy>=1.9
|
|
18
|
+
Requires-Dist: typing-extensions>=4.5
|
|
19
|
+
Provides-Extra: ib
|
|
20
|
+
Requires-Dist: ib-insync>=0.9; extra == "ib"
|
|
21
|
+
Provides-Extra: mt5
|
|
22
|
+
Requires-Dist: rpyc>=6.0; extra == "mt5"
|
|
23
|
+
Provides-Extra: dev
|
|
24
|
+
Requires-Dist: pytest; extra == "dev"
|
|
25
|
+
Requires-Dist: python-dateutil; extra == "dev"
|
|
26
|
+
|
|
27
|
+
# Arbitrix Core
|
|
28
|
+
|
|
29
|
+
`arbitrix-core` is the open-source subset of Arbitrix that contains the
|
|
30
|
+
backtesting engine, strategy abstractions, technical indicators, and cost
|
|
31
|
+
models required to run local research workflows.
|
|
32
|
+
|
|
33
|
+
## Installation
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
python -m pip install arbitrix-core
|
|
37
|
+
# optional extras
|
|
38
|
+
python -m pip install 'arbitrix-core[ib]'
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Quick start
|
|
42
|
+
|
|
43
|
+
```python
|
|
44
|
+
from arbitrix.core.backtest import Backtester, BTConfig
|
|
45
|
+
from arbitrix.core.strategies.base import BaseStrategy, Signal
|
|
46
|
+
|
|
47
|
+
cfg = BTConfig()
|
|
48
|
+
bt = Backtester(cfg)
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
See the main repository's documentation under `docs/` for end-to-end guides,
|
|
52
|
+
including CSV backtest and moving-average crossover examples that are mirrored
|
|
53
|
+
under `open-core/examples/`.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Arbitrix Core
|
|
2
|
+
|
|
3
|
+
`arbitrix-core` is the open-source subset of Arbitrix that contains the
|
|
4
|
+
backtesting engine, strategy abstractions, technical indicators, and cost
|
|
5
|
+
models required to run local research workflows.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
python -m pip install arbitrix-core
|
|
11
|
+
# optional extras
|
|
12
|
+
python -m pip install 'arbitrix-core[ib]'
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Quick start
|
|
16
|
+
|
|
17
|
+
```python
|
|
18
|
+
from arbitrix.core.backtest import Backtester, BTConfig
|
|
19
|
+
from arbitrix.core.strategies.base import BaseStrategy, Signal
|
|
20
|
+
|
|
21
|
+
cfg = BTConfig()
|
|
22
|
+
bt = Backtester(cfg)
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
See the main repository's documentation under `docs/` for end-to-end guides,
|
|
26
|
+
including CSV backtest and moving-average crossover examples that are mirrored
|
|
27
|
+
under `open-core/examples/`.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68,<75", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "arbitrix-core"
|
|
7
|
+
dynamic = ["version"]
|
|
8
|
+
description = "Open-core toolkit for Arbitrix backtesting, strategies, and cost models."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
keywords = ["backtesting", "trading", "quant", "strategies"]
|
|
12
|
+
classifiers = [
|
|
13
|
+
"License :: Other/Proprietary License",
|
|
14
|
+
"Programming Language :: Python :: 3",
|
|
15
|
+
"Programming Language :: Python :: 3.10",
|
|
16
|
+
"Programming Language :: Python :: 3.11",
|
|
17
|
+
"Intended Audience :: Financial and Insurance Industry",
|
|
18
|
+
"Topic :: Office/Business :: Financial :: Investment",
|
|
19
|
+
]
|
|
20
|
+
authors = [{name = "Arbitrix Team"}]
|
|
21
|
+
dependencies = [
|
|
22
|
+
"numpy>=1.23",
|
|
23
|
+
"pandas>=1.5",
|
|
24
|
+
"scipy>=1.9",
|
|
25
|
+
"typing-extensions>=4.5",
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
[project.optional-dependencies]
|
|
29
|
+
ib = ["ib-insync>=0.9"]
|
|
30
|
+
mt5 = ["rpyc>=6.0"]
|
|
31
|
+
dev = ["pytest", "python-dateutil"]
|
|
32
|
+
|
|
33
|
+
[project.scripts]
|
|
34
|
+
arbitrix-core = "arbitrix.core.cli:main"
|
|
35
|
+
|
|
36
|
+
[tool.setuptools]
|
|
37
|
+
package-dir = {"" = "src"}
|
|
38
|
+
|
|
39
|
+
[tool.setuptools.packages.find]
|
|
40
|
+
where = ["src"]
|
|
41
|
+
include = ["arbitrix", "arbitrix.core*"]
|
|
42
|
+
|
|
43
|
+
[tool.setuptools.dynamic]
|
|
44
|
+
version = {attr = "arbitrix._version.__version__"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"""Arbitrix algorithmic trading toolkit."""
|
|
2
|
+
|
|
3
|
+
from ._version import __version__
|
|
4
|
+
|
|
5
|
+
__all__ = ["__version__"]
|
|
6
|
+
|
|
7
|
+
try: # pragma: no cover - optional dependency guard
|
|
8
|
+
from .config import load_config, AppConfig # noqa: F401
|
|
9
|
+
except ModuleNotFoundError as exc: # pragma: no cover - triggered if pyyaml missing or config omitted
|
|
10
|
+
if exc.name not in {"yaml", "arbitrix.config", "config"}:
|
|
11
|
+
raise
|
|
12
|
+
|
|
13
|
+
def load_config(*_args, **_kwargs): # type: ignore
|
|
14
|
+
raise ModuleNotFoundError(
|
|
15
|
+
"Configuration support is unavailable; install the full Arbitrix package to enable it."
|
|
16
|
+
) from exc
|
|
17
|
+
|
|
18
|
+
AppConfig = None # type: ignore
|
|
19
|
+
else: # pragma: no cover - executed when config is available
|
|
20
|
+
__all__.extend(["load_config", "AppConfig"])
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"""Core (open-source) surface of Arbitrix.
|
|
2
|
+
|
|
3
|
+
This subpackage intentionally contains only the components that are safe to
|
|
4
|
+
publish independently: the backtesting engine, strategy base classes, cost
|
|
5
|
+
models, shared utilities, and lightweight type definitions.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from .backtest.engine import Backtester, BTConfig, BTResult, Trade
|
|
9
|
+
from .strategies.base import BaseStrategy, Signal
|
|
10
|
+
from .types import InstrumentConfig
|
|
11
|
+
|
|
12
|
+
__all__ = [
|
|
13
|
+
"Backtester",
|
|
14
|
+
"BTConfig",
|
|
15
|
+
"BTResult",
|
|
16
|
+
"Trade",
|
|
17
|
+
"BaseStrategy",
|
|
18
|
+
"Signal",
|
|
19
|
+
"InstrumentConfig",
|
|
20
|
+
]
|