a461005015512a7b9a638f726c66fbba400e0336
Implements issue #7 - Backtest Engine for historical strategy testing. Changes: - Created AveCloudClient for fetching klines from AVE Cloud Data API - Implemented BacktestEngine with condition matching (price_drop, price_rise, volume_spike, price_level) - Implemented signal generation and portfolio simulation - Calculates metrics: total_return, win_rate, max_drawdown, sharpe_ratio, total_trades - Implemented async/background backtest execution via FastAPI BackgroundTasks - Stores results in backtests table and signals table - All backtest API endpoints with JWT auth and ownership validation API Endpoints: - POST /api/bots/{id}/backtest - Start backtest - GET /api/bots/{id}/backtest/{run_id} - Get status/results - GET /api/bots/{id}/backtests - List all backtests - POST /api/bots/{id}/backtest/{run_id}/stop - Stop running backtest
Description
Research and documentation repository
Languages
Python
63%
Svelte
30.2%
TypeScript
6.2%
Shell
0.3%
JavaScript
0.2%