Algo-trading¶
Dyson does not contain most of its own trading logic. It imports a separate Rust workspace — algo-trading — which holds the reusable trading machinery: signals, actors, order management, backtesting, and market-data formats.
In the dyson repository it lives at external/algo-trading.
If you are new to Dyson, the single most useful thing to learn first is which repo owns what. Most confusion comes from looking for something in the wrong one.
Which repo owns what¶
flowchart TB
subgraph D["dyson — how a strategy is deployed and run"]
D1["Lifecycle, commands, health"]
D2["MongoDB config and versioning"]
D3["NATS transport"]
D4["Kuru and Lighter live adapters"]
D5["Concrete strategies and operator surfaces"]
end
subgraph A["algo-trading — how trading decisions are made"]
A1["Signals and fair value"]
A2["Actors and order intents"]
A3["Order manager and execution traits"]
A4["Market-data formats and replay"]
A5["Simulator and backtesting"]
end
D --> A
classDef own fill:#2e7d32,stroke:#1b5e20,color:#fff
class D,A own
| I want to change… | Go to |
|---|---|
| What a strategy quotes, and when | algo-trading — actors, strategy |
| A new market signal | algo-trading — valuation |
| How orders are tracked and diffed | algo-trading — execution |
| How a backtest fills orders | algo-trading — simulator |
| Parsing or archiving a venue feed | algo-trading — market_data* |
| Start, pause, drain, or shutdown behavior | dyson — crates/runtime |
| Talking to Kuru or Lighter live | dyson — crates/venue-adapters |
| Strategy configuration or deployments | dyson — crates/database |
| A specific strategy's own policy | dyson — strategies/<name> |
The rule of thumb: algo-trading is venue-agnostic and process-agnostic. It does not know about Kubernetes, MongoDB, NATS, or Kuru. Anything that names one of those belongs in Dyson.
Why the split exists¶
The same trading logic has to run in three very different settings:
| Setting | Data source | Execution |
|---|---|---|
| Live trading | NATS live packets | Real venue adapters |
| Historical replay | Archived market-data files | Simulator |
| Signal research | Archived files | None — rows out |
Keeping decisions venue-agnostic is what lets one strategy run in all three without a rewrite. Dyson supplies the live setting; algo-trading supplies the decision logic and the other two settings.
Where to start¶
| Goal | Read |
|---|---|
| Learn the vocabulary | Core concepts |
| Add a signal or change quoting | Signals and actors |
| Find where some code lives | Crate map |
| See how it plugs into Dyson | Runtime and strategies |