Add initial implementation of backtesting framework with CLI interface. Introduce core modules for data loading, trade management, performance metrics, and logging. Include Supertrend indicator calculations and slippage estimation. Update .gitignore to exclude logs and CSV files.

This commit is contained in:
2026-01-09 19:53:01 +08:00
parent a25499e016
commit c4aa965a98
15 changed files with 424 additions and 568 deletions

30
.vscode/launch.json vendored
View File

@@ -1,16 +1,22 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python Debugger: main.py",
"type": "debugpy",
"request": "launch",
"program": "main.py",
"console": "integratedTerminal"
}
{
"name": "Python Debugger: cli.py",
"type": "debugpy",
"request": "launch",
"program": "${workspaceFolder}/cli.py",
"console": "integratedTerminal",
"cwd": "${workspaceFolder}",
"args": [
"2025-03-01", "2025-09-22",
"--timeframes-minutes", "60", "240", "480",
"--stop-loss", "0.02", "0.05",
"--exit-on-bearish-flip",
"--csv", "../data/btcusd_1-min_data.csv"
],
"env": { "PYTHONPATH": "${workspaceFolder}" }
}
]
}
}