Trader is a Go algorithmic-trading framework with a supported external strategy/research API. Its private runtime provides capabilities for:
- market research
- backtesting
- broker simulation
- paper trading
- eventual live execution
Trader is in an early, greenfield architectural phase. Core public packages, adapters, and application services are still being established. The repository is under active development.
Trader is not ready for real-money trading. Paper trading is the intended default operating mode for any live-like runtime; real-money execution is not available and is not scheduled as a milestone deliverable in the current plan.
Trader's architecture is guided by a small set of principles:
- Deterministic by design. Time, identifiers, data order, and simulation models are controllable so that backtests are reproducible.
- Paper trading by default. A minimally configured live runtime never submits real-money orders; enabling real money requires an explicit, operator-visible decision.
- Strategies emit intents, not broker orders. Strategies describe what they want to accomplish; an execution layer translates intents into concrete orders.
- Risk and execution are separate stages. Risk decides whether a proposed exposure is acceptable; execution decides how to realize it.
- Broker truth is reconciled into local state. The broker is authoritative for orders, fills, positions, and balances; Trader maintains reconciled projections for speed, reporting, and recovery.
Trader's supported Go API is the external strategy/research/value surface:
sdk, indicator, analysis, marketdata, instrument, num, order,
version, and protocol/strategy/v1. Runtime composition, data acquisition,
brokers, orders, backtesting, and reporting live under internal/ (ADR-065).
Guest strategies use sdk (github.com/rustyeddy/trader/sdk).
See examples/sdk-minimal for a complete example.
sdk.Clock exposes host time through Now(); Protocol v1 has no guest timer
capability. Runtime packages are not supported external imports.
See the package boundary matrix and Developer's Guide for public contracts and private implementation details. This pre-release change has no compatibility shims.
- User's Guide
- Developer's Guide
- Framework requirements
- Framework architecture
- Architecture Decision Records
- Package boundaries
- Contribution guide
- Workflows
- Testing
- M0 foundation review
Trader uses a Makefile to wrap the standard Go toolchain. The available
targets are:
make fmt— format sources withgo fmt ./...make fmt-check— verify sources are already formattedmake vet— rungo vet ./...make test— rungo test ./...make race— run tests with the race detectormake check— runfmt-check,vet,test, andrace(default target)
Trader is distributed under the BSD 2-Clause License. See LICENSE for the full text.
An earlier Trader implementation exists in a separate repository. The new Trader treats it as a selective code donor and behavior reference: proven algorithms and test fixtures may be transplanted after being adapted to the new architecture. The legacy repository is not a build or runtime dependency of the new Trader, and its package layout, configuration model, and broker coupling are not carried forward.