Repository navigation
Releases: visikai/ohlc-toolkit
Release list
3.1.3
3.1.2
Breaking
Generated schedules now refuse members that contradict their own spec.
Constructing a WindowSchedule, LookbackSchedule or HorizonSchedule directly, or rehydrating one through from_dict, now raises ConfigError when:
- a member is below the recorded minimum, above the recorded maximum, or not a whole multiple of the recorded grain; or
- the parameters are a combination the generator functions already refuse (a log-spaced endpoint that quantizes outside its range; a metallic seed at or above its floor that quantizes below it).
Before this release these paths checked only emptiness, the cap, type, positivity and repeats. For example, WindowSchedule(LogSpacedSpec(count=2, minimum=60s, maximum=120s, grain=60s), windows=(180s,)) constructed, hashed and round-tripped, and LookbackSchedule accepted maximum=28 beside periods=(99,).
Who is affected: only code that builds or edits schedule payloads by hand. Every schedule produced by log_spaced, metallic_recurrence, explicit, their _lookback and _horizons variants round-trips unchanged, so no schedule id moves. Explicit schedules have no bounds, grain or endpoint rules and are untouched.
The refusal message names the offending member and the bound or grain it violates; horizon schedules say "horizon" where window schedules say "window". Members are never regenerated, repaired or replayed.
Fixed
- Unrepresentable magnitudes raise
ConfigError, notOverflowErrororValueError. An integer too large for a float reachedmath.isfinitein the recurrence coefficient validator andmath.isnanin the window-quality coverage validator; both now range-check before converting. A duration amount longer than the interpreter's integer-conversion limit is refused byDuration.parsewith a message naming the limit. Refusal messages echo the value through the bounded-echo helper, so a pathological input cannot put thousands of digits into a message. Accepted coefficients, thresholds and durations are unchanged. - The phased harness checks the anchor's phase even when no emit tick lands inside the frame. The check took its residue from the first emit tick and returned early when there was none, so an off-phase anchor was accepted exactly when the emit step cleared the frame, and the caller got an empty result instead of a refusal. The phase now comes from the anchor and the cadence. An in-phase anchor with no tick in the frame still returns the empty grid.
Removed
- The feature-identity window parser no longer wraps a
ValueErrorthatcoerce_durationcan no longer raise. Every input still refuses withConfigError; no observable refusal changed.
3.1.1
Indicator primitives refuse non-finite derived arithmetic with
DataValidationError. Cutler's RSI checks the combined movement before
division, so finite upward and downward totals whose sum overflows can no
longer produce a plausible zero. Relative range, log-volume ratio and
price-to-moving-average validate their derived readings, including quotient
overflow and underflow to zero before a log. Ordinary formulas, boundary
conventions, missing-input nulls, lookbacks and feature identities are
unchanged.
3.1.0
Added
temporal.add_calendar_columns, withsecond_of_day,second_of_weekandday_of_week: a pure UTC calendar decomposition of an Int64 Unix-seconds column.second_of_dayandsecond_of_weekplace a timestamp inside the UTC day and the UTC week (Monday0through Sunday6);add_calendar_columnsturns both into four cyclic columns,cal_mod_sin,cal_mod_cos,cal_dow_sin,cal_dow_cos, so the day and week wrap without a discontinuity. The clock is UTC by construction: there is no timezone parameter, and aDatetimecolumn is refused rather than converted. The column must be exactly Int64, and existing columns of the same names are refused rather than overwritten.
Purely additive: no existing name, column or signature changes since 3.0.0. Specified by ADR 008 (calendar features and regime context).
3.0.0
Read this first if you are on 2.x. Two calls that used to return a silently wrong result now refuse it with a ConfigError, which is why this is a major version. Nothing else changes shape: no column, name, payload key or signature is removed or renamed.
phased_lookbackandphased_lookback_referencerefuse a frame whose measured cadence does not divide the window. Such a frame used to come back with the indicator null end to end and nothing raised. Pick a cadence that divides the window.metallic_recurrenceandmetallic_lookbackrefuse a seed at or above the lower bound that quantization moves below it. The seed used to be dropped by the bound it was meant to satisfy, so the schedule silently started from its second term. Seeding below the bound on purpose still works.
Added. returns.add_forward_excursions adds forward_mfe_{method}_{H} and forward_mae_{method}_{H}, the best and worst an interval reached after t and no later than t + H, on whichever scale ReturnMethod names, with one shared forward_excursion_{method}_{H}_available_at column. schedules.HorizonSchedule, with metallic_horizons, log_spaced_horizons and explicit_horizons, is a schedule of forward horizons with an identity no window schedule shares: same generators, same bounds, its own horizons payload key, so neither reader accepts the other's payload.
Fixed. Horizon schedule refusals name a horizon, not a window, on the generator path and when a recorded payload is read back. tests/test_public_namespace.py pins the environment of the subprocesses it inspects.
Full detail in CHANGELOG.md under 3.0.0.
2.0.0
The windowed-candle frame now has ten columns rather than nine. The new
one is traded_seconds (Int64): how many seconds inside a window
actually saw a trade, counted as volume > 0 over the source rows the
window covers.
If you are on 1.x, three things need your attention. Any code that
asserts the frame's shape breaks — a nine-column check, a positional
unpack, or a schema equality. apply_quality_policy now REQUIRES
traded_seconds and refuses a frame without it rather than silently
checking one threshold. And WindowQualityPolicy gains
min_traded_seconds, defaulting to 0, which preserves 1.x behaviour
exactly — raising it is opt-in.
Frames materialized under 1.x cannot be read as v2 frames.
Re-materialize them, or keep them and pin ohlc-toolkit>=1.0,<2.0.
This release also adds the input-indicator layer: a phased lookback
harness, a feature-identity record that derives a column's name from
the fields that vary, and four primitives — Cutler's RSI, relative
range, log volume ratio, and price-to-moving-average. Snapshot
verification moves into the toolkit, and two schedule bound defects are
corrected, both breaking.
The full changelog is in CHANGELOG.md under ## 2.0.0.
1.0.0
1.0.0rc1
0.4.0
0.3.3
ohlc-toolkit 0.3.3
Method to calculate future percentage returns has been added.
- The
pandas_tadependency has been removed in favour of replicating required methods directly withinohlc-toolkit.
What's Changed
- 📄 Update license by @ff137 in #17
- ✨ Add function to calculate percentage return by @ff137 in #18
- 🔖 Release 0.3.3 by @ff137 in #21
Full Changelog: 0.3.2...0.3.3