Skip to content

Changelog

All notable changes to the TradAI platform will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.


[Unreleased]

Added

  • Backtest realism — fees, slippage, OOS validation (Issue #460): Backtests stop silently overstating live performance.
  • BacktestConfig gains fee_rate, slippage_bps, is_out_of_sample, out_of_sample_period.
  • BacktestResult exposes total_fees, total_fee_pct, is_out_of_sample, out_of_sample_period — extracted from real Freqtrade output: sum(order.cost × trade.fee_{open|close}) + funding_fees, normalized against stats["total_volume"].
  • TradAIStrategy.apply_tradai_slippage(rate, *, is_long, is_entry) biases limit-order prices toward worse fills. __init_subclass__ warns when a subclass overrides custom_*_price without delegating to super() or apply_tradai_slippage (opt out with _tradai_slippage_managed = True).
  • PerformanceThresholds.require_out_of_sample = True by default. Registration/promotion reject results unless is_out_of_sample is True — with a clear error listing the three recovery paths.
  • ModelPromotionService._verify_oos_window checks training_end_date / training_end model tags before claiming OOS on its 7-day validation backtest.
  • CLI strategy-service register-strategy adds --oos / --oos-period; API registration_routes reads the same MLflow tags written by BacktestMLflowLogger.
  • Backend LOCAL executor (subprocess + Docker) now applies the same realism fields (#550): the direct path merges fee/tradai_slippage_bps into a per-run runtime config and stamps OOS onto results; the Docker path passes FEE_RATE/SLIPPAGE_BPS/IS_OUT_OF_SAMPLE/OUT_OF_SAMPLE_PERIOD to the image entrypoint. Fee/slippage/extraction logic is now shared via tradai.common.freqtrade.realism so the cloud and local paths cannot diverge.
  • See Realism Controls for end-to-end usage and the documented backtest-vs-live slippage limitation.
  • Freqtrade pre-trade protections (#443): TradAIStrategy now defines default protections (MaxDrawdown, StoplossGuard, CooldownPeriod); backtests pass --enable-protections by default via the new BacktestConfig.enable_protections field. Cookiecutter template and preflight validation (warns when empty) updated.
  • FreqtradeCLIBuilder.build_backtest_cmd is now the single backtest command builder — the cloud runner, local CLI, and backend LOCAL executor delegate to it (adds --enable-protections and per-run --backtest-directory isolation once).
  • CLI Standardization: Unified output and UX across all CLI commands
  • JSON envelope format (--json) with consistent success/error structure
  • Global --verbose/--quiet flags
  • Semantic exit codes (0-5) for reliable scripting
  • --timeout on long-running commands (backtest quick, live start, optimize run)
  • --dry-run on destructive operations (live stop, emergency-close, version bump, set-version)
  • Progress spinners for async operations
  • Environment Variables Reference: Complete reference for all service environment variables
  • Backend, Strategy Service, Data Collection, MLflow configuration
  • Lambda function settings
  • Local development and production deployment examples
  • Contribution Guide: Developer onboarding documentation
  • Development setup instructions
  • Code standards and style guide
  • Testing requirements and TDD workflow
  • Pull request process
  • Production Readiness Documentation:
  • Deployment checklist with pre/post deployment verification
  • Docker setup guide with LocalStack configuration
  • Performance tuning guide for backtests, data sync, and ML training

Changed

  • Upgraded Freqtrade 2025.102026.4 across the workspace pins.
  • Improved SDK reference documentation accuracy
  • Reorganized developer guides navigation

Fixed

  • Backend LOCAL backtest executor now parses Freqtrade 2024.x+ timestamped backtest-result-*.zip exports via load_backtest_stats (previously always reported 0 trades), with per-job result isolation (#523).

[0.2.0] - 2025-01-11

Added

  • Documentation Site: MkDocs Material documentation with full navigation
  • SDK Reference for tradai-common, tradai-data, tradai-strategy
  • REST API documentation with examples
  • CLI reference documentation
  • Architecture documentation (12 detailed sections)
  • Developer guides (14 step-by-step workflows)
  • Runbooks for operations (8 guides)
  • Troubleshooting guides
  • Strategy templates
  • Glossary of terms

Changed

  • Homepage redesigned with quick start guides
  • Documentation structure reorganized for better navigation

Fixed

  • Broken links in MkDocs documentation
  • Redundant docs/README.md removed to avoid conflicts
  • MLflow adapter tag extraction issue

[0.1.0] - 2025-01-01

Added

Core Libraries

  • tradai-common: Comprehensive shared library
  • Base entities (DateRange, ExchangeConfig, TradingMode)
  • AWS utilities (Secrets Manager, S3, DynamoDB)
  • Circuit breaker and retry patterns
  • HTTP client with resilience
  • Health check framework
  • Logging utilities (LoggerMixin)
  • Configuration management (BaseSettings)
  • Validation framework

  • tradai-data: Data fetching and storage library

  • OHLCV data entities
  • CCXT repository for exchange data
  • AsyncCCXTRepository for concurrent fetching
  • CCXTProRepository for WebSocket streaming
  • ArcticDB adapter for time-series storage
  • Data quality service with gap/anomaly detection
  • Resilient data repository with circuit breaker

  • tradai-strategy: Strategy framework library

  • TradAIStrategy base class (extends Freqtrade)
  • StrategyMetadata for registry
  • StrategyValidator for validation
  • Preflight validation service
  • Sanity check service
  • CI/CD backtest gate
  • FreqAI config builder
  • Strategy linting

Services

  • Backend API: Main API gateway with FastAPI
  • Strategy management endpoints
  • Backtest execution endpoints
  • Data sync endpoints
  • Health check endpoints

  • Data Collection Service: Market data synchronization

  • Scheduled data sync
  • Real-time WebSocket streaming
  • Data quality validation

  • Strategy Service: Strategy execution engine

  • Backtest execution
  • Live trading support
  • Model inference

  • MLflow Service: ML experiment tracking

  • Model versioning
  • Experiment management
  • Model registry

Infrastructure

  • Pulumi IaC: AWS infrastructure as code
  • VPC and networking
  • ECS services
  • Lambda functions
  • Step Functions workflows
  • DynamoDB tables
  • S3 buckets
  • Secrets Manager

CLI

  • tradai CLI: Command-line interface aggregator
  • Backtest commands
  • Strategy management
  • Data synchronization
  • Deployment commands

CI/CD

  • GitHub Actions workflows
  • Docker build pipeline
  • CI/CD pipeline (GitHub Actions)

Security

  • All secrets managed via AWS Secrets Manager
  • No hardcoded credentials
  • OWASP Top 10 mitigations applied

Migration Notes

From Legacy (Pants) to UV Workspace

The TradAI platform migrated from Pants build system to UV workspaces. Key changes:

Aspect Legacy (Pants) Current (UV)
Build pants test :: just test
Dependencies BUILD files pyproject.toml
Workspaces Pants targets UV workspaces
Imports Relative allowed Absolute only

Migration Steps: 1. Update imports to absolute paths 2. Move from @dataclass to Pydantic BaseModel 3. Replace ABC with Protocol classes 4. Use LoggerMixin instead of print() 5. Add type hints to all functions