News Sentiment Dataset
Access AI-powered sentiment analysis derived from financial news and social media. FinBrain’s NLP models process thousands of articles daily to generate sentiment scores that help you gauge market mood and momentum.
What’s Included
Section titled “What’s Included”The News Sentiment dataset provides:
- Sentiment Score: Normalized numeric score from -1 (bearish) to +1 (bullish) for each date
- Array-Based Data: Historical sentiment returned as an array of date/score objects
- Daily Updates: Fresh sentiment scores every trading day
- Historical Data: Years of sentiment history for backtesting
- Flexible Filtering: Filter by date range or limit the number of results
Coverage
Section titled “Coverage”| Market | Tickers | Update Frequency |
|---|---|---|
| S&P 500 | 500+ | Daily |
| NASDAQ | 3,000+ | Daily |
| NYSE | 2,500+ | Daily |
| Crypto | 100+ | Daily |
Understanding Sentiment Scores
Section titled “Understanding Sentiment Scores”| Range | Interpretation |
|---|---|
| 0.5 to 1.0 | Strong bullish sentiment |
| 0.2 to 0.5 | Moderate bullish sentiment |
| -0.2 to 0.2 | Neutral sentiment |
| -0.5 to -0.2 | Moderate bearish sentiment |
| -1.0 to -0.5 | Strong bearish sentiment |
Sentiment scores are returned as numbers in the v2 API.
Quick Start
Section titled “Quick Start”from finbrain import FinBrainClient
fb = FinBrainClient(api_key="YOUR_API_KEY")
df = fb.sentiments.ticker("AAPL", as_dataframe=True)print(df)import requests
API_KEY = "YOUR_API_KEY"BASE_URL = "https://api.finbrain.tech/v2"headers = {"Authorization": f"Bearer {API_KEY}"}
# Get sentiment for AAPLresponse = requests.get(f"{BASE_URL}/sentiment/AAPL", headers=headers)result = response.json()
for entry in result["data"]: print(f"{entry['date']}: {entry['score']}")You can also filter by date range or limit results:
from finbrain import FinBrainClient
fb = FinBrainClient(api_key="YOUR_API_KEY")
# Get sentiment with date rangedf = fb.sentiments.ticker("AAPL", date_from="2025-01-01", date_to="2025-06-30", as_dataframe=True)print(df.head(30))For complete code examples in Python, JavaScript, C++, Rust, and cURL, see the API Reference.
Visualization
Section titled “Visualization”Plot sentiment scores with the built-in SDK chart:
from finbrain import FinBrainClient
fb = FinBrainClient(api_key="YOUR_API_KEY")
# One-line interactive sentiment chartfb.plot.sentiments("TSLA")
Use Cases
Section titled “Use Cases”Sentiment-Based Trading Signals
Section titled “Sentiment-Based Trading Signals”Generate trading signals based on sentiment thresholds:
from finbrain import FinBrainClient
fb = FinBrainClient(api_key="YOUR_API_KEY")
def get_sentiment_signal(symbol): """Generate trading signal from sentiment score""" df = fb.sentiments.ticker(symbol, as_dataframe=True)
if df.empty: return "no_data"
latest_score = df["score"].iloc[0]
if latest_score > 0.5: return "strong_buy" elif latest_score > 0.2: return "buy" elif latest_score < -0.5: return "strong_sell" elif latest_score < -0.2: return "sell" else: return "hold"
signal = get_sentiment_signal("TSLA")print(f"Signal: {signal}")Sentiment Screening
Section titled “Sentiment Screening”Screen a watchlist for tickers with extreme sentiment:
from finbrain import FinBrainClient
fb = FinBrainClient(api_key="YOUR_API_KEY")
watchlist = ["AAPL", "GOOGL", "MSFT", "AMZN", "NVDA", "TSLA"]
bullish = []bearish = []
for symbol in watchlist: df = fb.sentiments.ticker(symbol, as_dataframe=True) if not df.empty: score = df["score"].iloc[0] if score > 0.5: bullish.append((symbol, score)) elif score < -0.5: bearish.append((symbol, score))
print("Bullish tickers:", bullish)print("Bearish tickers:", bearish)Combine with Price Predictions
Section titled “Combine with Price Predictions”Enhance prediction confidence when sentiment aligns with expected price movement:
from finbrain import FinBrainClient
fb = FinBrainClient(api_key="YOUR_API_KEY")
def analyze_ticker(symbol): """High conviction signals when predictions and sentiment align""" # Get predictions pred_result = fb.predictions.ticker(symbol, prediction_type="daily") expected_short = pred_result["metadata"]["expectedShortTerm"]
# Get sentiment sent_df = fb.sentiments.ticker(symbol, as_dataframe=True) sent_score = sent_df["score"].iloc[0]
# Stronger signal when expected move and sentiment align if expected_short > 0.5 and sent_score > 0.3: return "high_conviction_buy" elif expected_short < -0.5 and sent_score < -0.3: return "high_conviction_sell" else: return "mixed_signals"
result = analyze_ticker("AAPL")print(result)Related Resources
Section titled “Related Resources”- Sentiments API Reference - Endpoint details, parameters, and response schema
- Sentiment-Based Strategies Guide - Build trading strategies
- AI Price Forecasts - Combine with predictions