Test Coverage: Analytics Module Tests

Resolved 💬 3 comments Opened Dec 6, 2025 by ingoldsby Closed Feb 5, 2026

Overview

Add tests for analytics module which handles betting recommendations and edge calculations.

Target Files

| File | Lines | Current Coverage | Target |
|------|-------|------------------|--------|
| src/analytics/betting_edge.py | ~300 | 19% | 70% |
| src/analytics/kelly.py | ~150 | 0% | 70% |
| src/analytics/value_finder.py | ~150 | 0% | 70% |

Test Categories Needed

1. Betting Edge Tests

  • [ ] test_calculate_edge - Edge calculation from model vs market
  • [ ] test_filter_by_edge_threshold - Min edge filtering
  • [ ] test_multiple_bookmakers - Best odds selection

2. Kelly Criterion Tests

  • [ ] test_kelly_fraction - Basic Kelly calculation
  • [ ] test_half_kelly - Conservative sizing
  • [ ] test_kelly_with_edge_limits - Cap maximum bet size

3. Value Finder Tests

  • [ ] test_find_value_bets - Identify +EV opportunities
  • [ ] test_rank_by_value - Sort by expected value

Acceptance Criteria

  • [ ] Analytics tests comprehensive
  • [ ] Kelly criterion edge cases covered
  • [ ] Combined coverage ≥70%
  • [ ] All tests pass

Labels

test-coverage, analytics, priority-medium

---
Part of test coverage improvement initiative

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗