Financial markets arenβt just math β theyβre emotion.
Fear. Greed. Panic. FOMO. Confidence. Hesitation.
Every candle tells a psychological story.So I decided to answer one powerful question:
Does market sentiment actually influence trader performance?
To explore this, I combined two datasets:
Bitcoin Fear & Greed Index (daily sentiment)
Hyperliquid Historical Trader Data (real trades: PnL, position size, timestamps)
Once merged, the insights were surprisingly clear.
π Datasets Used
1. Bitcoin Fear & Greed Index
The famous index that quantifies market psychology on a scale of 0β100.
Score Range Market Mood
0β24 Extreme Fear
25β44 Fear
45β54 Neutral
55β74 Greed
75β100 Extreme Greed
Columns:
- date
- value
- classification
- Hyperliquid Trader Executions
Contains:
- Timestamp
- Execution Price
- Size USD
- Side (Buy/Sell)
- Closed PnL
This tells how the trader performed each day.
π§ΉStep 1 β Data Cleaning & Preparation
We converted UNIX timestamps β dates and merged the datasets.
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
sns.set(style="whitegrid")
trades = pd.read_csv("historical_data.csv")
sentiment = pd.read_csv("fear_greed_index.csv")
trades['Timestamp'] = pd.to_datetime(trades['Timestamp'], unit='ms')
trades['date'] = trades['Timestamp'].dt.date
trades_clean = trades[['Timestamp','date','Execution Price','Size USD','Side','Closed PnL']]
trades_clean.rename(columns={'Closed PnL':'pnl'}, inplace=True)
sentiment['date'] = pd.to_datetime(sentiment['date']).dt.date
sentiment_clean = sentiment[['date','value','classification']]
merged = pd.merge(trades_clean, sentiment_clean, on='date', how='left')
Now every trade has the market sentiment associated with it.
π Step 2 β Exploratory Data Analysis
π Fear & Greed Index Over Time
Helps visualize the emotional highs and lows of the market.
π Trader PnL Over Time
Shows profitable and rough periods.
π‘ Average PnL by Sentiment
avg_pnl = merged.groupby('classification')['pnl'].mean().sort_values()
π₯ Key Result:
Best performance: β Greed
Worst performance: β Extreme Fear
The trader clearly performs better when markets are trending and confident.
π Position Size by Sentiment
avg_size = merged.groupby('classification')['Size USD'].mean()
Insight:
Traders take larger positions during Greed phases.
This highlights a psychological pattern:
- Confidence β bigger trades
- Uncertainty β smaller positions
π― Win Rate by Sentiment
merged['win'] = (merged['pnl'] > 0).astype(int)
win_rate = merged.groupby('classification')['win'].mean()
Pattern:
Win rate peaks during Greed, drops during Fear.
πCorrelation Between Sentiment & PnL
corr = merged[['value','pnl']].corr()
π§ Step 3 β Key Insights
β 1. Performance increases in Greedy markets
Trends become cleaner and easier to ride.
β 2. Losses spike during Extreme Fear
Market becomes chaotic.
β 3. Trader takes larger positions when confident
Risk-taking aligns with sentiment.
β 4. Win rate highest in Greed phases
Clear sign that trend-following works better here.
β 5. Sentiment can filter bad trades
Avoiding Extreme Fear days = fewer drawdowns.
π₯ Step 4 β A Simple Sentiment-Aware Trading Strategy
You can turn these insights into a practical system:
π₯ Avoid trades when Fear Index < 20 (Extreme Fear)
Market too volatile β losses increase.
π© Increase position size when Greed Index > 60
Strong trends β higher win rate.
π¨ Trade normally in Neutral zones
Mean reversion works better here.
This simple sentiment filter can significantly improve risk-adjusted returns.
π― Conclusion
This analysis proves:
Market sentiment directly impacts trader performance.
Greed = opportunity
Fear = danger
By incorporating the Fear & Greed Index into decision-making, traders can:
- Avoid bad market conditions
- Maximize trend opportunities
- Understand their own psychological biases
- Improve long-term consistency
This combination of data + psychology = a real trading edge.

Top comments (1)
Market sentiment is often underestimated, yet it influences many trading decisions. Fear, greed, and confidence can affect performance just as much as technical analysis. Great insights.