In this project, we focus on the implementation and optimization of classification models to predict buy and sell signals in the stock and cryptocurrency markets. We employ a combination of machine learning algorithms, including Logistic Regression, Support Vector Classification (SVC), and XGBoost, integrated into a voting classifier to enhance the accuracy of our predictions.
-
Logistic Regression: This classification algorithm predicts the probability of a binary outcome (1 or 0). It models the relationship between the dependent binary variable and one or more independent variables by estimating probabilities using a logistic function.
-
Support Vector Classification (SVC): SVC is a machine learning algorithm used for classification tasks. It finds the optimal hyperplane that maximizes the margin between different classes. The data points closest to the hyperplane are known as support vectors.
-
XGBoost: This is an advanced implementation of gradient-boosting decision trees designed for speed and performance.
For this analysis, we use historical price data and various technical indicators from Apple Inc. (AAPL) and Bitcoin (BTC-USD) in 1-minute and 5-minute intervals.
We utilize the optuna library for hyperparameter optimization, further improving the performance of our models. The ultimate goal is to provide an effective tool for anticipating market movements and maximizing expected returns in financial operations.
# Instructions to Run the MicroTrading Project
## Steps for Windows:
1. **Create a virtual environment**:
```sh
python -m venv venv
-
Activate the virtual environment:
.\venv\Scripts\activate
-
Upgrade
pip
:pip install --upgrade pip
-
Install dependencies:
pip install -r Classification\requirements.txt
-
Run the main script:
python run Classification\__main__.py
-
Create a virtual environment:
python3 -m venv venv
-
Activate the virtual environment:
source venv/bin/activate
-
Upgrade
pip
:pip install --upgrade pip
-
Install dependencies:
pip install -r classification/requirements.txt
-
Run the main script:
python run Classification\__main__.py