Introduces a BacktestClient that replays historical 1-min bars against the existing strategy code, plus a CLI entry point (npm run backtest) that fetches bars from Alpaca and runs the bot over a date range. Makes wait() pluggable so the backtest resolves delays instantly while advancing simulated time. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
27 lines
686 B
JSON
27 lines
686 B
JSON
{
|
|
"devDependencies": {
|
|
"@types/node": "^22.13.1",
|
|
"@typescript-eslint/eslint-plugin": "^8.54.0",
|
|
"@typescript-eslint/parser": "^8.54.0",
|
|
"@vitest/coverage-v8": "^4.0.18",
|
|
"eslint": "^9.39.2",
|
|
"nodemon": "^3.1.9",
|
|
"ts-node": "^10.9.2",
|
|
"typescript": "^5.7.3",
|
|
"vitest": "^4.0.18"
|
|
},
|
|
"scripts": {
|
|
"build": "tsc --build tsconfig.json",
|
|
"start": "node dist/index.js",
|
|
"dev": "nodemon --exec ts-node src/index.ts",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"lint": "eslint src/",
|
|
"backtest": "ts-node src/backtest.ts"
|
|
},
|
|
"dependencies": {
|
|
"@alpacahq/alpaca-trade-api": "^3.1.3",
|
|
"dotenv": "^17.2.3"
|
|
}
|
|
}
|