Files
ai-exchange/scripts/run_backtest.py
T
2026-04-24 13:39:01 +08:00

19 lines
435 B
Python

from pathlib import Path
import sys
ROOT = Path(__file__).resolve().parents[1]
if str(ROOT) not in sys.path:
sys.path.insert(0, str(ROOT))
from src.services.backtest import BacktestService
def main() -> None:
service = BacktestService()
run_id, outcomes = service.run_backtest(instrument_id=1, limit=100)
print(f"Backtest run id: {run_id}; results written: {len(outcomes)}")
if __name__ == '__main__':
main()