Skip to content

Add golden-output regression test for feature engineering - #194

Merged
ch55secake merged 5 commits into
mainfrom
copilot/add-golden-output-regression-test
Apr 20, 2026
Merged

Add golden-output regression test for feature engineering#194
ch55secake merged 5 commits into
mainfrom
copilot/add-golden-output-regression-test

Conversation

Copilot AI commented Apr 19, 2026

Copy link
Copy Markdown
Contributor

Description

Existing feature tests only validated shape and column presence — silent value regressions (wrong window, off-by-one, incorrect column wiring) would pass undetected. This adds three complementary test classes that assert on computed values directly.

Changes in this pull request

  • Add TestKnownInputSanity to test_feature_engineering.py: constant-price OHLCV input (all prices = 100) where all SMA/EMA/WMA/HMA ≈ 100, ATR = 0, and Momentum_n = 0
  • Add TestCrossIndicatorConsistency to test_feature_regression.py: verify FE output matches ti.xxx().shift(1) directly for SMA_10, ATR, RSI, and Momentum_5
  • Add TestGoldenOutput to test_feature_regression.py: hard-coded last-5-row snapshot for 10 key features (seed=42, n=50) to catch silent value regressions
  • Apply ruff format . to ensure consistent code style

… golden snapshot)

Agent-Logs-Url: https://github.com/ch55secake/hyperion/sessions/ee73702d-5f4c-49dc-b185-845c802d3c72

Co-authored-by: ch55secake <87881861+ch55secake@users.noreply.github.com>
@ch55secake ch55secake changed the title [WIP] Add golden-output regression test for feature engineering Add golden-output regression test for feature engineering Apr 20, 2026
@ch55secake

Copy link
Copy Markdown
Owner

@copilot run ruff format .

Agent-Logs-Url: https://github.com/ch55secake/hyperion/sessions/9acac620-170c-4a5e-b3c3-2711703b0835

Co-authored-by: ch55secake <87881861+ch55secake@users.noreply.github.com>

Copilot AI commented Apr 20, 2026

Copy link
Copy Markdown
Contributor Author

@copilot run ruff format .

Done — ruff format . reformatted tests/feature/test_feature_engineering.py (commit 287374d).

@ch55secake
ch55secake merged commit 971ef10 into main Apr 20, 2026
7 checks passed
@ch55secake
ch55secake deleted the copilot/add-golden-output-regression-test branch April 20, 2026 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Testing: Feature engineering tests should validate computed values, not just structure

2 participants