← Results index

Backfill EWZ and DFF and import synthetic levered histories

2026-08-20T17:28:36Z Data pipeline completed Added a provenance-preserving datastore importer that promotes cached EWZ Yahoo and DFF FRED data, generates all 40 registered 2x/3x ideal daily-reset histories with optional DFF financing, atomically upserts 11,718 monthly levels, and materializes 253,928 daily sidecar rows without changing any pre-existing live close. Refreshed public coverage and shared artifacts now show EWZ as DB-backed; focused tests, graph and artifact gates, database integrity, and the 95 MiB size limit all pass.

Objective

Backfill EWZ from the existing Yahoo cache, import the FRED DFF effective federal funds rate, and create reproducible synthetic monthly and daily histories for every 2x/3x leverage mapping while preserving live market observations.

Approach

Added an explicit import-synthetic-levered datastore command and reusable simulation-history functions. The importer resolves every registered base/leverage pair, promotes cached source data, computes causal ideal daily-reset returns with optional prior-observation DFF financing, prepares all series before an atomic monthly batch replacement, and writes the optional daily representation to the gitignored sidecar. Coverage and shared public artifacts were then rebuilt through their canonical producers.

Files changed

Validation

Results

Added a provenance-preserving datastore importer that promotes cached EWZ Yahoo and DFF FRED data, generates all 40 registered 2x/3x ideal daily-reset histories with optional DFF financing, atomically upserts 11,718 monthly levels, and materializes 253,928 daily sidecar rows without changing any pre-existing live close. Refreshed public coverage and shared artifacts now show EWZ as DB-backed; focused tests, graph and artifact gates, database integrity, and the 95 MiB size limit all pass.

Feature completion

A web workflow is inappropriate because this is an operator-only command that mutates local databases, can VACUUM them, and consumes raw market observations that the public static site must not expose. The intended audience is repository data operators using python3 -m backtest.datastore import-synthetic-levered; its calculation and datastore integration are covered by the focused tests and the command documents its controls through --help. Reconsider a web entry point only if the repository gains an authenticated local control plane with mutation authorization, progress/error handling, and a boundary that cannot leak raw source data.

Source artifact: research/results/qm-ea7q.md