This code was created with the purpose of implementing an algorithmic trading bot, which is going to manage and automatically trade assets in a highly dynamic environment. Using my skills in financial Python programming and machine learning I created a bot that learns and adapts to new data and evolving markets. I adjusted the input parameters to optimize the trading algorithm and at the end I used a new machine learning mode and compared its performance to that of a baseline model.
pandas
numpy
pathlib
hvplot.pandas
matplotlib.pyplot
sklearn
sklearn.preprocessing
pandas.tseries.offsets
sklearn.metrics
sklearn.tree
In order to open and run this program you have to follow these steps:
-
Go to my repository in GitHub and open the repository called
machine_learning_trading_14
-
Copy the repository's link.
- Open Git Bash in your computer.
- Clone the repository by typing
git clone
and paste the link[email protected]:nestor39/machine_learning_trading_14.git
.
After doing the steps above you are going to have the files in your computer, now we are going to need to open it:
-
Open Git Bash in your computer.
-
Activate the Conda development environment, by typing
conda activate dev
. -
Type
jupyter lab"
in your Git Bash(it will open a tab in your explorer). -
Open the file
machine_learning_trading_bot.ipynb
and you are going to be able to see the code. -
Run the code.
- Baseline performance
When I compared both models I could see that the first model performed much better than the second model. There was no point of comparison in the second model with the tuned trading algorithm. The accuracy score for the second model was 0.45 while the first one was 0.55. So, we can see how well the first model performs when you compare it with the second one.
This project was made with helpful contribuitions from Berkeley Fintech Bootcamp members.
This code was written by Nestor Ramirez.
email: [email protected]
Linkedin: (https://www.linkedin.com/in/nestor-ramirez-cuadro-375654209/)
MIT