Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ml4t/data
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.1.3
Choose a base ref
...
head repository: ml4t/data
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.1.4
Choose a head ref
  • 1 commit
  • 4 files changed
  • 2 contributors

Commits on Sep 8, 2026

  1. The Yahoo fetch and batch paths agree about the current session's pla…

    …ceholder bar (#47)
    
    * Drop Yahoo's current-session placeholder bar on the single-symbol path
    
    From the US close until Yahoo consolidates the daily bar, `yf.download` returns a
    final row for the current exchange date carrying volume and null OHLC.
    `fetch_ohlcv` passed it to `_validate_no_nulls`, which raised on the whole fetch
    ("yahoo: Column 'open' contains 1 null values"), while `fetch_ohlcv_batch` had
    always dropped it. The same bar therefore succeeded through `batch_load` and
    failed through `fetch`, `load` and `update` in the same run, and `update()` could
    not avoid it because `StorageManager.update` always asks for the current session.
    
    Both paths now share `_drop_priceless_rows`, so they cannot drift again. A row with
    prices and zero volume is a halted session and is kept; a window that holds nothing
    but placeholders raises `SymbolNotFoundError` rather than reporting an empty fetch
    as a successful one. `_validate_no_nulls` stays strict.
    
    Closes ml4t/agent-workspace#1027.
    
    * Assert end to end that a built continuous contract carries no roll gap
    
    Every adjustment assertion on `ContinuousContractBuilder.build` mocked the
    adjustment method, so nothing checked that the series a reader gets back has the
    roll gap removed. The paired-`RollEvent` rewrite that fixed the adjustment classes
    is therefore unguarded at the level the reader uses.
    
    Four tests on a two-contract panel in 10-point contango: the unadjusted series moves
    11.0 across the roll (10.0 of spread, 1.0 genuine), back-adjustment moves 1.0, ratio
    adjustment returns 1/103 - the outgoing contract's own return - and both anchor the
    last bar on its traded price. Checked against a deliberately gap-leaving adjuster:
    it is rejected by both assertions.
    
    Refs ml4t/agent-workspace#12.
    
    * Take gitpython 3.1.62 so the dependency audit is clean
    
    The audit on this PR failed on gitpython 3.1.58, which carries CVE-2026-78679 with
    eight known vulnerabilities, fixed in 3.1.59. It arrives transitively through
    mkdocs-git-revision-date-localized-plugin, so the lock is the only place to move it.
    The last main run predates the advisory, which is why main was green.
    
    `uv run pytest tests/ -q`: 3,619 passed, 280 deselected, unchanged.
    
    ---------
    
    Co-authored-by: Stefan Jansen <[email protected]>
    stefan-jansen and Stefan Jansen authored Sep 8, 2026
    Configuration menu
    Copy the full SHA
    db9b8ef View commit details
    Browse the repository at this point in the history
Loading