{
  "id": 13635417,
  "title": "My backtest re-runs when I save the strategy file, and shows which trades changed",
  "url": "https://urgent.news/2026/10/11/my-backtest-re-runs-when-i-save-the-strategy-file-and-shows-which",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-11T04:03:41.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/hawkbtcommander/my-backtest-re-runs-when-i-save-the-strategy-file-and-shows-which-trades-changed-13cd"
  },
  "original_language": "en",
  "account": "I'm developing a web-based backtesting tool named Hawk Backtester. One of its standout features is a \"watch mode\" for local Python strategies. Traditionally, editing a strategy, running it in a terminal, and deciphering the output proved cumbersome. The most frustrating part was determining whether slight improvements in PnL were due to the change made or merely chance. Now, the backtest automatically reruns upon saving the strategy file, and it highlights which trades were affected. To use it, install Hawk Backtester via `pip install -U hawk-bt`, then run your strategy file, such as `my_strategy.py`. The strategy is defined using the `hawk_bt` library, with parameters displayed as sliders in the browser. Upon saving the strategy file, the execution engine, compiled to WebAssembly, runs in the browser, while the original Python strategy runs locally and communicates via a WebSocket connection. The diff between runs, indicating changes in trades and PnL, is displayed above the results. Feedback from users is invaluable, and a demo version is available at `https://app.hawk-backtester.com/en/demo/?utm_source=devto&utm_medium=article&utm_campaign=watch_mode`.",
  "summary": "I'm building a backtesting web app called Hawk Backtester on the side. This post is about one feature, a watch mode for local Python strategies. The loop that annoyed me most was edit the strategy, run it in a terminal, open the results, then try to remember what the previous run looked like. The last step was the worst. If PnL went up a little, I couldn't tell whether my change did it or a…",
  "key_points": [
    "Hawk Backtester features watch mode for local Python strategies",
    "Strategy re-runs automatically when saved, showing changed trades",
    "Execution engine compiled to WebAssembly runs in browser"
  ],
  "editors_take": "This development streamlines the backtesting process for local Python strategies, enabling users to instantly see the impact of changes on trades and PnL, and eliminating the need for manual re-running and output analysis.",
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}