Urgent.News

What's breaking now, across thousands of outlets.

Tech

My backtest re-runs when I save the strategy file, and shows which trades changed

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…

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`.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Google Ads Transparency Center API: export a competitor's Google ads

Google's Ads Transparency Center shows the ads that advertisers run with Google, and lets you filter them by Search, YouTube, Shopping, Maps and Play. You can browse it by advertiser or website.

  • Ads Transparency Center API allows export of competitor's Google ads
  • HubSpot CRM ads median lifespan: 319.5 days
  • Python script with Apify account facilitates export process

I Built TubeZap — Get Full YouTube Transcripts in Seconds, Free Forever

I keep running into the same annoyance: there's a 45-minute tutorial on YouTube with exactly one useful answer buried inside it, and the only way to get it is to scrub through the whole thing at 2x…

  • TubeZap is a free YouTube transcript generator
  • Paste YouTube link to get complete transcript instantly
  • Supports multiple formats and accessibility features

More from Sunday 11 October →