AURELIUS is a composable financial reasoning infrastructure that provides API-first primitives for quantitative verification and validation. Like Stripe for payments, AURELIUS offers standalone building blocks that fintech teams can integrate into their own workflows.
Core Infrastructure:
- API Primitives: Standalone verification services (determinism scoring, risk validation, policy checking, gate verification)
- Official SDKs: Python and JavaScript client libraries with type safety and async support
- Developer Portal: Interactive documentation at developers.aurelius.ai
- Deterministic Engine: Rust backtesting engine for reproducible simulations
- Orchestration Layer: Python workflows for strategy lifecycle and validation
It is designed for fintech builders who need composable verification primitives rather than monolithic platform solutions.
- Why AURELIUS
- API Primitives
- Core Capabilities
- Architecture
- Repository Layout
- Quick Start
- Using API Primitives
- Backtesting with Alpaca Data
- API and Dashboard
- Validation and Governance
- Performance and Reliability
- Roadmap and Documentation
- Contributing
- License
- Contributors
Most fintech teams build verification and validation logic from scratch, reinventing the wheel for determinism checks, risk validation, and gate verification. AURELIUS provides these capabilities as composable API primitives.
Infrastructure Approach:
- Composable: Use only the primitives you need, integrate into your existing workflows
- API-First: RESTful endpoints with OpenAPI specs, not dashboard-locked
- SDK-Native: Official Python and JavaScript libraries with type safety
- Developer-Focused: Interactive docs, code examples, certification registry
- Standards-Based: Canonical response envelopes, webhook delivery, rate limiting
Think Stripe for payments, but for financial reasoning verification. API Primitives
AURELIUS exposes 8 core verification primitives as standalone API endpoints:
Score backtest result consistency across multiple runs. Detects non-deterministic behavior through variance analysis.
Example:
import requests
response = requests.post(
"https://api.aurelius.ai/api/primitives/v1/determinism/score",
headers={"X-API-Key": "your_api_key"},
json={
"strategy_id": "strat-123",
"runs": [
{"run_id": "run-1", "total_return": 0.15, "sharpe_ratio": 1.8, ...},
{"run_id": "run-2", "total_return": 0.15, "sharpe_ratio": 1.8, ...}
],
"threshold": 95.0
}
)
print(f"Determinism score: {response.json()['data']['score']}")Production promotion readiness with configurable gate definitions and certification registry.
Portfolio metrics verification (Sharpe, Sortino, drawdown, VaR) against configurable thresholds.
Regulatory and business rule compliance validation.
SignPrimitive API Layer (Infrastructure)
- API Primitives (
api/primitives/v1/): Standalone verification endpoints- Determinism scoring, risk validation, policy checking, gate verification
- OpenAPI specification generation for SDK autogeneration
- Canonical response envelope (data/meta/links)
- Authentication (
api/security/): Dual auth (API key + JWT) with rate limiting - Monitoring (
api/primitives/monitoring.py): Latency tracking (p50/p95/p99) - Feature Flags (
api/primitives/feature_flags.py): Per-primitive rollout control
schema: Core traits and canonical data structuresengine: Deterministic backtest engine and portfolio accountingbroker_sim: Simulated order executioncost: Commission/slippage cost modelscli: Command-line workflows and sample strategiescrv_verifier: Verification and policy rule enginehipcortex: Content-addressed artifact and reproducibility support
- Orchestration workflows
- Walk-forward validation tooling
- Strategy generation helpers
- Task/gate automation
api/primitives](api/primitives) — API primitive infrastructure (NEW)
v1/— Primitive endpoints (determinism, risk, policy, gates, etc.)feature_flags.py— Per-primitive rollout controlmonitoring.py— Performance tracking middleware
- api/schemas/primitives.py — Canonical envelope schemas
- api/security — Authentication (API key + JWT) and rate limiting
- api/services — Business logic services
- api/tests/primitives — Primitive contract tests
- crates — Rust crates (engine, simulation, verifier, CLI)
- python — Python orchestration and examples
- api — REST API service and backend integrations
- dashboard — Web dashboard
- examples — Sample scripts and data workflows
- docs — Design and rollout documentation
- openspec — Specification-driven change management
- sdk — Official SDKs (planned: Python, JavaScript)
- Event-driven OHLCV backtesting in Rust
- Modular interfaces for data feeds, brokers, and cost models
- Strategy templates and extensible strategy definitions
- Trade logs, equity curves, and summary metrics output
- Walk-forward validation for out-of-sample testing
- CRV verification for bias and metric sanity checks
- Policy constraints (drawdown, leverage, turnover)
- Evidence-driven pass/fail gates for deployment readiness
- Portfolio optimization (max Sharpe, min variance, risk parity)
- Efficient frontier calculations
- Risk analytics (VaR/CVaR, drawdowns, Sharpe/Sortino/Calmar)
- ML-based parameter optimization (Optuna-driven workflows)
- Position sizing and risk management modules
- REST API for strategy lifecycle and backtest operations
- React dashboard for monitoring and control
- WebSocket support for real-time updates with canonical envelope/events
- Reflexion iteration history and run endpoints
- Orchestrator persisted pipeline runs and stage transitions
- PostgreSQL persistence and Redis caching support
schema: Core traits and canonical data structuresengine: Deterministic backtest engine and portfolio accountingbroker_sim: Simulated order executioncost: Commission/slippage cost modelscli: Command-line workflows and sample strategiescrv_verifier: Verification and policy rule enginehipcortex: Content-addressed artifact and reproducibility support
- Orchestration workflows
- Walk-forward validation tooling
- Strategy generation helpers
- Task/gate automation
- FastAPI-based backend in api/README.md
- React/Vite dashboard in dashboard/README.md
- crates — Rust crates (engine, simulation, verifier, CLI)
- python — Python orchestration and examples
- api — REST API service and backend integrations
- dashboard — Web dashboard
- examples — Sample scripts and data workflows
- docs — Design and rollout documentation
- data — Data artifacts and samples
- specs — Specifications
- Rust 1.70+
- Python 3.9+
- Node.js 18+
- Docker (optional, for full stack)
cargo build --workspace
cargo test --workspacecd python
pip install -e .
```Using API Primitives
### Prerequisites
- API key from developers.aurelius.ai (coming soon)
- Or JWT token from authentication flow
### Example: Determinism Scoring
**Python:**
```python
import requests
response = requests.post(
"http://localhost:8000/api/primitives/v1/determinism/score",
headers={"X-API-Key": "your_api_key"},
json={
"strategy_id": "strat-123",
"runs": [
{
"run_id": "run-1",
"timestamp": "2026-02-16T10:00:00Z",
"total_return": 0.15,
"sharpe_ratio": 1.8,
"max_drawdown": 0.12,
"trade_count": 42,
"final_portfolio_value": 115000.0,
"execution_time_ms": 1250
},
{
"run_id": "run-2",
"timestamp": "2026-02-16T10:05:00Z",
"total_return": 0.15,
"sharpe_ratio": 1.8,
"max_drawdown": 0.12,
"trade_count": 42,
"final_portfolio_value": 115000.0,
"execution_time_ms": 1230
}
],
"threshold": 95.0
}
)
result = response.json()
print(f"Score: {result['data']['score']}")
print(f"Passed: {result['data']['passed']}")
print(f"Issues: {result['data']['issues']}")cURL:
curl -X POST http://localhost:8000/api/primitives/v1/determinism/score \
-H "X-API-Key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"strategy_id": "strat-123",
"runs": [...],
"threshold": 95.0
}'Primitives are disabled by default. Enable via environment variables:
export ENABLE_PRIMITIVE_DETERMINISM=true
export ENABLE_PRIMITIVE_GATES=true
export ENABLE_PRIMITIVE_RISK=true- API Key: 1000 requests/hour
- JWT Token: 5000 requests/hour
Rate limit headers included in responses:
X-RateLimit-LimitX-RateLimit-RemainingX-RateLimit-Reset
See api/README.md for full setup.
See dashboard/README.md for local frontend setup.
make ciA practical script is available at examples/backtest_sp500_weekly_5pct_alpaca.py.
It supports:
- S&P 500 universe proxy data collection via Alpaca
- Reusable local CSV/Parquet input mode
- Weekly threshold strategy variants (
trend_5,mr_ladder_5_10)
Required environment variables:
APCA_API_KEY_IDAPCA_API_SECRET_KEY
Example:
python examples/backtest_sp500_weekly_5pct_alpaca.py \
--symbols-limit 500 \
--feed iex \
--start 2025-02-15T00:00:00Z \
--end 2026-02-15T00:00:00Zvalidated: Strategy generation, backtests, validation, gates, Reflexion, Orchestrator, auth-protected workflow APIs, and canonical WebSocket contract.experimental: Advanced analytics surfaces whose operational readiness is environment-dependent.historical snapshot: Phase completion reports that describe milestone delivery but do not override current evidence-gated release status.
Promotion readiness is represented as a canonical scorecard:
Expanded with default v1 weights:
Where each component is normalized to [0,100]:
D: Determinism/Parity confidenceR: Risk/Validation confidenceP: Policy/Governance complianceO: Operational reliabilityU: User interpretability/decision clarity
Default weight profile (v1):
w1=0.25,w2=0.20,w3=0.25,w4=0.15,w5=0.15
Decision bands:
Green:S >= 85and no hard blockersAmber:70 <= S < 85and no hard blockersRed:S < 70or any hard blocker
Hard blockers are non-compensatory (for example missing run identity, parity failure, lineage/policy blockers): a strategy cannot be promoted even with a high weighted score.
- Strategy generation and listing
- Backtest execution and status (with optional deterministic
seedanddata_sourceinputs) - Validation and gate endpoints
- Reflexion and orchestrator workflow endpoints
- Authentication and authorization support
Reference: api/README.md
- Strategy and backtest monitoring
- Gate status visibility
- Real-time updates via WebSocket
- Portfolio/risk tooling pages
Reference: dashboard/README.md
AURELIUS includes governance-oriented checks:
- Determinism checks for reproducible results
- CRV policy verification and violation reporting
- Walk-forward robustness checks before progression
- Artifact traceability for audits and post-mortem analysis
Relevant docs:
Project includes documented efforts on:
- API caching and query optimization
- Indexing and data access performance
- Load and integration testing
- Containerized deployment and Kubernetes manifests
See:
For status and historical implementation details:
Contributions are welcome.
Please read:
Recommended contributor workflow:
- Create a branch
- Add tests for behavior changes
- Run
make ci - Open a pull request with clear scope and validation evidence
This repository is licensed under the terms in LICENSE.
See the repository contributor history and activity in GitHub Insights.
If you are using AURELIUS internally, consider maintaining an internal changelog of strategy/policy decisions for governance traceability.