Skip to content

Feat/phase1 foundation#16

Merged
Ajith-82 merged 7 commits intomainfrom
feat/phase1-foundation
Feb 18, 2026
Merged

Feat/phase1 foundation#16
Ajith-82 merged 7 commits intomainfrom
feat/phase1-foundation

Conversation

@Ajith-82
Copy link
Copy Markdown
Owner

No description provided.

- Implement actual signal generation in ScreenerSignalAdapter
  - Replace stub with rolling window iteration
  - Call real screener logic at each bar for point-in-time simulation
  - Add map_signal helper to convert ScreenerResult to +1/-1/0

- Fix ATR NaN handling bug in BacktestEngine
  - Add bfill() before fillna(0) to prevent division-by-zero
  - Eliminates risk of infinite position sizes in early bars

- Add comprehensive RiskManager unit tests (100% coverage)
  - Test stop-loss calculations for long/short positions
  - Test position sizing with edge cases (zero risk, tight stops)
  - Test order validation (max positions, max exposure)

- Add Download module integration tests
  - Test successful fetch and retry logic
  - Test retry exhaustion scenarios
  - Test batch download pipeline
  - Fix retry counter bug in DataFetcher

- Update backtesting engine to use real signals
  - Remove isinstance() checks for screener types
  - Use adapter.compute_signals() uniformly

Test Results: 34/34 passing (100%)
Coverage: 11% → 28% (RiskManager: 100%, DataFetcher: 91%)
- Rewrote README.md and architecture_documentation.md to reflect current codebase
- Optimized Download module to use batch downloading via yfinance (reduces HTTP requests by ~50x)
- Added batch fetch support to YFinanceProvider and DataFetcher
- Updated tests to mock provider abstraction instead of yf.Ticker
- Fixed integration tests for download and pipeline
- Added --strict CLI flag for rigorous trend filtering (Growth > 0.3%, Vol < 0.10, Strong Up only)
- Decluttered charts by removing SMA 10/30 and Donchian Mid band
- Enabled dynamic columns in PDF reports (Growth, Volatility, Score, etc.)
…-price bias

- Updated TrendlineScreener to calculate slope based on percentage change from start of period
- Ensures consistent trend angles across all price ranges
- Applies to both strict and standard modes
@Ajith-82 Ajith-82 merged commit 271e5c1 into main Feb 18, 2026
1 of 4 checks passed
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.

1 participant