Skip to content

Samyuktha0/bitcoin-sentiment-trader-analysis

Repository files navigation

πŸ“Š Bitcoin Market Sentiment vs Trader Performance Analysis

This project explores how Bitcoin market sentiment β€” measured by the Fear & Greed Index β€” influences trader performance on the Hyperliquid platform. Using real execution data and sentiment scores, we uncover patterns, build predictive models, and offer strategic insights to optimize trading decisions.


πŸ“ Datasets Used

1. Bitcoin Fear & Greed Index

  • Source: Alternative.me
  • Columns: date, value, classification (e.g., Extreme Fear, Fear, Neutral, Greed)

2. Hyperliquid Historical Trader Data

  • Source: Proprietary execution logs
  • Columns include:
    • account, symbol, execution price, size, side, timestamp, start position, event, closedPnL, fee, leverage, etc.

🎯 Objective

To explore the relationship between trader performance and market sentiment, uncover hidden behavioral patterns, and deliver insights that can drive smarter trading strategies.


πŸ§ͺ Methodology

βœ… Data Processing

  • Cleaned and merged sentiment data with trader logs
  • Converted timestamps and aligned formats
  • Encoded categorical variables (e.g., sentiment, side)

🧠 Feature Engineering

  • PnL_per_token: Profit per token traded
  • efficiency: PnL relative to execution price
  • Time-based features: hour, day_of_week

πŸ“Š Exploratory Analysis

  • Sentiment distribution
  • PnL trends across sentiment phases
  • Correlation heatmaps

πŸ€– Predictive Modeling

  • Random Forest Regressor to predict Closed PnL
  • Features: execution price, trade size, sentiment, time features
  • Evaluation: RΒ² score, RMSE

πŸ“ˆ Key Insights

  • Traders tend to perform better during Greed phases, with higher average PnL and efficiency.
  • Extreme Fear correlates with lower execution efficiency and smaller trade sizes.
  • Time-of-day and day-of-week features show subtle but consistent performance patterns.
  • Sentiment is a valuable signal when combined with trade metadata.

πŸ“¦ Files Included

File Description
sentiment_trader_analysis.ipynb Full Jupyter notebook with code, charts, and models
historical_data.csv Raw trader execution data
fear_greed_index.csv Daily sentiment scores
merged_trader_sentiment_analysis.csv Final merged dataset with engineered features
sentiment_strategy_summary.csv Aggregated insights by sentiment phase

πŸ“Œ How to Run

  1. Clone the repo:
    git clone https://github.com/yourusername/bitcoin-sentiment-trader-analysis.git
    cd bitcoin-sentiment-trader-analysis
    

About

Analyzing trader performance based on Bitcoin market sentiment using Hyperliquid data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published