Researchers

Varun Seshu
Sri Krishna Yerramilli

Faculty Advisor

Dr. Khaldoun Khashanah

Abstract

In the evolving cryptocurrency markets, grid trading strategies have become essential for fostering liquidity and stability. This paper investigates existing grid trading strategies used on the ByBit exchange and explores the integration of machine learning models, such as Random Forest and LSTM, to improve their parameters. Furthermore, a novel hedging strategy was introduced to maximize returns while mitigating risk. Using a custom backtesting system, the results demonstrate that machine learning integration did not outperform traditional methods, but the hedging strategy provided better returns than simply holding Bitcoin.

Introduction

The cryptocurrency market has seen an explosion in popularity, attracting investors with the promise of high returns amidst extreme volatility. As algorithmic trading strategies gain traction, grid trading has emerged as a notable strategy for navigating market fluctuations. The primary aim of this paper is to explore whether machine learning models can predict Bitcoin price movements and enhance grid trading strategies. Additionally, a novel hedging strategy is proposed to reduce risk while increasing trade volume. Using a backtesting system, this paper examines the performance of these strategies over various market conditions.

Data

Data for this study was collected from the ByBit and Binance exchanges. The ByBit data comprised Level 2 order book information, including bid and ask prices, volumes, and timestamps. The data was collected from October 2023 to March 2024 and processed to ensure compatibility with the backtesting system. Binance data was sourced from January 2017 to April 2024, focusing on second-level Open, High, Low, Close, and Volume metrics. The data underwent transformation from UNIX timestamps to human-readable formats, ensuring consistency for backtesting purposes.

Diagram of the backtesting system architecture for Bitcoin grid bot trading strategies, showing the flow from data source to analysis and visualization through the Data Feeder, Database, Strategy, and BackTester components.

Summary

The FE800 project, in collaboration with Quantm Capital, focused on optimizing Bitcoin trading strategies, specifically through grid bot methodologies on the Bybit exchange. The aim was to explore the feasibility and profitability of grid bots under various market conditions, with an emphasis on reducing overfitting while maximizing returns and trading volume. A custom backtesting system, developed with flexible “plug-and-play” functionality, allowed for comprehensive testing of multiple strategies using data from sources like Tardis and Binance, ranging from second-level to tick-level precision.

Bitcoin price movement visualization with grid bot trades and exits. This highlights a gradual upward trend, with buy trades marked in green and exits in black.

The project incorporated advanced machine learning techniques, including Random Forest and Long Short-Term Memory (LSTM) models, to dynamically adjust grid bot parameters. However, while these machine learning-based strategies provided adaptability, they did not outperform traditional grid bot techniques. Instead, the hedging strategy, which leveraged mean-reverting Bitcoin prices, emerged as the most profitable approach. Over extended periods, this strategy consistently outperformed other methods by optimizing both return percentages and trading volumes while dynamically adjusting key parameters based on market conditions.

Bitcoin price movement over a short time frame with grid bot trading strategy. The green markers indicate buy trades, and the black markers represent exit points.

This research offers a robust foundation for future enhancements, including live integration of the automated strategies, improving feature engineering, and further refining machine learning models for better accuracy and profitability across varying market conditions. The findings suggest significant potential for grid trading, particularly when combined with hedging, to deliver stable and high-performing results in cryptocurrency markets.

Hedging Strategy Performance

Conclusion

This paper concludes that machine learning-based strategies did not offer significant improvements over traditional grid trading. The novel hedging strategy, on the other hand, provided enhanced performance, making it a more robust option for managing volatility in the cryptocurrency market. Future research could focus on incorporating additional data features and exploring other machine learning models to improve predictions. Additionally, real-time testing in live markets could help refine the strategies further, ensuring practical applicability in diverse market conditions.