While others analyze the past, we predict trader behavior using emotion-driven sentiment data.
This project explores the relationship between Bitcoin market sentiment (Fear & Greed Index) and trader performance using real trading data. The goal is to uncover how emotions like fear or greed influence profitability and build a predictive model to forecast trader success.
Feer Greed Index: fear_greed_index.csv Columns: timestamp, value (Fear-Greed Index), classification, date Historical Data: historical_data.csv Columns: Account, Coin, Execution Price, Size USD, Side, Timestamp IST, Closed PnL, etc.
-
First item Converted timestamps to datetime format and extracted dates
-
Second item Standardized column names
-
Third item Merged sentiment and trading datasets on the date field
-
Fourth item Created a binary target variable: profitable = 1 if ClosedPnL > 0 else 0
-
Fifth item Encoded categorical columns (Side, Classification)
-
First item Analyzed distribution of Fear-Greed Index and Trader Profitability
-
Second item Compared average profits during Fear vs Greed market phases
-
Third item Visualized correlations and sentiment-based performance
-
Fourth item Observed that traders often perform differently depending on market emotion levels
Models Used:
-
First item Logistic Regression
-
Second item Random Forest Classifier
Features:
fear_greed_index
, Size USD
, Side_encoded
, sentiment_encoded
Target:
profitable
-
First item Logistic Regression:
Accuracy: ~61.9% Key Observation: Performs linearly, basic interpretability
-
Second item Random Forest:
Accuracy: ~74.5% Key Observation: Captures non-linear sentiment-performance patterns
Top Influencing Factors:
-
First item Fear-Greed Index
-
Second item Trade Size (USD)
-
Third item Side (Buy/Sell)
-
First item Market sentiment strongly correlates with trader profitability.
-
Second item Greedy markets tend to have higher volatility and both high profits & losses.
-
Third item Random Forest performed best for prediction.
-
Fourth item This kind of analysis can help trading firms optimize their strategies based on sentiment indicators.
Python, Pandas, NumPy, Matplotlib, Seaborn, Scikit-learn
# Clone the repo
git clone https://github.com/gaurav9364/Trader-Behavior-Insights-ML.git
cd Trader-Behavior-Insights-ML
# Install dependencies
pip install -r requirements.txt
# Run the notebook
jupyter notebook notebooks/trader_behavior_insights.ipynb
Gaurav Yadav