Bitcoin Forum
May 03, 2024, 11:15:44 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Machine Learning (Keras LSTM and K-Clustering) to predict Bitcon Price  (Read 122 times)
Vlad.Sas (OP)
Member
**
Offline Offline

Activity: 93
Merit: 18


View Profile WWW
April 24, 2020, 12:58:11 PM
 #1

I'm trying for some time now to develop a neural network that can predict bitcoin prices. Bitcoin is a great asset for such an experiment because it has fewer fundamentals than the other stocks or derivatives and it relies more on technical analysis than other assets. Nevertheless, it is impacted from time to time by news and other events in the crypto-world.

I am working with TF + Keras and LSTM (Long-Short Term Memory) cells to try and predict future prices.

If I let the network guess freely, without adjusting it to each OHLC Tick, the predictions look like this:




If i adjust it at every point in the dataset, it is needless to say that the graph of predictions is way more precise:


There are few steps I would like to take to improve this
  • Factor in Technical indicator (BB, Ichimoku Cloud, SAR, etc...
  • Place a factor for fundamental analysis in the dataset (for example, a score for the positivity of the news at that specific tick (0=bad news for btc, 10=great news)
  • Collect data from the order books of the largest exchanged and factor in the order book states at every tick
  • Unsupervised learning and K-Clustering to find co-relations between bitcon and other foreign currency (for example, it might be that there's an inverse relationship between bitcoin and the Yuan (generally when Yuan drops, Bitcoin rises). K-Clustering can find such relashionships
  • Merging all of the above into a trading bot that aims for around 30%-40% return a year

Does anyone pursue such a goal? If yes, would you like to share the accumulated knowledge/ideas? Cheesy
This is a serious project and currently, only me and a two of my partners are involved in it, but we could sure use some more man-power. I'd also like to know if someone would like to fund such a venture and get involved.

Cheers to you all!


1714734944
Hero Member
*
Offline Offline

Posts: 1714734944

View Profile Personal Message (Offline)

Ignore
1714734944
Reply with quote  #2

1714734944
Report to moderator
Transactions must be included in a block to be properly completed. When you send a transaction, it is broadcast to miners. Miners can then optionally include it in their next blocks. Miners will be more inclined to include your transaction if it has a higher transaction fee.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714734944
Hero Member
*
Offline Offline

Posts: 1714734944

View Profile Personal Message (Offline)

Ignore
1714734944
Reply with quote  #2

1714734944
Report to moderator
1714734944
Hero Member
*
Offline Offline

Posts: 1714734944

View Profile Personal Message (Offline)

Ignore
1714734944
Reply with quote  #2

1714734944
Report to moderator
jackg
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


https://bit.ly/387FXHi lightning theory


View Profile
April 24, 2020, 10:12:19 PM
 #2

I mean it's an interesting idea, I'm not sure how much its being/been done and how accurate it has been, I'm assuming you've just started it now and are piling past info into the neural network (as an average of several markets)?

Vlad.Sas (OP)
Member
**
Offline Offline

Activity: 93
Merit: 18


View Profile WWW
April 24, 2020, 10:26:24 PM
 #3

I mean it's an interesting idea, I'm not sure how much its being/been done and how accurate it has been, I'm assuming you've just started it now and are piling past info into the neural network (as an average of several markets)?



Your assumptions are quite accurate. I'm 1 month into this project and still in the research phase. I'm reading all papers that I can find to see how others applied ML to price predictions, what worked, what didn't, what can be improved in their approach, etc... The neural network in this post is just an intro phase really. A much more serious period of research and data gathering will follow. After the plan is put together, I'll attempt to have a nice prototype and then, of course, try to get funding for the project.

coiningz
Jr. Member
*
Offline Offline

Activity: 185
Merit: 7


View Profile
April 25, 2020, 12:59:18 PM
 #4

I guess, if there were the real neutral network that can predict the price there already will be ~100% accurate trading bots but we dont have them
Vlad.Sas (OP)
Member
**
Offline Offline

Activity: 93
Merit: 18


View Profile WWW
April 25, 2020, 01:15:35 PM
 #5

I guess, if there were the real neutral network that can predict the price there already will be ~100% accurate trading bots but we dont have them

That's not possible, but it's possible to have a bot that gives an educated guess.
The aim of this project isn't to make a 100% accurate bot, but to increase the accuracy of the prediction as much as possible

hatshepsut93
Legendary
*
Offline Offline

Activity: 2968
Merit: 2145



View Profile
April 26, 2020, 12:19:26 AM
 #6

I guess, if there were the real neutral network that can predict the price there already will be ~100% accurate trading bots but we dont have them

Nothing can be 100% accurate, but you don't need to, as long as your accuracy is above 50% you will be making profit. And there already been some projects here that advertised trading bots based on machine learning, I think I saw some threads on the Project Development board, perhaps OP will be interested to look at them.


.BEST.CHANGE..███████████████
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
███████████████
..BUY/ SELL CRYPTO..
Vlad.Sas (OP)
Member
**
Offline Offline

Activity: 93
Merit: 18


View Profile WWW
April 26, 2020, 12:24:35 AM
 #7

I guess, if there were the real neutral network that can predict the price there already will be ~100% accurate trading bots but we dont have them

Nothing can be 100% accurate, but you don't need to, as long as your accuracy is above 50% you will be making profit. And there already been some projects here that advertised trading bots based on machine learning, I think I saw some threads on the Project Development board, perhaps OP will be interested to look at them.



Will do! Thx.

Vlad.Sas (OP)
Member
**
Offline Offline

Activity: 93
Merit: 18


View Profile WWW
April 26, 2020, 01:41:02 AM
 #8

I guess, if there were the real neutral network that can predict the price there already will be ~100% accurate trading bots but we dont have them

Nothing can be 100% accurate, but you don't need to, as long as your accuracy is above 50% you will be making profit. And there already been some projects here that advertised trading bots based on machine learning, I think I saw some threads on the Project Development board, perhaps OP will be interested to look at them.



50%+ accuracy might not do it. You can have a model with 30% accuracy, but which doesn't miss the big spikes and drops in the price or a model with 70% accuracy that misses the spikes and drops. In this case, you might find that the 30% accuracy model is more profitable than the other one.

hatshepsut93
Legendary
*
Offline Offline

Activity: 2968
Merit: 2145



View Profile
April 26, 2020, 02:18:07 AM
 #9

50%+ accuracy might not do it. You can have a model with 30% accuracy, but which doesn't miss the big spikes and drops in the price or a model with 70% accuracy that misses the spikes and drops. In this case, you might find that the 30% accuracy model is more profitable than the other one.

Yes, 50%+ accuracy assumes that a bot trades with a constant amount every time, if you have some complex strategy, then your performance can only be measured by the profit that it makes.

I'm really curious if such algorithm is able to predict huge movements, or if it's better for day trading with high frequency. And if it can do both, then which is better - waiting for a big shot, or steadily making profit every day?

.BEST.CHANGE..███████████████
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
███████████████
..BUY/ SELL CRYPTO..
franziskakuhn
Newbie
*
Offline Offline

Activity: 9
Merit: 0


View Profile
April 26, 2020, 03:46:55 AM
 #10

You have a good observation in the bitcoin price chart on the market,
I think it would be great if you place your thread here https://bitcointalk.org/index.php?board=8.0
buwaytress
Legendary
*
Online Online

Activity: 2800
Merit: 3443


Join the world-leading crypto sportsbook NOW!


View Profile
April 26, 2020, 02:28:28 PM
 #11

I used to in 2017/18 follow quite a few of these neural learning projects. At least two quite closely and even interacting with their founders, who at the very least were experts in their fields (Academics with very useful experience too) -- but once 2017/18 gave up the gains, the began failing just like most other crypto hedge funds.

And last year eToro did something with a purely "based on Twitter sentiment" thing and they've been posting heavy losses since too.

How far back has your data gone? I don't see any timeframe there. I would start also just charting from now and use alternative scenarios. One a bear outlook (looking to sell) and one a bull outlook (looking to hold). I know this is a predictor but outlook does affect prediction.

██
██
██
██
██
██
██
██
██
██
██
██
██
... LIVECASINO.io    Play Live Games with up to 20% cashback!...██
██
██
██
██
██
██
██
██
██
██
██
██
Vlad.Sas (OP)
Member
**
Offline Offline

Activity: 93
Merit: 18


View Profile WWW
April 26, 2020, 02:50:40 PM
 #12

I used to in 2017/18 follow quite a few of these neural learning projects. At least two quite closely and even interacting with their founders, who at the very least were experts in their fields (Academics with very useful experience too) -- but once 2017/18 gave up the gains, the began failing just like most other crypto hedge funds.

And last year eToro did something with a purely "based on Twitter sentiment" thing and they've been posting heavy losses since too.

How far back has your data gone? I don't see any timeframe there. I would start also just charting from now and use alternative scenarios. One a bear outlook (looking to sell) and one a bull outlook (looking to hold). I know this is a predictor but outlook does affect prediction.

I didn't plot the dates. I've trained the AI on hourly OHLCV since 2017. Currently, the structure of the model looks like this:


(first branch: open prices, second branch: high/low, third: volume)

It doesn't yet take into account any external factors other than the OHLCV. The impact of twitter sentiment and other fundamentals is yet to be studied, but thanks for the insights, I'd appreciate if you share more about your studies Cheesy.

Cheers!


hugeblack
Legendary
*
Offline Offline

Activity: 2506
Merit: 3633


Buy/Sell crypto at BestChange


View Profile WWW
April 26, 2020, 04:46:43 PM
 #13

I didn't plot the dates. I've trained the AI on hourly OHLCV since 2017. Currently, the structure of the model looks like this:
OHLCV may give you patterns of prices to a certain extent or when there are no external factors (real influences.)
If you manually compare and delete these external factors, how accurate will the results be? I think you will get excellent accuracy as the price tends to repeat after the historical resistances when we ignore many external influences.
You can also track some of the effects and try to give them price adjustments, for example, hacking platforms and others.

Can you add more details to the charts?

.BEST..CHANGE.███████████████
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
██
███████████████
..BUY/ SELL CRYPTO..
Sanugarid
Full Member
***
Offline Offline

Activity: 1442
Merit: 153


★Bitvest.io★ Play Plinko or Invest!


View Profile
April 26, 2020, 05:02:40 PM
 #14

I guess, if there were the real neutral network that can predict the price there already will be ~100% accurate trading bots but we dont have them

Nothing can be 100% accurate, but you don't need to, as long as your accuracy is above 50% you will be making profit.
I think we should not be talking about accuracy here since we are dealing with decentralized market that is very uncertain for the price. And I don't think a 50% accuracy , or even 70% can really make you gain a profit.

And there already been some projects here that advertised trading bots based on machine learning, I think I saw some threads on the Project Development board, perhaps OP will be interested to look at them.
yes, we already have these applications, bot integrated system that analyzes old data, from past to present to compare the movements but none of these makes me that interested to look after it. The fact the the whole scheme is decentralized is enough for me to know that every thing is under an unclear path, you have to shoot in the dark if you gain then you're lucky, not otherwise.

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!