news-sentiment-finbert

Installs, diagnoses, and operates FinBERT-based Chinese financial news sentiment classification pipelines.

1.5k|337|Updated Apr 15, 2026
One-click install
npx skills add https://github.com/qusong0627/QuantMind --skill news-sentiment-finbert-qusong0627
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: news-sentiment-finbert
Source: https://github.com/qusong0627/QuantMind/tree/main/skills/news-sentiment-finbert
Command: npx skills add https://github.com/qusong0627/QuantMind --skill news-sentiment-finbert-qusong0627

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires transformers.

What problem does it solve? RSS news sentiment scoring in QuantMind often silently degrades to all-neutral labels when the FinBERT model or transformers dependency is missing, leaving users unable to filter bullish/bearish news or trust sentiment statistics. ## Core Features & Use Cases - FinBERT Installation & Repair: Checks transformers in quantmind and quantmind-celery containers, installs missing packages, downloads and syncs the bardsai/finance-sentiment-zh-base weights (~100MB) across containers for offline use. - Sentiment Failure Diagnosis: Verifies whether FinBERT is active by inspecting the model_version field for the +finbert suffix in the news_article_enrichment table, distinguishing dictionary-only fallback from full two-level fusion. - Lexicon Expansion & Full Recompute: Imports a 51,213-term finance sentiment lexicon (DLUT, pysenti, NTUSD, RSS-mined terms) and triggers force rebuilds of 410k+ articles via the enrichment API with progress polling. - Use Case: When the RSS panel shows nearly all neutral news, run the diagnostic query, reinstall FinBERT in both containers, restart celery, and trigger a full rebuild so bullish/bearish labels appear in the news panel and per-stock news tabs. ## Quick Start Diagnose why RSS news sentiment shows all neutral and reinstall FinBERT in the quantmind containers, then trigger a full sentiment recompute.

Frequently Asked Questions about news-sentiment-finbert

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why is my RSS news sentiment all neutral?

All-neutral sentiment usually means FinBERT is not loaded, so the pipeline falls back to dictionary-only scoring with too few words. Check the model_version column in news_article_enrichment for a +finbert suffix to confirm whether FinBERT is active.

How do I install FinBERT for Chinese financial sentiment analysis?

Install transformers in both the quantmind and quantmind-celery containers with pip, then trigger the model download of bardsai/finance-sentiment-zh-base. Copy the HuggingFace cache between containers via tar pipe so the celery worker can load weights offline.

How do I recompute sentiment for historical news articles?

Call the /api/v1/news/enrichment/rebuild-all endpoint with force=true and an admin bearer token to recompute all articles in the background. Poll the rebuild-progress endpoint for status, and avoid restarting celery during the multi-hour run.

Can FinBERT run offline without HuggingFace access?

Yes, once weights are cached under /root/.cache/huggingface/hub, set HF_HUB_OFFLINE=1 and load the pipeline locally. The skill documents syncing the cache from the main container to the celery worker via a tar pipe.

How do I add new sentiment words to the finance lexicon?

Append terms to backend/scripts/data/finance_sentiment_lexicon.tsv in term, polarity, weight format, then run import_sentiment_lexicon.py inside the container. Trigger the enrichment run endpoint so the NewsMatcher reloads and new words take effect.