This project explores the potential of using Google Trends data as a sentiment indicator to forecast price movements in the cryptocurrency market. By analyzing shifts in search volumes related to specific cryptocurrencies, the study aims to identify correlations between public interest and subsequent price changes, enabling more informed and profitable trading strategies.
- Google Trends: Provides search trend data over time for specific terms, which is used as a sentiment indicator.
- Glimpse: Chrome extension used to retrieve absolute search volumes for better accuracy in trend analysis.
- Binance API: Used to access historical cryptocurrency price data for strategy development and backtesting.
- Google Trends Data: Collected through the PyTrends API with adjustments for data normalization and resolution challenges. Glimpse was used to obtain absolute search volume data.
- Binance Data: Historical price data for various cryptocurrencies was fetched using the Binance API, then cleaned and standardized for consistency, removing outliers and addressing any gaps.
-
Trading Strategy:
- Significant increases in Google search volumes are used as buy signals, while significant decreases indicate potential sell signals.
- The magnitude of these changes influences the quantity of cryptocurrency to be traded.
-
Granger Causality Test:
- Conducted to statistically confirm a predictive relationship between Google Trends and cryptocurrency prices, determining optimal lag periods for each currency.
-
Technical Indicators:
- Bollinger Bands and Relative Strength Index (RSI) are used to refine trading signals, reducing false positives and enhancing decision-making.
-
Hyperparameter Optimization:
- A grid search was performed to optimize strategy parameters, aiming to maximize the Calmar Ratio and improve returns relative to risk.
- The dataset was divided into training and testing sets to ensure robust validation.
- Strategy performance was assessed through backtesting, comparing it to a buy-and-hold benchmark strategy.
- Key metrics for evaluation included:
- Annual Return: Measures profitability over time.
- Sharpe Ratio: Assesses return relative to risk.
- Max Drawdown: Evaluates worst-case losses.
- Calmar Ratio: Balances return against max drawdown.
- Training Set: The strategy outperformed the buy-and-hold benchmark, showing higher annual returns and a favorable Sharpe ratio.
- Test Set: Results indicated increased risk, with higher max drawdown values, suggesting a need for improved risk management to address volatility in the cryptocurrency market.
This project provides evidence that Google Trends data can serve as a useful sentiment indicator for algorithmic trading in cryptocurrencies. However, due to the high volatility and susceptibility of the cryptocurrency market to external influences, the strategy requires enhanced risk management and continual refinement to achieve sustainable results.
- Real-Time Data Scraping: Implement a live data collection system for more timely responses to market conditions.
- Reduced Analysis Window: Decrease the time window to capture short-term fluctuations and increase trading responsiveness.
- Advanced Machine Learning Models: Explore machine learning techniques for better pattern recognition and adaptability to market changes.
- Market Manipulation Mitigation: Develop mechanisms to detect and adjust for potential market manipulation, enhancing model robustness.
- Google Trends: Google Trends
- Glimpse Extension: Glimpse Chrome Extension
- Binance API Documentation: Binance API