Can AI-Berkshire Perform Sentiment Analysis on Financial News?

AI-Berkshire performs sentiment analysis on financial news through a dedicated market-sentiment sub-agent within its news-pulse skill, analyzing sell-side ratings, institutional holdings, social media chatter, and technical signals to generate scored sentiment reports.

The xbtlin/ai-berkshire repository includes a sophisticated financial intelligence system that performs sentiment analysis on financial news as part of its broader market intelligence capabilities. This open-source AI agent specifically targets market mood through multi-source data ingestion and LLM-powered interpretation.

How AI-Berkshire Handles Financial News Sentiment Analysis

The News-Pulse Skill Architecture

Within the repository's skill framework, the news-pulse skill orchestrates four parallel analytical agents. According to the workflow definition in skills/news-pulse.md, the fourth agent—designated as the sentiment-tracker—handles market sentiment analysis (lines 92-100).

The Sentiment-Tracker Agent

This specialized agent gathers "soft-data" sources reflecting market psychology, including sell-side analyst rating changes, institutional 13-F filings, short-interest metrics, and social media commentary from platforms like Xueqiu and Reddit.

Data Sources for Financial Sentiment Analysis

The sentiment-tracker aggregates mood indicators from diverse sources:

  • Sell-side analyst ratings: LLM-driven web searches of reports from institutions like Goldman Sachs and Morgan Stanley
  • Institutional holdings: Structured queries of 13-F filings and capital flow data
  • Short-interest metrics: Web-search combined with parsing of short-sale reports
  • Influencer commentary: Custom Python scraper xueqiu_scraper.py pulls commentary from investors like 段永平 (Duan Yongping)
  • Social media chatter: Real-time monitoring of Xueqiu, Reddit, and rumor sites
  • Technical signals: Market data lookups for support/resistance breaches and block trades

Sentiment Analysis Methodology

Each data source undergoes normalization before LLM processing. The analysis follows a three-step protocol defined in the news-pulse workflow:

  1. Identify prevailing sentiment as bullish, bearish, or neutral
  2. Score sentiment strength (high/medium/low) based on evidence volume and reliability
  3. Distinguish factual observations from speculative chatter per the objectivity rules in CLAUDE.md

The output merges with three other analytical dimensions (company events, regulatory policy, industry peers) to form the final news-pulse report (lines 92-115).

Running Sentiment Analysis with AI-Berkshire

Execute the news-pulse skill via the CLI wrapper to retrieve sentiment data:


# Example: invoke the news-pulse skill for Apple (AAPL) covering the last 7 days

# (Assumes the CLI wrapper `ai-berkshire` is installed per the project README)

import subprocess

cmd = [
    "python3", "-m", "ai_berkshire.run_skill",   # generic skill runner

    "news-pulse",                                 # skill name

    "--company", "AAPL",
    "--days", "7",
    "--focus", "sentiment"                       # optional: limit to sentiment dimension

]

result = subprocess.run(cmd, capture_output=True, text=True)
print(result.stdout)   # displays the sentiment-tracker section of the report

Filter specifically for sentiment output using command-line tools:

python3 -m ai_berkshire.run_skill news-pulse --company TSLA --days 14 \
   | grep -A5 "#### 任务 4:市场情绪与卖方/大V(sentiment-tracker)"

Key Implementation Files

The sentiment analysis capability relies on these source files:

Summary

AI-Berkshire delivers targeted financial sentiment analysis through:

  • A dedicated sentiment-tracker agent within the news-pulse skill architecture
  • Multi-source data ingestion including analyst reports, 13-F filings, and social media
  • LLM-powered scoring system that rates sentiment strength and distinguishes facts from speculation
  • Integration with the broader news-pulse workflow for comprehensive market intelligence

Frequently Asked Questions

Does AI-Berkshire support real-time sentiment analysis?

The sentiment-tracker processes real-time market data lookups for technical signals and current social media chatter, though the specific refresh rate depends on the API limits of the underlying data sources and the scheduled execution of the news-pulse skill.

Which social media platforms does the sentiment tracker monitor?

The system monitors Xueqiu (雪球) through the dedicated xueqiu_scraper.py tool, alongside Reddit and other rumor channels, with particular emphasis on influential investors ("大 V") like 段永平 who move Chinese equity markets.

How does AI-Berkshire distinguish between facts and opinions in financial news?

The sentiment analysis adheres to objectivity rules defined in CLAUDE.md, requiring the LLM to explicitly tag content as factual observation or speculative chatter during the scoring phase, ensuring the final report maintains analytical rigor.

Can I run sentiment analysis independently of the full news-pulse workflow?

While the sentiment-tracker operates as one of four parallel agents in the standard workflow, you can isolate sentiment output by using the --focus sentiment parameter or filtering the JSON/text output for the sentiment-tracker section, though the system is designed to provide context alongside company events and regulatory news.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →