This repository contains a simple and basic project for predicting Ethereum (ETH) prices using time series analysis and machine learning models. The project includes data preprocessing, feature engineering, and model training using LSTM and GRU neural networks. The models are evaluated using various regression metrics to assess their performance.
git clone https://github.com/NimaVahdat/ETH_Price_Prediction.git
cd ETH_Price_Prediction
Prepare your configuration file config.yaml
with the necessary parameters (refer to the Configuration section). Look at the example LSTM_config.yaml
.
Run the main script:
python main.py --config config.yaml
config.yml
file with the following structure:# Configuration file
# Model configuration
model_config:
input_dim: 16 # Number of features (time steps)
hidden_dim: 10 # Increased hidden dimension for more learning capacity
output_dim: 1 # Predicting one value (e.g., closing price)
n_layers: 2 # Increased number of layers for more abstract representations
dropout_rate: 0 # Introduce dropout to prevent overfitting
# Data configuration
data_config:
test_size: 0.25 # 25% of data for testing
data_dir: ./Data/ETH-USD.csv # Path to the data file
# Training configuration
batch_size: 32 # Typical batch size for stable training
time_step: 16 # Number of time steps to look back for prediction
lr: 0.00001 # Adjusted learning rate for faster convergence
num_epochs: 1000 # Increased number of epochs for thorough training
initialize_weights: True # Initialize weights at the start
# Model to use (LSTM, GRU)
model: LSTM # Type of model to use
start: 2023-06-09 # Start date for training
end: 2024-06-09 # End date for training
The model performance is evaluated using the following metrics:
This project provides a simple and basic ETH price prediction model. In the future, we plan to enhance the model by incorporating sentiment analysis on news data and tweets to improve its predictive capabilities and better handle the complexities of time series data.
Contributions are welcome! Please open an issue or submit a pull request for any enhancements or bug fixes.
This project is licensed under the MIT License. See the LICENSE file for details.