-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
crypto-specificCrypto-market specific indicators, utilities, and validations.Crypto-market specific indicators, utilities, and validations.help wantedExtra help is welcome from the community.Extra help is welcome from the community.v0.4Release gate work required before shipping v0.4.Release gate work required before shipping v0.4.
Description
Goal
Add multi-timeframe primitives on top of resampling so users can build top-down strategies (e.g., 1h trend + 5m entry).
Why
Issue #6 covers resampling. This issue focuses on timeframe alignment/merge utilities needed for real MTF strategy logic.
Depends on
- Add candle resampling utilities (crypto timeframes) #6 resampling utilities
Implementation prompt
Implement MTF helpers:
alignTimeframes(base, higher, options)mergeTimeframeFeatures(base, higherFeatures, options)- Optional
forwardFillUntilClosemode with strict boundary controls
Rules:
- No lookahead leakage (only finalized higher-timeframe data)
- Deterministic timestamp boundary handling
- Explicit behavior for gaps and missing candles
Scope
- Typed APIs for alignment/merge outputs
- Strict validation for unsorted timestamps and duplicate bars
- Time boundary options documented (UTC/session-aware)
Acceptance criteria
- No future leakage in merged features
- Alignment works for 1m->5m, 5m->1h, 1h->4h fixtures
- Tests validate gaps/partial higher bar behavior
- README contains one MTF example (trend timeframe + trigger timeframe)
Test plan
- Unit tests with handcrafted timestamp fixtures
- Property-style tests for monotonic timestamps and non-leakage invariants
- Example smoke test using exported API only
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
crypto-specificCrypto-market specific indicators, utilities, and validations.Crypto-market specific indicators, utilities, and validations.help wantedExtra help is welcome from the community.Extra help is welcome from the community.v0.4Release gate work required before shipping v0.4.Release gate work required before shipping v0.4.