Skip to content

AWS Dev Running Demo Overview

This document summarizes the running demo defined by D:\TradAI\demo-architecture.md. The demo scope is dry-run trading in AWS dev, not live exchange trading.

What The Demo Proves

The running demo proves that TradAI can execute a complete strategy workflow in AWS dev:

  1. authenticate through the public HTTPS API;
  2. browse the strategy catalog;
  3. sync and verify market data coverage;
  4. submit a fresh backtest;
  5. track the backtest to completion;
  6. inspect results, KPIs, equity, and report data;
  7. verify traceability with trace_id and git_commit;
  8. compare strategy versions on the leaderboard;
  9. stage a selected model version (legacy MLflow-stage path — see note below);
  10. launch the staged strategy in dry-run mode on ECS;
  11. observe logs, trading status, and PnL snapshots;
  12. promote the selected model version to production without starting live trading (legacy MLflow-stage path);
  13. verify operational observability;
  14. roll back to the previous production model version (legacy MLflow-stage path);
  15. stop and clean up the dry-run ECS service.

v4 note: the v4 deployment plane no longer promotes via MLflow stages/aliases. What trades is the ACTIVE pointer onto an immutable Release; promotion/rollback are epoch-guarded pointer swaps via tradai strategy promote / tradai strategy rollback. The demo scripts for steps 9/12/14 (08-stage-model.sh, 11-promote-production.sh, 13-rollback.sh) still exercise the retired MLflow-stage endpoints and have not yet been ported. The authoritative current flow is the v4 Cutover & Promotion Runbook.

Components On The Demo Path

The demo exercises these deployed components:

  • public ALB entrypoint at https://api-dev.tradai-system.com;
  • Cognito M2M authentication;
  • WAF attached to the dev ALB;
  • backend FastAPI gateway;
  • strategy-service proxy routes;
  • data-collection proxy routes;
  • MLflow registry;
  • Step Functions backtest orchestration;
  • ECS Fargate backtest and dry-run strategy tasks;
  • DynamoDB job/trading state;
  • S3 data, MLflow, result, and config buckets;
  • CloudWatch Logs and dashboard;
  • SNS alert topic.

Script Coverage

The demo is reproduced by shell scripts under scripts/demo/.

Run everything:

bash scripts/demo/run-all.sh

Run individual architecture cases:

00-pre-demo-setup.sh      Pre-demo setup and infrastructure checks
01-login-auth.sh          Login/auth path
02-catalog.sh             Strategy catalog
03-data-sync.sh           Market data sync and coverage
04-submit-backtest.sh     Backtest submission
05-track-progress.sh      Backtest progress polling
06-results-kpis.sh        Results, KPIs, traceability
07-leaderboard.sh         Production leaderboard and demo leaderboard
08-stage-model.sh         Move selected version to MLflow Staging (legacy stage path)
09-dry-run-start.sh       Start dry-run ECS strategy task
10-status-pnl-logs.sh     Logs, trading status, PnL
11-promote-production.sh  Move model version to MLflow Production, no live trading (legacy stage path)
12-observability.sh       SNS, ECS circuit breaker, CloudWatch
13-rollback.sh            Restore previous MLflow Production version (legacy stage path)
14-cleanup.sh             Stop task and scale strategy service to zero

Each script is expected to fail if its corresponding architecture item is not implemented or not working in AWS dev.

Live Trading Boundary

The demo does not start live exchange trading. The Step 11 production promotion case validates model registry state only. It does not launch a live ECS trading service and does not require live exchange credentials.

Expected Final State

After a successful full run:

  • a fresh backtest completed;
  • the completed backtest has a non-empty trace_id;
  • the completed backtest has a real 40-character git_commit;
  • the dry-run ECS task reached RUNNING;
  • logs/status/PnL were readable;
  • model staging, production promotion, and rollback paths succeeded;
  • strategy-e2eteststrategy is back at desired=0, running=0, pending=0, rollout COMPLETED.