arithmion-core
The interface tier of Arithmion, an AI-native quantitative research and trading platform. This package contains the contracts the platform is built on: abstract base classes, typed data carriers, and the entry-point plugin registry. It contains no engine, no providers, and no agent runtime — those live in the Arithmion product, which implements these contracts.
Links — arithmion.com for the product; arithmion.com/learn for the learning center, a free bilingual (English / 中文) quant curriculum covering market structure, statistics, machine learning, and a validation track on multiple testing, PBO and the deflated Sharpe ratio — also available as markdown in quant-learning-path.
The package installs into the apexquant namespace (import apexquant.core),
which is the platform's historical package name; the import path is shared
with the full product so that code written against these contracts runs
unchanged in both.
What is in here
Data contracts — the shapes that cross every boundary:
bar/signals/result/trade_plan— OHLCV bars, signal proxies, prediction results, trade plansbacktest.result/backtest.serialize— the backtest result carrier and its canonical JSON wire shapepanel— the cross-sectional factor-panel shape and its OHLCV convertersconfig_schema— the typed schema plugins use to declare their configuration surfacemodel_meta— themeta.jsonschema describing trained-model artifacts
Plugin contracts — subclass one of these, register it via an entry point, and the platform discovers it:
strategy/portfolio_strategy— bar-driven and rebalance-driven strategiespredictor— per-bar inferencedatasource/streaming— bounded (batch) and unbounded (live) databroker— order routingengine— the backtest-engine protocol and factorymetric/validation— result metrics and trustworthiness validatorsrisk— risk manager, position sizer, stop policytraining— the trainer contract and the walk-forward window partitioneruniverse/calendar— point-in-time stock pools and trading calendars
Mechanism:
registry/plugins— the domain registry and the entry-point scanner that performs discovery
Install
pip install -e .
Requires Python ≥ 3.11. Runtime dependencies are pandas and loguru only.
A minimal strategy
from apexquant.core.bar import Bar
from apexquant.core.strategy import BaseStrategy, Signal
class Momentum(BaseStrategy):
name = "momentum"
freq = "daily"
def on_bar(self, bar: Bar) -> Signal:
if bar.close > bar.open:
return Signal.BUY
return Signal.HOLD
Third-party packages expose implementations through entry-point groups
(apexquant.strategies, apexquant.datasources, apexquant.metrics, …);
see plugins.py for the group inventory and registry.py for the domain
registry the scanner populates.
Stability
Interface versioning follows the platform's roadmap: during v0.x no
interface is frozen, and breaking changes are recorded in CHANGELOG.md.
Contracts carry an __apexquant_api_version__ tuple where versioned.
Relationship to the main repository
The Arithmion product repository is the source of truth; this repository is
a curated export of its src/apexquant/core interface tier
(scripts/sync_from_apexquant.py performs the sync and enforces the scope).
Issues and contributions against the contracts are welcome here.
Why apexquant (and aq)?
Arithmion grew out of ApexQuant, a graduate thesis project on applying deep time-series learning to stock forecasting and quantitative trading:
- Applying Deep Time-Series Learning to Stock Forecasting and Quant Trading — the thesis
- Apexquant — the thesis-era codebase this platform descends from
When the project became the Arithmion platform, the brand changed but the
Python package kept its original apexquant name — frankly, because
renaming it was not worth the churn: imports, entry-point groups
(apexquant.strategies, …), and the __apexquant_api_version__ markers
would all have had to move for zero functional gain. A convenient side
effect is that thesis-era and current code interoperate as-is. The same
applies to the aq shorthand you may see elsewhere in the platform (CSS
tokens, UI prefixes). Wherever you read apexquant or aq, it means
Arithmion.
License
MIT — see LICENSE.
中文说明
arithmion-core 是 Arithmion(AI 原生量化平台)的接口层:平台赖以构建的 契约——抽象基类、类型化数据载体、以及基于 entry-point 的插件注册机制。 本仓库不包含引擎实现、数据/券商 provider 或 agent 运行时;它们属于实现了 这些契约的 Arithmion 产品本体。
相关链接——产品在 arithmion.com;学习中心在 arithmion.com/learn:免费的中英双语量化课程, 覆盖市场结构、数理统计、机器学习,以及围绕多重检验、PBO 与 Deflated Sharpe 的验证专线,markdown 版在 quant-learning-path。
包安装在 apexquant 命名空间下(import apexquant.core),与完整产品共享
导入路径:针对这些契约编写的代码在两侧无需修改即可运行。
安装:pip install -e .,要求 Python ≥ 3.11,运行时依赖仅 pandas 与 loguru。
关于 apexquant 与 aq 命名:Arithmion 的前身是毕业设计项目
ApexQuant(论文、
当时的代码库)。品牌更名后
Python 包沿用了原名 apexquant——说白了是改名不值得折腾:导入路径、
entry-point 组名、__apexquant_api_version__ 标记全都得跟着动,却没有
任何功能收益。顺带的好处是论文时期与当前的代码无需迁移即可互通;平台
其它位置的 aq 简写同理。代码中的 apexquant 与 aq 均指 Arithmion。
v0.x 期间接口均不冻结,破坏性变更记录于 CHANGELOG.md。许可证为 MIT。
Metadata
Release files for arithmion-core 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| arithmion_core-0.1.0.tar.gz | 77.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| arithmion_core-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 167.6 kB
Release files / arithmion_core-0.1.0.tar.gz
| Download URL | arithmion_core-0.1.0.tar.gz |
|---|---|
| Size | 77.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
604b59b571ab5e8185221e369f61a608eca0c8aa5b3c7fa0654ce85d1562ffd2
|
|
BLAKE2b-256 checksum How to use checksums |
69f8d190b23b21bddcc6f7811d7350d35c4790e17439ccfa9fa5c50a668a60f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / arithmion_core-0.1.0-py3-none-any.whl
| Download URL | arithmion_core-0.1.0-py3-none-any.whl |
|---|---|
| Size | 90.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6a709be4d695d9f3cd73808ade1e966fba0f7b8ca154fff97105b64d7cfb4dfc
|
|
BLAKE2b-256 checksum How to use checksums |
b8a5dcca95504cd2c9ed34558c287ec0198e460bf6277da6343e2f9a7d514c74
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|