Skip to content

Add generate_keywords and fix correlate_news substring false-positives#44

Merged
Codex-Crusader merged 1 commit intomainfrom
feature/keyword-generation-and-correlation-fi
Apr 14, 2026
Merged

Add generate_keywords and fix correlate_news substring false-positives#44
Codex-Crusader merged 1 commit intomainfrom
feature/keyword-generation-and-correlation-fi

Conversation

@Codex-Crusader
Copy link
Copy Markdown
Collaborator

@Codex-Crusader Codex-Crusader commented Apr 14, 2026

  • Add generate_keywords() to src/news.py: auto-builds keyword list for any ticker from yfinance metadata (name tokens, executive surnames). Uses a daemon thread with REQUEST_TIMEOUT to avoid hanging on network failures.
  • Fix correlate_news() in src/signals.py: replace plain substring matching (kw in blob) with word-boundary regex (_kw_re). Prevents short keywords like 'gold' from matching unrelated text like 'goldman sachs'.
  • Remove industry/sector from generate_keywords output, too broad to use as correlation keywords without causing noise across all assets.
  • Add CONTRIBUTORS.md to Docs/.
  • Add tests: generate_keywords (known, unknown, network failure, timeout), correlate_news substring false-positive regression.

Part of #35 - v0.3 Arbitrary Ticker Support

  - Add generate_keywords() to src/news.py: auto-builds keyword list for any
    ticker from yfinance metadata (name tokens, executive surnames). Uses a
    daemon thread with REQUEST_TIMEOUT to avoid hanging on network failures.
  - Fix correlate_news() in src/signals.py: replace plain substring matching
    (kw in blob) with word-boundary regex (_kw_re). Prevents short keywords
    like 'gold' from matching unrelated text like 'goldman sachs'.
  - Remove industry/sector from generate_keywords output — too broad to use
    as correlation keywords without causing noise across all assets.
  - Add CONTRIBUTORS.md to Docs/.
  - Add tests: generate_keywords (known, unknown, network failure, timeout),
    correlate_news substring false-positive regression.

  Part of #35 — v0.3 Arbitrary Ticker Support
@Codex-Crusader Codex-Crusader requested a review from SudoMayo April 14, 2026 05:27
@Codex-Crusader Codex-Crusader merged commit 3e372fb into main Apr 14, 2026
3 checks passed
@Codex-Crusader Codex-Crusader deleted the feature/keyword-generation-and-correlation-fi branch April 14, 2026 05:28
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