Implementation:AI4Finance Foundation FinRobot extract catalysts from news
| Knowledge Sources | |
|---|---|
| Domains | Finance, News_Analysis, Deterministic_Compute |
| Last Updated | 2026-10-18 00:00 GMT |
Overview
Concrete tool for converting classified news items into structured CatalystEvent objects with source-authority-weighted scoring, provided by the FinRobot compute layer.
Description
The extract_catalysts_from_news function maps high-importance news items to CatalystEvent objects. Only news with importance ≥ min_importance become catalysts. Each event carries:
- category: Classified catalyst type (market, product, regulatory, M&A, etc.)
- headline / sentiment / impact_score: From the news item
- probability: Internal net-sentiment weight, tiered by source authority (SEC primary 1.0, standard news 0.7, plaintiff-solicitation PR 0.25) — NOT a displayed forecast
- reasoning / published / url: Provenance for the event
This is a deterministic conversion — no LLM call. The LLM classifies the news upstream; this function converts the classified items to structured catalysts.
Usage
- Equity_Research workflow (Step 2): Called after news data is fetched and classified to produce the catalyst events for the report.
- Import this when you need to convert classified news items into structured catalyst events. Use the companion cluster_near_duplicates, compute_expected_impact, and summarize_catalyst_outlook for the full catalyst pipeline.
Code Reference
Source Location
- Repository: FinRobot
- File: finrobot_desktop/finrobot/engine/compute/operators/catalyst.py
Signature
def extract_catalysts_from_news(
news_items: list[NewsItem],
min_importance: int = 3,
) -> list[CatalystEvent]:
"""Convert high-importance news items to CatalystEvent objects.
Only news with importance >= min_importance become catalysts.
Deterministic conversion -- no LLM call.
Args:
news_items: Classified news items from news.py pipeline.
min_importance: Minimum importance threshold (inclusive).
Returns:
List of CatalystEvent objects derived from qualifying news.
"""
Import
from finrobot.engine.compute.operators.catalyst import (
extract_catalysts_from_news,
cluster_near_duplicates,
compute_expected_impact,
summarize_catalyst_outlook,
)
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| news_items | list[NewsItem] | Yes | Classified news items with title, url, sentiment, importance, category, summary, published |
| min_importance | int | No | Minimum importance threshold (inclusive, default 3) |
Outputs
| Name | Type | Description |
|---|---|---|
| events | list[CatalystEvent] | Catalyst events with category, headline, sentiment, impact_score, probability (source-weighted), reasoning, published, url |
Usage Examples
Extract and Summarize Catalysts
from finrobot.engine.compute.operators.catalyst import (
extract_catalysts_from_news,
cluster_near_duplicates,
summarize_catalyst_outlook,
)
# news_items: list[NewsItem] from the news fetch + classification pipeline
events = extract_catalysts_from_news(news_items, min_importance=3)
events = cluster_near_duplicates(events)
outlook = summarize_catalyst_outlook(events)
print(f"Net sentiment: {outlook.net_sentiment:.2f}")
print(f"Top positive: {[e.headline for e in outlook.top_positive]}")