Urgent.News

What's breaking now, across thousands of outlets.

Tech

Your Backtest Can Pass Every Unit Test and Still Know the Future

A two-timestamp schema and a future-corruption test can catch silent look-ahead leakage in financial feature pipelines. A backtest does not need an obvious bug to cheat. The feature calculations can be correct. The train/test split can be chronological. Every unit test can pass. Yet the model may still be reading financial data that was revised, restated, or simply unavailable when the historical…

A two-timestamp schema and a future-corruption test can reveal silent look-ahead leakage in financial feature pipelines. This leak occurs when a model reads financial data that was revised or unavailable at the time of the historical decision, even if the backtest appears bug-free. It is crucial to distinguish between event time (when the fact becomes true) and knowledge time (when the system can actually use that fact).

A naïve backtest often joins datasets only on event time, missing the critical availability timestamp. The correct approach is to add an "available_at" timestamp, which is the later of the publication and ingestion times, indicating when the system could legitimately use the value. Every fact should have its own availability timestamp, and versions should be appended instead of overwriting when new data arrives.

The SEC company-facts API serves as an example, providing multiple timestamps such as reporting dates, accession numbers, and filing dates. A production pipeline should capture the highest-precision dissemination timestamp from its source. The key is to build features with an "as-of" boundary, ensuring no candidate row crosses the information boundary.

Pandas' merge_asof can be used for backward-looking joins, but the join key should represent availability, not just the date the observation describes. To prevent look-ahead leakage, a test can be added that poisons the future by calculating features at a historical cutoff and then corrupting every source value that became available after that cutoff. If the output changes, it indicates a path for backward information leakage.

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

Pro Sells Time, Not Safety — ELY Agent Input Preflight v0.8.0

ELY Agent Input Preflight v0.8.0 is released. This release introduces an optional paid Pro entitlement, but I made one rule non-negotiable: Pro sells time, not safety.

  • Pro entitlement introduced in ELY Agent Input Preflight v0.8.0
  • Community edition retains verification and safety core
  • Pro focuses on selling time, reducing developer friction

Database Transactions & Consistency

⚡ TL;DR: Transactions guarantee all-or-nothing, but the lever that actually prevents anomalies is your isolation level . Learn to pick it deliberately, choose optimistic vs pessimistic locking by…

I built a zero-dependency CLI to snapshot the remote job market into CSV/JSON/SQLite

I had a recurring need: a reproducible, offline snapshot of the remote-job market I could open in a spreadsheet, load into a database, or feed into a script — without scraping five job boards myself…

  • Developer creates CLI tool remote-jobs-export
  • Tool snapshots remote job market in CSV, JSON, SQLite
  • Offers zero-dependency, honest, and queryable data

Convert HEIC to JPG on Windows 11 Without Uploading (Free)

You copy a batch of photos from your iPhone to your Windows 11 PC — via USB cable or iCloud — and instead of familiar .jpg files you get a folder full of .heic files that Windows refuses to open.

  • Windows 11 natively supports HEIC files since Windows 11
  • Users can convert HEIC to JPG without uploading via browser-based converters
  • Browser-based converters process files in memory, preserving privacy

More from Monday 5 October →