Urgent.News

What's breaking now, across thousands of outlets.

Tech

Algorithmic Trading: Debug Your Backtest Before Upgrading Your Model

A company releases earnings at 4:05 p.m. Your trading backtest buys its stock at 4:00 p.m., using those earnings to make the decision. The tests pass. The chart looks great. Your model can apparently predict the future. Somewhere in the pipeline, someone joined two datasets on a date column. That five-minute mistake captures what interests me about algorithmic trading as a developer. Before…

The article "Algorithmic Trading: Debug Your Backtest Before Upgrading Your Model" emphasizes the importance of thoroughly testing trading models before implementing them. It uses Python's standard library and synthetic data to illustrate three key questions: whether the model received unavailable information, if its complexity truly enhanced results, and if the trades could execute at the assumed costs.

The author uses a synthetic example of a backtest that buys a stock at 4:00 p.m. based on earnings announced at 4:00 p.m. to demonstrate the risk of look-ahead bias, where using information the model could not have known at the time of decision-making can skew results. The article also explores how LLMs might inadvertently incorporate future information due to their training data, referring to research that suggests this potential leakage.

Additionally, the author stresses the need to evaluate the model's complexity by comparing it to simpler models under identical conditions, to ensure that any perceived improvements are genuine. The piece concludes by suggesting a method to freeze model parameters and prompt settings when testing for leakage, aiming to provide a cleaner assessment of the model's reliability.

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

How to Shrink Key Revocation Latency: Webhook Intake with a Scheduled Polling Backstop

Use the push channel for speed and a scheduled poll for proof. Registered webhooks carry a revocation from the issuer to your gateway in a couple of seconds; scheduled polling is what tells you, an…

  • Webhooks provide fast revocation updates with low latency
  • Scheduled polling offers reliability with latency determined by poll interval
  • Combining both provides immediate proof and backup confirmation

Missouri governor orders guardrails on Flock cameras and ALPRs

  • Missouri Governor Mike Kehoe issued an executive order regulating Flock cameras and ALPRs.
  • The order aims to protect constitutional rights and prevent misuse of surveillance tools.
  • Violations will lead to criminal referral, disciplinary actions, and potential license revocation.

More from Thursday 17 September →