This trading bot is designed to automate trading on the Dydx decentralized exchange using statistical arbitrage strategies. It is deployed on AWS and includes Telegram notification functionality to keep you updated on trades and important events.
- Automated trading on Dydx decentralized exchange
- Integration with AWS for deployment
- Telegram notification functionality for trade updates
- Configurable trading strategies
- Statistical arbitrage using cointegrated pairs, spread, Z-scores, hedge ratios, etc.
- Python 3.x
- AWS account
- Telegram account and bot token
- Clone the repository
- Install dependencies using
pip install requirements.txt
- Set up your AWS credentials for deployment.
- Create a Telegram bot and obtain the bot token.
- Configure the bot settings in
config.py
, including Dydx API credentials, AWS configuration, Telegram bot token, and statistical arbitrage parameters.
- Run the bot locally
- Deploy the bot on AWS
- Stationarity: A stationary time series is the one whose stastical parameters such as mean and variance do not change over time.
- Cointegrated Pairs: If the linear combination or spread of two stationary time series is stationary then they are said to be cointegrated with each other.
- Spread: Calculate the spread between the prices of cointegrated pairs.
spread = series_1 - (hedge_ratio * series_2)
- Z-Scores: Compute Z-scores to determine whether the spread is deviating from its historical mean.
zscore = (x - mean) / std
- Hedge Ratios: Determine optimal hedge ratios for pairs trading.
- Simple Moving Average (SMA) crossover strategy
- Relative Strength Index (RSI) strategy
- Bollinger Bands strategy
- Statistical arbitrage using cointegrated pairs and Z-scores
For any issues or questions, please open an issue on GitHub or contact [[email protected]].
This trading bot is for educational and experimental purposes only. Use it at your own risk and do your own research before making any financial decisions. The developers are not responsible for any losses incurred while using this software.
MIT License