This repository provides a Gymnasium-compatible trading environment, a backtesting workflow, and an optional LLM-driven assistant layer. The project emphasizes reproducibility, safe separation of secrets, and a clear configuration model.
- Provide a Gymnasium trading environment suitable for training and evaluating agents.
- Provide a backtesting path that is reproducible and configurable.
- Provide a system-wide configuration layer for non-secret defaults (LLM model/prompt, IO directories, concurrency) via
system.ini. - Keep secrets out of source control and out of runtime logs.
- Offer a minimal server surface for health/config inspection and future APIs.
- No guarantee of broker/exchange execution correctness for live trading.
- No portfolio optimization suite beyond basic risk controls.
- No UI dashboard requirements.
- Solo Researcher (Primary): Runs gym/backtests locally, iterates quickly, values reproducibility.
- Quant Engineer (Secondary): Integrates with external datasets/providers and CI.
- Operator (Future): Runs paper/live mode with strict safety controls.
- Stored in
.secrets.envand/or.env(not committed). - Examples:
OPENROUTER_API_KEY. - Rule: secrets must never be written to logs or returned via API.
Purpose: stable, system-wide defaults that are not part of a specific backtest/strategy run.
- LLM provider + model + base_url + base prompt
- IO folder conventions
- Concurrency / behavior defaults
Purpose: run-specific configuration for training/backtesting.
- strategy name, symbols, timeframe
- execution assumptions (paper trading, fees, slippage)
- risk constraints
- data provider toggles
- As a researcher, I can run a backtest with a single
strategy.yamlfile and get deterministic outputs. - As a researcher, I can change LLM model/prompt without touching YAML or secrets.
- As a developer, I can inspect loaded config at runtime without exposing secrets.
- Load
system.iniintosettings.system. - Load
strategy.yamlintosettings.runtime. - Load env secrets into Settings fields.
- Provide a single
settingsobject importable across modules.
- Create or expect a root IO directory (default
./io). - Subdirectories:
./io/logs,./io/cache.
- Central log level controlled by env (
log_level) and/or system behavior defaults. - Redaction rule: never log secrets.
/returns a simple status string./healthreturns basic health and mode./config/systemreturns non-secret INI config./config/runtimereturns YAML runtime config./config/secretsreturns only boolean presence flags.
.secrets.envmust be gitignored.- Do not return secret values via HTTP.
- Avoid writing secret values to disk in IO outputs.
- Establish config model (env +
system.ini+strategy.yaml). - Minimal server endpoints for inspection.
- Document usage.
- Implement core gym environment + backtest runner pipeline.
- Standardize output artifacts (metrics, trades, plots) under
io_dir. - Add tests for config loading and redaction.
- Add provider integrations and caching strategy.
- Add a pluggable LLM “assistant” layer for analysis/report generation.
- Add CI checks and linting.
system.ini: system-wide defaultsstrategy.yaml: run-specific backtest/gym config.secrets.env: secrets (not committed)config.py: config loader / settings singletonserver.py: minimal HTTP surface