Skip to content

shineyrbl-byte/trader-sentiment-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Trader Performance vs Market Sentiment Analysis

Overview

This project analyzes how Bitcoin market sentiment (Fear vs Greed) influences trader behavior and performance on the Hyperliquid platform. The goal is to uncover actionable insights that can inform sentiment-aware trading strategies.


Data

The datasets used in this analysis were provided as part of the assignment:

  1. Bitcoin Fear & Greed Index
    Source: Provided by Primetrade.ai
    Link: https://drive.google.com/file/d/1PgQC0tO8XN-wqkNyghWc_-mnrYv_nhSf/view?usp=sharing

  2. Hyperliquid Historical Trader Data
    Source: Provided by Primetrade.ai
    Link: https://drive.google.com/file/d/1IAfLZwu6rJzyWKgBToqwSmmVYU6VbjVs/view?usp=sharing

Due to file size constraints, raw CSV files are not included in this repository.

Methodology

Data Preparation

  • Converted timestamps to datetime format and aligned both datasets at a daily level
  • Merged trader data with sentiment data using trade date
  • Cleaned missing values and removed duplicates

Feature Engineering

Created daily, per-account metrics:

  • Daily PnL
  • Number of trades per day
  • Win rate (percentage of profitable trades)
  • Average trade size (USD)
  • Long/Short ratio (buy-side proportion)

Key Insights

1. Performance differs across sentiment regimes

Trader performance shows variability across Fear and Greed days. Fear periods exhibit higher volatility in daily PnL and win rates, indicating increased risk and uncertainty compared to Greed regimes.

2. Directional bias shifts with sentiment

During Fear days, traders display a higher long ratio (above 0.5), suggesting contrarian buying behavior. In contrast, Greed days show a slight reduction in long exposure, indicating profit-taking or defensive positioning.

3. Trading behavior adapts to sentiment

Trade frequency and position sizing vary across sentiment regimes, highlighting that traders adjust their activity and exposure in response to market psychology.


Strategy Recommendations

Strategy 1: Sentiment-Adaptive Directional Bias

  • Increase focus on long positions during Fear days with controlled risk
  • Reduce long exposure or allow selective short positions during Greed days

Strategy 2: Risk Management by Sentiment Regime

  • Use conservative leverage and selective trading during Fear periods
  • Prioritize capital preservation and disciplined exits during Greed periods

How to Run

  1. Clone the repository
  2. Install dependencies:
    pip install pandas numpy matplotlib seaborn

About

Analysis of trader behavior vs Bitcoin market sentiment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors