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 (0)