Abstract: The following post describes how, with significant assistance from AI, I created a script to predict the price of cryptocurrencies for the next day. Result:
- 🟦Blue - Exchange rate Bitcoin/USD
- 🟥Red - Predicted price Bitcoin/USD
Script: https://fatmusicpl.github.io/voters.github.io/neural_network8en.html Source code: https://github.com/fatmusicpl/voters.github.io/blob/master/neural_network8en.html Link to the Google Sheet with data and results: https://docs.google.com/spreadsheets/d/1cIPZEJJCiP1Mc-VjJRQyPj6osK-93TRstj73tePBcxo/edit?usp=sharing
Image generated by Leonardo.Ai
Some time ago, I came up with the idea to check the effectiveness of using artificial intelligence to predict cryptocurrency prices. What prompted me to do this was the information that DeepSeek is capable of programming at the level of a very good developer. So, I came up with a task for it to solve, specifically related to predicting cryptocurrency prices. We somehow managed to do it—I don’t know if I could have done it alone, but together we pulled it off. I won’t assess its skills because I don’t have that level of expertise in this field myself. But it probably would have handled it better on its own than I would have alone. However, it proved to be an excellent tool for learning programming. I don’t program in JavaScript, but it’s a language that’s nice to use because it allows you to run a script directly in the browser—it doesn’t require setting up an environment or installing libraries or configuring anything. In short, it makes getting started easier. And the results are visible immediately.
The first step was to create a script that would check whether it’s worth investing in cryptocurrencies, betting on their price increase and staking rewards. This is how the first script came to life, though unfortunately, I wrote it in my native language, Polish.
AI w przewidywaniu opłacalności stakowania [HDB, PIV, SCC]
Script: https://fatmusicpl.github.io/voters.github.io/ai.html Source code: https://github.com/fatmusicpl/voters.github.io/blob/master/ai.html
From the beginning, I used the TensorFlow library in JavaScript. The idea seemed good, but I couldn’t shake the feeling that I didn’t quite understand what was happening or how to use it to make the effect more noticeable.
That’s why I decided to keep going, but this time learning everything from the ground up.
Uczymy AI przewidywać kursy krypto: Część pierwsza, zacznijmy od nauki dodawania
What could be simpler than addition? This post and script demonstrate how you can teach AI to add two numbers.
Script: https://fatmusicpl.github.io/voters.github.io/neural_network.html Source code: https://github.com/fatmusicpl/voters.github.io/blob/master/neural_network.html
Uczymy AI przewidywać kursy krypto: Część druga, uczymy przewidywania funkcji liniowej
Now it’s time for something a bit more challenging. If we want to teach AI to predict prices, a good idea seems to be teaching it to guess the behavior of a linear function.
Script: https://fatmusicpl.github.io/voters.github.io/neural_network2.html Source code: https://github.com/fatmusicpl/voters.github.io/blob/master/neural_network2.html
Only now could we move on to the actual training of AI to predict prices.
Uczymy AI przewidywać kursy krypto: Część trzecia, nie ostatnia
Script: https://fatmusicpl.github.io/voters.github.io/neural_network7.html Source code: https://github.com/fatmusicpl/voters.github.io/blob/master/neural_network7.html
It wasn’t so easy this time, and I had to dedicate some time to it. As you can see, I’m jumping from script number 2 to 7. It took several attempts to tackle this topic.
At the moment, I’m at the stage of analyzing the results. I’ve translated the script into English, added more parameters for training, and implemented displaying data and results in a spreadsheet.
Uczymy AI przewidywać kursy krypto: Część czwarta, analiza wyników - niemałe zaskoczenie
Script: https://fatmusicpl.github.io/voters.github.io/neural_network8en.html Source code: https://github.com/fatmusicpl/voters.github.io/blob/master/neural_network8en.html Link to the Google Sheet with data and results: https://docs.google.com/spreadsheets/d/1cIPZEJJCiP1Mc-VjJRQyPj6osK-93TRstj73tePBcxo/edit?usp=sharing
Summary: I am positively surprised by the results. As you can see, over several days—and not just a few—the results match almost 100%. Although I wouldn’t recommend anyone to use this in practice, the potential of this solution is... At the very least, I’ve learned a lot. AI has immense possibilities. It’s worth learning.
In the scripts, I used the following libraries: * TensorFlow.js – a library for machine learning * x-spreadsheet – a library for spreadsheets * chart.js – a library for drawing charts
The price data was fetched from CoinGecko.
For learning, AI chats were very helpful:
In my opinion, both are comparable. DeepSeek provides more detailed answers, while Copilot is more concise.
I invite you to comment, and especially to conduct your own tests. I worked on this after hours, without testers or someone to review and analyze it. There might be errors.
---=== Advertisement ===---
pivx.promo - PIVX Faucet, a nice coin for PoS Honeygain - Sharing network and content delivery, for rewards Grass - Sharing network for rewards in the Solana (SOL) cryptocurrency AutoFaucet - Faucet with a very wide selection of coins Final Autoclaim - Faucet with a very wide selection of coins FaucetCrypto - Faucet with a wide selection of coins and the ability to withdraw BTC directly to the wallet