Data Science Assignment — Round 0 — PrimeTrade.ai
This project looks at whether Bitcoin market sentiment (Fear vs Greed) is related to how well traders actually perform, using:
- Fear & Greed Index — daily Bitcoin sentiment score and classification (Feb 2018 – May 2025)
- Hyperliquid Historical Trader Data — individual trade records from 32 accounts (May 2023 – May 2025, ~211k trades used)
pip install pandas numpy matplotlib
python analysis.pyData files are not included in this repo due to size. Place historical_data.csv and fear_greed_index.csv inside a data/ folder before running.
analysis.py— full analysis: merges the two datasets, computes win rate / PnL / positioning by sentiment, checks correlations, and generates chartscharts/— output charts (win rate, PnL, long/short positioning, trade size, and sentiment vs PnL scatter)Bitcoin_Sentiment_Analysis_Report.docx— full write-up with findings and strategy recommendations
- Win rate and average profit follow a U-shape across sentiment levels — highest during Fear (87.3%) and Extreme Greed (89.2%), lowest during Extreme Fear (76.2%) and Greed (76.9%)
- Traders lean long as fear increases (68.8% long in Extreme Fear) and lean short as greed increases (54.9% short in Extreme Greed) — a contrarian pattern
- Average trade size shrinks from $8,041 (Fear) to $2,780 (Extreme Greed)
- Profit earned during Fear and profit earned during Greed are not correlated at the account level (r = -0.007) — different traders seem to do well in different regimes
Full details and strategy implications are in the report.
The full historical trader dataset (~2.5M rows) was too large to process end-to-end, so this analysis uses a filtered sample of ~211k trades spanning May 2023–May 2025 across all 32 accounts.