AlgoQuant
Studio + Engine
AQS Cloud
A modular Rust framework for algorithmic trading.Source-available · Rust

AlgoQuant Engine

Build reusable trading components and run them across backtesting and live execution, with control over your data, brokers and infrastructure.

Owned by AlgoQuantStudio. Available under the PolyForm Shield License 1.0.0 for non-competing uses, including your own research, backtesting and live trading. Using AQE to provide a competing product requires separate written permission.

Modular by designReuse models, pipelines, lifecycle logic, brokers, and datafeeds.
Local and privateRun on infrastructure you control without a forced cloud dependency.
Standalone or connectedUse AQE directly, or add AQS for visual control and monitoring.
Execution and orchestration layer

The runtime underneath a complete quantitative trading system.

AQE owns the path from incoming market events to reviewable trading outcomes. Strategy code stays focused on decisions while the engine coordinates state, execution, persistence, and integrations around it.

01

Coordinate strategy state

Run lifecycle hooks, universe selection, market events, alpha models, insight pipelines, and teardown in a predictable order.

02

Process trading decisions

Represent intent as stateful insights that can be sized, validated, transformed, submitted, filled, rejected, managed, and closed.

03

Keep integrations replaceable

Put execution and market data behind engine traits so broker or provider changes do not force a strategy rewrite.

04

Operate long-running sessions

Persist account, equity, event, metric and insight state for terminal monitoring or optional synchronisation into AQS.

Interactive architecture

See how market data becomes an executed and observable decision.

Explore the modules, follow the animated execution path, and select a node to inspect its responsibility in the runtime.

Interactive AQ Engine architecture

Select a module or insight state to inspect its role. Pan or zoom to explore.

Selected moduleStrategy

Coordinate lifecycle hooks, market events, state, models, and configured runtime components.

Engine benchmarks

Performance, measured.

Rust compiles strategy logic to native code, with explicit resource management and strong compile-time checks. AQE combines that foundation with Polars for data analysis and a consistent framework for trading decisions.

AQE 0.2.2 · Apple M5 Max · 5 paired runs

2 November 2026
Throughput: higher is faster
Pre-optimisationOptimised
Indicators+4.7%
Pre-optimisation26.97 M bars/s
Optimised28.24 M bars/s
Insight Pipes+18%
Pre-optimisation8.33 M stages/s
Optimised9.83 M stages/s
PaperBroker+315.2%
Pre-optimisation168.9 k orders/s
Optimised701.2 k orders/s

Independent, zero-based scale for each pair.

Throughput gains versus the pre-optimisation candidate. Synthetic local workloads; not end-to-end trading performance.

These dated measurements describe the recorded source snapshot, not verification of a later release. They do not measure live broker latency.

Methodology and detailed results

Five paired native runs on the same Apple M5 Max, alternating the pre-optimisation and optimised binaries. Each workload uses 3 warm-ups and 15 samples per run; we publish each variant's slowest median and the p95 from that same run.

Release build: AQE opt-level=3, LTO and one code generation unit. Deterministic in-memory workloads exclude setup, data generation, network, database, UI and MT5 I/O from timed regions. Throughput is operations divided by median duration. This does not measure real broker latency or a complete backtest.

Controlled comparison against the pre-optimisation 0.2.2 candidate, not a released version. Workloads, timed regions, compiler and dependency versions were unchanged.

Validation: 1,081 tests passed; full lifecycle checks preserved identical economic outcomes.

Indicators

250,000 bars: SMA, EMA, RSI and ATR

Median / p95
Milliseconds
Pre-optimisation
9.27 / 11.22
Optimised
8.85 / 9.63
Throughput
28,236,754 bars/s

Insight Pipes

20,000 insights: entry, TTL and reward/risk

Median / p95
Milliseconds
Pre-optimisation
7.2 / 8.86
Optimised
6.11 / 6.33
Throughput
9,828,010 stages/s

PaperBroker

5,000 submissions and fills on one synthetic bar

Median / p95
Milliseconds
Pre-optimisation
29.6 / 30.89
Optimised
7.13 / 10.05
Throughput
701,213 orders/s
Host
Apple M5 Max · Mac17,6 · 18 CPU · 48 GiB
Baseline
Pre-optimisation 0.2.2 candidate · same host and toolchain
Measured snapshot
AQE 0.2.2 @ 8382531 · rustc 1.98.1 (48a229cea 2026-09-01) · cargo 1.98.1 (797e8a9bc 2026-08-05)
Source state
Includes local changes; source hashes are recorded in the JSON report.
Peak memory
Complete suite, RSS: 116.8 MiB → 120.8 MiB

Peak memory did not improve: maximum suite RSS was 3.5% higher in the controlled comparison. Offline live lifecycle median was effectively unchanged.

Historical reference: September 0.2.0 recorded 400,981 PaperBroker orders/s; this candidate recorded 701,213.

Reproduce the recorded source snapshotcargo run --release -p aq-engine --example engine_performance --features runtime --locked

Baseline JSONMeasured JSON reportControlled comparison JSONValidation reportSeptember historical JSONRun 1: Pre-optimisation / OptimisedRun 2: Pre-optimisation / OptimisedRun 3: Pre-optimisation / OptimisedRun 4: Pre-optimisation / OptimisedRun 5: Pre-optimisation / Optimised

aq-engine/src/core/pipeline/mod.rsCurrent trait
pub trait InsightPipe {
    fn version(&self) -> &str;

    fn run(
        &mut self,
        ctx: &mut dyn StrategyContext,
        insight: &mut Insight,
    ) -> InsightPipeResult;
}
Reusable components

Build trading logic once, then compose it across strategies.

Insight pipes are state-aware processors around every trading decision. Combine focused components instead of embedding sizing, time filters, stops, submissions, and position management into one strategy body.

Reuse quantity sizing, market entry, stop-loss, take-profit, and trading-window pipes.
Compose state-aware logic for New, Executed, Filled, Cancelled, Rejected, and Closed insights.
Swap PaperBroker, MT5, Yahoo Finance, or future integrations behind shared traits.
examples/hyperparameter.rsDeterministic sweep
let mut hyperparameters = HyperParameterConfig::new();
hyperparameters
    .set_sweep_id("ema-crossover-v1")
    .add_hyper_parameter(
        HyperParameter::new("atr_period", 14).values([10, 14, 20]),
    )?
    .add_hyper_parameter(
        HyperParameter::new("ema_period", 21).range(10.0, 30.0, 5.0),
    )?;

let mut state = build_state(timeframe.clone());
state.set_hyper_parameter_config(hyperparameters);
state.run_backtest(start, end, timeframe).await?;
Hyperparameter sweeps

Define the domain in code. Let AQE run the permutations lazily.

Register typed discrete values or numeric ranges beside your strategy, then use the same fallback-backed value in alpha models, insight pipes, or strategy variables. AQE expands combinations only while a sweep runs, creates a fresh state for every seed, and persists each result independently.

--hyper-sweep runs every combination sequentially.
--hyper-seed <prefix> runs one reproducible combination.
No flag keeps ordinary hard-coded fallback behaviour.
Backtest-to-live consistency

Keep the strategy-facing workflow stable as the execution environment changes.

AQE uses the same strategy lifecycle and component model across historical research and live sessions. The broker and datafeed composition changes; the strategy does not need a second implementation.

01Historical dataYahoo Finance or MT5 bars
→
02AQ EngineStrategy, models, pipes, risk
→
03Paper executionOrders, fills, account state
→
04Live executionMT5 and monitored sessions
Shared

Strategy lifecycle

Startup, universe, initialisation, bars, insights, pipelines and teardown retain the same runtime order.

Replaceable

Execution and data

UnifiedBroker composes the execution provider and datafeed for the selected environment.

Reviewable

State and outcomes

Backtests persist SQLite results; live sessions expose scoped state for the TUI or AQS.

Operations without lock-in

Run locally, integrate your infrastructure, and keep strategy code private.

AQE is a standalone runtime. AQS is optional, remote nodes are optional, and broker or data providers sit behind integration boundaries you can extend.

No forced cloud dependency for strategy execution.
SQLite backtest artefacts remain inspectable outside AQS.
Terminal monitoring covers metrics, variables, active insights, logs, and sync state.
Broker, datafeed, database, and internal-system integrations can extend the engine traits.
AQ Engine terminal UI showing runtime metrics, insights, variables, watches, and logs
AQ Engine Terminal UIOperate backtests and live sessions directly from the running process.
Current technical surface

Inspect what is implemented today.

The documentation and source expose the current runtime contracts, lifecycle, broker integrations, datafeeds, insight model, and operational state.

Execution

PaperBroker · Mt5Broker

Historical simulation and live MetaTrader 5 order routing behind broker traits.

Read broker docs →
Market data

Yahoo Finance · MT5

Historical bars, quotes, and live data through replaceable datafeed traits.

Read datafeed docs →
Decision model

Insights · Pipelines

Stateful trading intent with processing paths for sizing, validation, submission, and management.

Read pipeline docs →
Visual layer

Optional AQS connection

Synchronise engine state into Studio for visual inspection and live operations.

Read AQS docs →
AlgoQuant Studio rendering a profitable closed AQ Engine insightAlgoQuant Studio rendering a profitable closed AQ Engine insight
AQE state inside AQSStudio turns runtime insight state into an inspectable operational trail.
Choose your surface

Use the engine directly, or add Studio when you want a visual operating environment.

AQE remains useful on its own for developers building custom systems. AQS adds node-based composition, backtest review, deployment controls, live dashboards, and Insight Flow around the runtime.

Practical details

Before you get started.

The workspace, the runtime and the integrations you can use today.

What are AQS, AQE and AQI?

AlgoQuant Studio (AQS) is the desktop workspace. AlgoQuant Engine (AQE) runs your strategies. AlgoQuant Insights (AQI) connects published research with backtests and references.

Explore the workflow
Can I use AQE without Studio?

Yes. AQE is independently buildable and can run strategies from your own Rust project. Studio and cloud synchronisation are optional operating surfaces, not requirements for standalone execution.

Get started with the engine
Can I use Python with AQE?

Python bindings are planned for a future AQE release. AQE currently uses Rust; availability and API details will be announced separately.

Build a Rust strategy
Can I reuse strategy logic in backtests and live trading?

AQE uses the same strategy lifecycle and component model in both environments. Change the broker and datafeed composition rather than maintaining a second strategy implementation. Real fills and execution conditions still depend on your broker and market.

Read about backtest-to-live operation
Which brokers and datafeeds can I use?

Use PaperBroker for simulation, MetaTrader 5 for broker execution, and Yahoo Finance or MetaTrader 5 for market data. Custom integrations implement the broker and datafeed traits. Check the integration guides for requirements and limitations.

Read the integration guides
How is AQE licensed?

AQE is source-available under the PolyForm Shield License 1.0.0 for non-competing uses, including your own research, backtesting and live trading. Providing a competing product requires separate written permission.

Read the licence
Own the runtime

Build on a systematic trading engine you can inspect and extend.

Start with the lifecycle documentation, run the blank strategy, then connect the broker, datafeed, and operating surface your workflow requires.