Frontend
Does Market Fear Actually Predict Trader Losses? I Tested It With Real Hyperliquid Data
Vedant Tendulkar Dev.to (EN Zone)
6 views
Does market fear actually predict trader losses? I tested it with real Hyperliquid trade data:- thousands of trades, run through a proper statistical test instead of a gut feeling. The answer wasn't a clean yes or no, and that's what made it worth writing up.
The question
"Be fearful when others are greedy, and greedy when others are fearful" is one of the most repeated lines in trading. It's intuitive, it's quotable, and almost nobody checks it against real execution data before repeating it.
So I set out to answer a narrower, testable version of that claim: on Hyperliquid, a perpetual-futures DEX, does the crowd's sentiment about Bitcoin (measured by the Fear/Greed Index) actually line up with better or worse trader performance? If sentiment really carries information, it should show up in closed PnL, not just in vibes.
The data
Two datasets, joined by date:
Bitcoin Fear/Greed Index:- a daily sentiment classification: Extreme Fear, Fear, Neutral, Greed, or Extreme Greed.
Hyperliquid historical trade data:- trade-level records with account, symbol, execution price, size, side, timestamp, closed PnL, and leverage.
Merging the two meant every trade could be tagged with the market's sentiment on the day it happened.
The method
Once the datasets were joined, the approach was straightforward hypothesis testing rather than eyeballing a chart:
Bucket every trade into one of the five sentiment categories.
Run a two-sample t-test comparing average PnL between pooled Fear-side days (Fear + Extreme Fear) and pooled Greed-side days (Greed + Extreme Greed):- the direct test of the "fearful vs greedy" folklore.
Separately, break performance down across all five categories individually, rather than just the two pooled sides, to see if anything gets lost in the pooling.
As a side check, compare PnL on "transition days" (where sentiment flipped from the previous day's classification) against all other days.
The findings
The headline test came back unremarkable: comparing pooled Fear days against pooled Greed days gave a t-statistic of 1.33 and a p-value of 0.18 :- nowhere near the conventional 0.05 threshold. Taken at face value, that says sentiment direction alone doesn't predict average PnL.
But pooling Fear with Extreme Fear (and Greed with Extreme Greed) hides something. Breaking out all five categories individually shows a clean, descending pattern in average PnL:
Sentiment
Avg PnL
Win Rate
Extreme Fear
$338.92
32.3%
Fear
$194.77
41.6%
Neutral
$178.84
54.3%
Greed
$136.22
35.0%
Extreme Greed
$65.94
11.5%
Extreme Fear's average payoff is roughly 5x Extreme Greed's :- but the win-rate column tells a completely different story than the PnL column does. Extreme Greed is bad on both counts: the lowest win rate and the lowest average PnL, which is about as close to a textbook picture of euphoria-driven trading as you'll find :- traders chase the move, get it wrong more often, and the wins that do land aren't big enough to cover the losses.
Extreme Fear is the opposite pattern. Its win rate (32.3%) is actually below Greed's, but its average PnL is the highest of any category. That combination :- losing more often but winning much bigger when you do :- looks like a tail-risk profile: a handful of large, sharp payoffs during panic-driven moves are pulling the average up, even though most individual trades in that bucket lose.
Neutral sentiment, meanwhile, quietly had the best win rate of the whole set (54.3%) with solid, middle-of-the-pack PnL :- the closest thing to a "boring and reliable" regime in the data.
The transition-day check (days where sentiment flipped from the prior day) showed a small uptick in average PnL :- $170.64 on non-transition days versus $180.49 on transition days :- but that gap is minor next to the spread across sentiment categories, and I didn't run a significance test on it, so I'm treating it as a curiosity rather than a finding.
The insight
Here's the "so what": sentiment extremes matter more than sentiment direction.
_
The pooled Fear-vs-Greed test :- the literal version of the trading cliché , comes back statistically empty. But that test throws Fear and Extreme Fear into the same bucket, and Greed and Extreme Greed into another, which washes out exactly the effect that's actually there. The real signal isn't "_is the crowd scared or greedy," it's "how scared or how greedy." Extreme Greed looks uniformly bad. Extreme Fear looks asymmetric, worse odds, better payoff when it works. The moderate categories in between look far more similar to each other than to their "extreme" counterparts, which is precisely why lumping them together erases the pattern.
Limitations
This is a single-asset (BTC sentiment), single-venue (Hyperliquid) analysis over one sample period, and it deserves an honest caveat rather than a victory lap. The average-PnL comparisons are means, not medians; I didn't report variance or standard deviation per category, and PnL distributions like these are rarely close to normal, so a small number of large winning trades could be doing most of the work behind Extreme Fear's high average (a Mann-Whitney U test and a look at per-account concentration would be the natural next step). I also don't have confirmed sample sizes per bucket, so it's possible some categories are thinner than they look, which would make their extremes noisier and less trustworthy. And critically, none of this is causal: sentiment extremes and volatile price action tend to happen at the same time, so it's entirely possible that volatility itself; not sentiment as a distinct signal, is driving both the sentiment reading and the PnL swings. Correlation between a sentiment regime and performance is not evidence that the sentiment index is doing any predictive work on its own.
Code and full report
The notebook, the full statistical writeup, and all the charts referenced above are in the repo:
devp-with-V
/
data-Science
Trader Performance vs Bitcoin Market Sentiment
Overview
This repository contains an analysis exploring the relationship between trader performance and market sentiment. The objective is to uncover hidden patterns and deliver actionable insights that can drive smarter trading strategies, specifically examining whether Bitcoin market sentiment (Fear/Greed Index) is associated with differences in trader performance on Hyperliquid.
This project was completed as part of an assignment to analyze and draw insights from Web3 trading data.
Datasets
The analysis utilizes two primary datasets:
Bitcoin Market Sentiment Dataset: Contains daily classifications of market sentiment (Fear/Greed).
Historical Trader Data (Hyperliquid): Contains trade-level data including account, symbol, execution price, size, side, time, start position, event, closedPnL, leverage, etc.
Note: The raw datasets are not included directly in this repository but were sourced from the provided Google Drive links.
Repository Structure
trader_sentiment_analysis.ipynb: The main Jupyter Notebook containing the data preprocessing, merging, exploratory data analysis (EDA), and…
View on GitHub
Read original: https://dev.to/veduco/does-market-fear-actually-predict-trader-losses-i-tested-it-with-real-hyperliquid-data-50a5
← Previous
What Is Middleware and Why Do Backend Developers Use It?
Next →
Entities Are Not Rows: A Domain Model That Behaves
Related
Advanced JSON Path Operations in WebForms Core 2.1
Frontend
0
DEV Community
Tencent EdgeOne Makers: Deploying a Static Web Project with HTML, CSS, and JavaScript
Frontend
0
DEV Community
Why I Built Another yt-dlp GUI (And Why I Think It Was Worth It)
Frontend
2
DEV Community
End To End Testing: A Practical Guide for Reliable Web Releases
Frontend
2
DEV Community
Comments0
No comments yet — be the first