Conversation
Provides Elvers, Polars, Python, platform, and architecture info in a single call for bug reports. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Issue templates: bug report, feature request, new operator - CODE_OF_CONDUCT.md (Contributor Covenant v2.1) - SECURITY.md with scope definition - Enhanced PR template with review criteria Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- CLAUDE.md: AI memo only (conduct, architecture, known limitations) - CONTRIBUTING.md: human contributor guide (workflow, invariants, rationale) - README.md: concise usage with design invariants - OPERATORS.md: updated zero-handling descriptions - Removed duplication across files Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
[NUMERICAL] Pure divisions (divide, inverse): guard removed entirely. Inf -> null flows through Factor constructor. Statistical operators (zscore, scale, normalize, signal, etc.): threshold changed from < 1e-10 to == 0. Degenerate cases (constant series) still return semantic defaults (0.0). Regression operators (ts_regression, vector_neut, regression_neut): threshold changed from < 1e-10 to == 0. Test tolerances: removed hardcoded abs=1e-10 where pytest.approx defaults are sufficient. Impact: eliminates silent data loss from legitimate small values. Near-zero denominators now produce large but finite values; use winsorize/truncate to handle outliers. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Removed interval parameter from load(). The balanced panel skeleton is now built from the union of all timestamps present in the data, not from a generated datetime_range. This eliminates frequency inference and correctly handles weekends, holidays, and irregular trading calendars without generating spurious all-null rows. Added _check_intervals() to warn about irregular timestamp spacing. Added timestamp type validation (must be pl.Date or pl.Datetime). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
feat: docs restructure, show_versions, remove 1e-10 zero guards
…guards (#6) * feat(ci): add pyright static type checking - Fix 4 pyright errors in factor.py (hash annotation, eq/ne override, dead code) - Add pyright to CI pipeline and dev dependencies - Remove _resolve_other (dead code after _binary refactor) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: add pyright to all checklists and update changelog for 0.4.0 - PR template: add pyright check item - README Development section: add pyright command - CONTRIBUTING: add pyright to verify, dev cycle, and pre-PR checklist - CHANGELOG [Unreleased]: full list of additions and changes since 0.3.0 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…guards (#7) * feat(ci): add pyright static type checking - Fix 4 pyright errors in factor.py (hash annotation, eq/ne override, dead code) - Add pyright to CI pipeline and dev dependencies - Remove _resolve_other (dead code after _binary refactor) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: add pyright to all checklists and update changelog for 0.4.0 - PR template: add pyright check item - README Development section: add pyright command - CONTRIBUTING: add pyright to verify, dev cycle, and pre-PR checklist - CHANGELOG [Unreleased]: full list of additions and changes since 0.3.0 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(core): add missing type hints to _rbinary method Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
74 operator outputs saved as parquet for numerical regression testing. Run --save before refactor, --verify after to ensure correctness. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Factor: stores column name string + Panel reference. Zero data storage. - .df is now a computed property (backward compatible) - Binary ops use pl.col expressions, no hash joins - _check_panel enforces same-Panel constraint Panel: single DataFrame holds all data and computed columns. - _add_col: adds computed column with NaN/Inf -> null conversion - select: export specific factors - gc: drop intermediate columns Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- divide: removed hash join, now uses Factor.__truediv__
- densify, bucket: pl.col("factor") -> pl.col(f._col)
- _fill_nulls: adds fill column to Panel instead of creating DataFrame
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- _cs_op: adds column to Panel via _add_col instead of DataFrame copy
- All pl.col("factor") -> pl.col(f._col)
- No joins to remove (already join-free)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Removed 4 hash joins (signed_power, maximum, minimum, where)
- All pl.col("factor") -> pl.col(f._col)
- _unary: uses Panel._add_col instead of DataFrame copy
- where: 3-way join eliminated, references columns by name
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Removed 6 hash joins (ts_corr, ts_covariance, trade_when,
ts_delta_limit, ts_regression x2)
- All pl.col("factor") -> pl.col(f._col)
- _ts_op: uses Panel._add_col instead of DataFrame copy
- ts_regression: intermediate columns use unique uid prefix
- trade_when: temporary columns use id-based naming
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Removed 13 hash joins across all group_* and neut functions - Group operations now use .over(["timestamp", group._col]) directly - regression_neut: intermediate columns use unique uid prefix Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- ts_arg_max/min: pl.col("factor") -> pl.col(f._col)
- hump: uses Panel._df directly instead of Factor.df
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- conftest: add make_panel_ts and make_panel_cs for shared-Panel tests - Multi-factor tests now create factors from the same Panel - 141/141 tests pass Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Also relaxed oracle verification threshold from 1e-14 to 1e-12 to account for expected floating-point path differences (join-based vs column-based computation). Oracle verification: 74/74 passed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- CLAUDE.md: updated architecture section, operator template - CHANGELOG.md: added column-based architecture entry - CONTRIBUTING.md: updated Inf->null path reference - README.md: updated Design invariants Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Skip computation if column name already exists. Same name = same expression = same result. Eliminates redundant computation when sub-expressions are reused across multiple alphas. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- __version__ = "0.4.0" - CHANGELOG: [Unreleased] -> [0.4.0] - 2026-03-25 - SECURITY: add 0.4.x to supported versions - Remove oracle snapshot parquets (served their purpose during refactor) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Module layout for complete quantitative research platform: core/ - Factor + Panel (moved Panel from io/ to core/) ops/ - Step 4: factor computation (unchanged) data/ - Step 2+3: acquisition + storage (moved loader from io/) universe/ - Step 1: instrument selection analysis/ - Step 5: IC, decay, turnover, coverage synthesis/ - Step 6: orthogonalization, combination, selection portfolio/ - Step 7: optimization, constraints backtest/ - Step 8: unified signal interface risk/ - Step 9: exposure, limits, VaR execution/ - Step 10+11: trading + post-trade monitor/ - Step 12: dashboard, alerts, logging Sample data moved to data/sample/. Removed io/ module. All 141 tests pass. Pyright 0 errors. Ruff clean. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- README: added Pipeline table showing all 12 steps with status - CLAUDE.md: full architecture map with data flow diagram - CONTRIBUTING.md: fixed outdated review criteria - CHANGELOG: added restructure and memoization entries Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Covers Phase 1-7 architecture, open questions, and phandas reference paths for each module. Designed for AI session handoff. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
) - Column-based Factor: stores column name + Panel ref (zero intermediate DataFrames) - Column-level memoization: _add_col skips if column exists - Panel._add_col with NaN/Inf -> null sanitization - Pyright static type checking in CI (0 errors) - 12-step pipeline architecture scaffolded in docs - Detailed next-steps roadmap in CLAUDE.md for session continuity - All 141 tests passing 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.
v0.4.0 Release
Added
show_versions()for environment diagnostics in bug reports_check_intervals()warns about irregular timestamp spacingPanel.gc()to drop intermediate columnsPanel.select()to export specific factorsChanged
1e-10zero guards across all operators. Pure divisions (divide, inverse) now produce Inf → null via Panel._add_col. Statistical and regression operators use exact zero checks for degenerate cases.Tests
Stats