This project explores the relationship between Bitcoin market sentiment (based on the Fear & Greed Index) and real-world trader performance from the Hyperliquid trading platform. It includes data analysis, visualizations, and a machine learning model to predict trade profitability based on market sentiment and trade-related features.
Can market sentiment indicators (like "Fear" and "Greed") help predict whether a crypto trade will be profitable?
- Columns:
date,value,sentiment - Simulated sentiment was used because original data did not cover the recent time window of trader data.
- Columns:
Account,Symbol,Execution Price,Size Tokens,Side,Timestamp,Closed PnL, etc. - Timestamp in milliseconds was parsed to generate
date.
- Python
- Pandas, NumPy
- Matplotlib, Seaborn
- Scikit-learn (for ML modeling)
- Bar plot: Average Closed PnL grouped by sentiment (Fear, Greed, etc.)
- Buy ratio distribution by sentiment group
- Correlation matrix between sentiment and Closed PnL
- Model:
RandomForestClassifier - Features used:
sentiment_score(encoded from sentiment)Execution PriceSize TokensTrade Side(buy/sell encoded)
- Class balancing was performed to fix the model bias toward loss-making trades.
- Accuracy: 77%
- F1-Score: 0.77
- Both profit and loss trades are now correctly classified.
- Market sentiment alone shows very weak correlation with profit (r ≈ 0.004).
- Adding trade-specific features improves prediction significantly.
- Traders show slightly higher profit during periods of "Greed".
- Buy vs. sell ratios remain fairly balanced across sentiment groups.