Skip to content

v1.4.0 — Feat: data pipeline CLIs (qr-collect, qr-mdrs-event-detect)

Choose a tag to compare

@rpycgo rpycgo released this 04 Apr 04:18
· 195 commits to main since this release

What's changed

New features

  • qr-data-collect — fetch historical OHLCV data from Binance Futures
    and save to data/crypto/binance/futures/<symbol>_<interval>.csv
  • qr-mdrs-event-detect — detect breakout events from preprocessed OHLCV
    data and save to data/events/<symbol>_<interval>.toml with range
    expansion detection. Skips detection automatically if the requested
    range is already covered. Use --force to re-run.

Improvements

  • CryptoLoader now accepts project_root at construction instead of
    computing paths from __file__. Added fetch() and save() methods
    for explicit collection and persistence.
  • data_settings.toml updated with explicit ohlcv_directory and
    events_directory paths replacing the generic output_directory.
  • backtest.py updated to use new CryptoLoader signature and load
    events from data/events/ via DatasetBuilder.load_events_from_path().
  • events files migrated from events/ to data/events/ and re-tracked
    with DVC at directory level.

New modules

  • src/data/cli/ — asset-agnostic data collection CLI
  • src/strategies/mdrs_sde/cli/ — mdrs-sde specific CLI tools

Usage

# Collect OHLCV data
qr-data-collect --symbol BTCUSDT --start 2020-01-01 --end 2025-12-31

# Detect breakout events
qr-mdrs-event-detect --symbol BTCUSDT --start 2020-01-01 --end 2025-12-31

# Run backtest
qr-backtest --model mdrs_sde_btc --symbol BTCUSDT