Deterministic trading assistant
An investment research assistant where deterministic code owns the data, the backtests and the audit trail, and no strategy trades until it has passed the gates and its owner has signed off.
A personal research tool, run locally. It makes no claim that any strategy is profitable, and nothing on this page is investment advice. Its results are provisional: they rest on unofficial daily price data.
What it does
It takes read-only portfolio exports and daily prices, archives them exactly as received, and admits each source only for the purpose it was checked for. It then fits simple models and tests them against passive baselines under stated cost and tax assumptions. What comes out is a forecast distribution and an evidence card that shows the risks and gaps, never a buy or sell label.
- Evidence before orders. There is no order route in the code, and every evidence card carries the same fixed line: review evidence only, not an order instruction. A later decision allows automated orders only for a strategy that passes the backtest selection gates and that the owner approves with a capital cap, paper trading first and a kill switch. No strategy has passed, so no order path is built.
- Baselines first. A model has to be measured against passive investing before it means anything: 20 static allocations and 27 configured dynamic baselines are in the backtester.
- The LLM comes last. A sandboxed layer where a model proposes research for the deterministic tools to test is designed but not built. The deterministic core had to exist first.
How it's built
- Fifteen Rust crates, one job each. Domain contracts, policy, storage, a SQLite catalog, backtesting, modelling, evaluation, portfolio reconciliation, recommendation, reporting, scheduling and a CLI.
- A byte-exact archive. Source files are kept exactly as received and catalogued, so any result can be traced to the bytes it came from.
- Egress that fails closed. A policy crate decides what may leave the machine. It refuses brokerage credentials even under an exception, allows sensitive data only under an exact active exception, and writes an audit receipt for every decision without the payload.
- Backtests with their limits stated. Every model schedule goes through the same chronological folds, a paired moving-block bootstrap, and subperiod and drawdown-regime checks. Reports carry cost and tax sensitivity and stay labelled provisional until the data is licensed.
- Heavily tested. About 475 tests across the workspace, and CI runs formatting, Clippy with warnings as errors, the tests and a schema-drift check.