Conversation
README.md: - Added PyPI version badge and CI status badge - Complete operator table: added all missing operators across all categories (was missing ~20 operators including ts_regression, trade_when, winsorize, truncate, group_mean, group_median, group_backfill, all base ops) - Removed non-existent 'ln' from math operators - Added interval parameter example in Quick Start CLAUDE.md: - Section 7: updated code review rules to reflect single-developer mode - Section 9: replaced hardcoded v0.2.0 with generic vX.Y.Z placeholders - Section 10: marked infrastructure setup as already configured Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Replaced marketing language with factual technical statements - Added Numerical Conventions table documenting all design decisions: rank range, ddof conventions, rolling warmup, zero-guard threshold, negative product handling, null/NaN/Inf unification - Usage example now shows realistic alpha pipeline (momentum, vol-adjustment, regression residual, sector neutralization) - Operator descriptions include statistical conventions inline Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Document the dual-mode null handling in arithmetic operators: default propagates null (5.0 + null = null), filter=True treats null as identity element (0 for add/subtract, 1 for multiply). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Merged three overlapping null-handling entries into two - Removed implementation details from ts_product convention - Fixed "compile to" -> "execute as" (more precise) - Removed redundant code comments and output block from Usage - Operators listed with space-separated formatting for readability Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Complete reference for all 79 operators including: - Global numerical conventions (null semantics, zero guards, ddof, rank range) - Per-operator documentation (signature, math, null behavior, warmup) - Explicit comparison notes vs WorldQuant where elvers diverges (rank range (0,1] vs [0,1], ts_product negative handling, null vs NaN) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- README.md: condense Numerical Conventions table, link to OPERATORS.md - CLAUDE.md: add OPERATORS.md reference in Section 4.1, deduplicate commands reference (Section 11), add OPERATORS.md to architecture tree Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace all third-party comparison notes with elvers' own design rationale. Rank convention now includes concrete example output for 5 instruments. ts_product documents why sign-magnitude is necessary without referencing other implementations. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ts_covariance changed from ddof=1 (sample) to ddof=0 (population) to match the library-wide convention. This fixes the broken identity: ts_covariance(x,y,w) / (ts_std_dev(x,w) * ts_std_dev(y,w)) == ts_corr(x,y,w) Previously the mixed ddof (cov=1, std=0) caused the left side to exceed the true correlation by a factor of n/(n-1). ts_corr and ts_autocorr retain ddof=1 in Polars rolling_corr because Polars applies ddof only to the numerator (cov), producing incorrect results with ddof=0. Correlation output is ddof-invariant so the values are unaffected. Cross-validated against numpy to machine precision (diff < 1e-15). [NUMERICAL] ts_covariance output changes: values are now multiplied by (n-1)/n relative to previous output. For window=20, this is a 5% reduction. ts_corr and ts_autocorr output is unchanged.
fix(ops): unify ddof=0 for ts_covariance, fix corr identity
OPERATORS.md rewritten as pure operator reference manual for QR/users: concise signatures, behavior, parameters, edge cases. No design rationale. Design decisions (ddof choice, rank range, NaN unification, zero guard threshold, Polars workarounds) moved to CLAUDE.md Section 4.1 for developers/LLMs. README.md: fix outdated ddof description after ts_covariance change. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
[NUMERICAL] ts_covariance unified to ddof=0, fixing cov/(std*std)==corr identity. Documentation restructured: OPERATORS.md as reference, rationale in CLAUDE.md. Fixed incorrect signatures (trade_when, scale, bucket) and README example. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
v0.3.0 release. Unifies ddof=0 for ts_covariance (numerical change),
restructures documentation, fixes incorrect operator signatures in docs.
Change Type
Numerical Impact
ts_covariance: ddof=1 -> ddof=0. Values change by factor (n-1)/n.
ts_corr, ts_autocorr: unchanged.
Identity cov/(std_x*std_y)==corr now holds (verified against numpy, diff < 1e-15).
Testing
pytest tests/ -v)ruff check elvers/)