Predict Bitcoin Prices With Machine Learning And Python [W/Full Code]

  Рет қаралды 43,801

Dataquest

Dataquest

Күн бұрын

Пікірлер: 66
@DanielGarcia-uq8yz
@DanielGarcia-uq8yz 2 жыл бұрын
For anyone stuck trying to merge the wiki and btc history data frames, if you get a time-zone error (Cannon merge tz-naive with tz-aware), you will need to edit the datetime index of the btc history data frame after converting it to a datetime object to make it time-zone naive. Here was my fix: btc.index = pd.to_datetime(btc.index) [Original Code from Vik] btc.index = btx.index.tz_localize(None) [Fix to make index time-zone naive]
@adityagavali3158
@adityagavali3158 Жыл бұрын
eres una leyenda, Muchas Gracias tio
@brianmcclain1916
@brianmcclain1916 8 ай бұрын
is "btx" a typo..you must mean "btc"
@atenea3930
@atenea3930 2 жыл бұрын
For those stuck in cell 7, be aware that one data entry has no comment (20:44, 10 September 2022‎ Staxringold) You have to delete that entry with "del revs[x]" being x the position. It depends on when you obtain the data.
@Dataquestio
@Dataquestio 2 жыл бұрын
Thanks for finding the issue! Replacing the line `comment = rev["comment"]` with `comment = rev.get("comment", "")` should also work. This will just fill in the comment with an empty string if it can't be found.
@ch-qk8dk
@ch-qk8dk Жыл бұрын
can you give me the exact code?
@atenea3930
@atenea3930 Жыл бұрын
@@ch-qk8dk the Dataquest's solution is better, it's in my comment
@ch-qk8dk
@ch-qk8dk Жыл бұрын
@@atenea3930 okok thanks
@mahmoodhossainfarsim6292
@mahmoodhossainfarsim6292 2 жыл бұрын
Great one Vik. please keep them coming
@user-gu4dt4tn8q
@user-gu4dt4tn8q Жыл бұрын
Vik, thanks for creating these and sharing your knowledge.
@ricebarbie
@ricebarbie 9 ай бұрын
Thank you for the video. It helped me alot better than my boot camp course.
@clusterbyblocks
@clusterbyblocks 9 ай бұрын
Aren't you leaking data by using the Close Value as a predictor? I mean the algorithm just have to look at this to predict next day. Can you reason about it?
@pranitchand
@pranitchand Жыл бұрын
Amazing video. Thank you so much for sharing, I was able to modify it and develop it further to predict the price of Ethereum! Thanks for the inspiration.
@Why_interested
@Why_interested 7 ай бұрын
Can u provide me help regarding final year project on bitcoin price prediction in btech
@Who-u9e
@Who-u9e 2 ай бұрын
i am trying your tutorial in 2024 and yfinance shows that it has no data regarding bitcoin
@sunday-thequant8477
@sunday-thequant8477 Жыл бұрын
are you putting look ahead bias using trend variable, because you sum the target and in the current bar you dont have the bar closed so in real time wont have the trend predictor
@wmgallo1
@wmgallo1 2 жыл бұрын
the mwclient somehow it gives an error
@santoshpatil1029
@santoshpatil1029 Жыл бұрын
Are you using Jupyter notebook??
@shivanshyadav1041
@shivanshyadav1041 8 ай бұрын
you are taking yesterday's closing price as tomorrow's closing price that does not make sense...
@Sake679
@Sake679 Жыл бұрын
Hey, mine is not predicting next day
@kwokcheongyeung665
@kwokcheongyeung665 2 жыл бұрын
I can't proceed further in appending (find_sentiment(comment)) to an empty dictionary edit = {}. It keeps loading instead. Can someone help to solve? Thanks!
@Dataquestio
@Dataquestio 2 жыл бұрын
Hi Kwok - does the find_sentiment function itself work? It may be that the transformers package isn't installed or configured correctly.
@fsDragonDKlion3000
@fsDragonDKlion3000 Жыл бұрын
hello, im trying to run cell 7 and it takes forever to load, i tried the different edits below but it still won't work, is there something else you can advise me to replace it with?
@fsDragonDKlion3000
@fsDragonDKlion3000 Жыл бұрын
just realized that its because it's trying to pass through +17000 comments, other than cutting the data (revs) into less than 1000 records, is there a way to process this any faster?
@ajaychhetri482
@ajaychhetri482 5 ай бұрын
How much for this project sir ?
@munchy5667
@munchy5667 2 жыл бұрын
is it possible to make a multi step forcast with classification models such as this?
@Dataquestio
@Dataquestio 2 жыл бұрын
What is a multi step forecast? Do you mean a forecast multiple days ahead? If so, then yes, just change the .shift(-1) to the number of days ahead you want to predict.
@munchy5667
@munchy5667 2 жыл бұрын
@@Dataquestio yes forcasting for multiple days ahead. In your video your making a prediction for tommorow. What I wanted was to know if I can make predictions for the next 3 days rather than changing the model with multiple targets
@ASH8376
@ASH8376 Жыл бұрын
@@Dataquestio I changed the shift-1 to shift-5 what does it show me , prediction for next 5 days ?
@ASH8376
@ASH8376 Жыл бұрын
I saw the precision score went up to .70 , what does that mean ?
@mariajanechan5906
@mariajanechan5906 Жыл бұрын
Awesome!
@dongjunpark7006
@dongjunpark7006 2 жыл бұрын
For the line "if len(edits[key]["sentiments"]) > 0:", I got an error saying that "object of type 'float' has no len()" May I kindly ask how to solve this problem?
@Dataquestio
@Dataquestio 2 жыл бұрын
Hi Dong - the "sentiments" key should be a list, but it looks like it is a single number. This would happen if you assigned the sentiment value directly to the key instead of appending to the list.
@dbarbedillo
@dbarbedillo 2 жыл бұрын
Hi Vik! Hope everything is well! On code cell 7 I keep getting KeyError: 'comment' (The find_sentiment function is working) Would really appreciate some help to solve this error :)
@Dataquestio
@Dataquestio 2 жыл бұрын
It looks like calling `page.revisions()` isn't downloading the comment for you for some reason. Try running `page.revisions(prop='ids|timestamp|flags|comment|user')` instead to see if that helps.
@dbarbedillo
@dbarbedillo 2 жыл бұрын
​@@Dataquestio Thank you very much! I greatly appreciate your help!
@dbarbedillo
@dbarbedillo 2 жыл бұрын
Solved the issue the following way: (code cell 7) edits = {} for rev in revs: date = time.strftime("%Y-%m-%d", rev["timestamp"]) if date not in edits: edits[date] = dict(sentiments=list(), edit_count=0) edits[date]["edit_count"] += 1 for k, v in rev.items(): if k == 'comment': comment = v edits[date]["sentiments"].append(find_sentiment(comment))
@Dataquestio
@Dataquestio 2 жыл бұрын
That fix looks great. Someone else investigated and found that there is one revision missing the comment key for some reason. This revision is from after I created the original project, so I didn't see it. You could also replace the line `comment = rev["comment"]` with `comment = rev.get("comment", "")`. This will just fill in the comment with an empty string if it can't be found.
@bryanbuiser2953
@bryanbuiser2953 Жыл бұрын
@@dbarbedillo How long did it take to run that part of the code?
@furinfo5158
@furinfo5158 3 ай бұрын
plz dont invest in crypto especialy waqar zaka group or u will be destroying ur life
@atenea3930
@atenea3930 2 жыл бұрын
I also found that rolling by 15 instead of 30 increases the accuracy in 0.5 points
@Theskiescreator
@Theskiescreator Жыл бұрын
@e7eec37d79c did you manage to get it to work?
@abhinavab5673
@abhinavab5673 Жыл бұрын
line 56:Cannot join tz-naive with tz-aware DatetimeIndex.Any solution?
@cacus_
@cacus_ Жыл бұрын
awesome videos! keep it up! have you tried using transformers for timeseries? also, in your experience, what's your opinion on training using technical indicators (let's say RSI, CCI, stochastic, etc) and VIX, rates (could be us 10 years yield for example)?. an idea I'm exploring is trying to figure out how to use also the rolling correlation with a set of assets (let's say you are fiting for QQQ comparing or correlating with dxy, gold or any other asset to check if the rolling correlation impacts in any way)... take care!
@Justme-xg7sl
@Justme-xg7sl Ай бұрын
Thanks
@ashanbandaranayeke9344
@ashanbandaranayeke9344 4 ай бұрын
hi! enjoying making this great video, it's the first time I incorporated sentiment analysis at all (in my ML journey). *I'm having a problem with the history attribute/method of yf!* Anyone else?
@LXS1121
@LXS1121 3 ай бұрын
how can we show the predection in 54 rather than 0.54
@ahmetselmanayberkbozkurt6898
@ahmetselmanayberkbozkurt6898 8 ай бұрын
if you had other variables such as indices, commodity prices would you need to take differences of the variables in order to make the dataset stationary?
@nadendlapranaychowdary7703
@nadendlapranaychowdary7703 5 ай бұрын
Can you send the document of this
@chriscoleman1818
@chriscoleman1818 Жыл бұрын
Would/Can you build me one for a certain crypto coin?
@it_s_just_me1030
@it_s_just_me1030 Жыл бұрын
Awesome video, I learned a lot. Thanks!
@nguyenduyta7136
@nguyenduyta7136 2 жыл бұрын
Great sir! Thank so much
@yussufolarinde8329
@yussufolarinde8329 2 жыл бұрын
Can I try out these codes on pycharm?
@Dataquestio
@Dataquestio 2 жыл бұрын
Yes, you can use any IDE to complete this project.
@aarondelarosa3146
@aarondelarosa3146 Жыл бұрын
Where's the plot?
@Theskiescreator
@Theskiescreator Жыл бұрын
did you manage to get it to work?
@slava9298
@slava9298 Жыл бұрын
also got stuck on cell 7 :( the fixes from the comments don't help
@Theskiescreator
@Theskiescreator Жыл бұрын
did you manage to get it work?
@mytube1000javed
@mytube1000javed 11 ай бұрын
😂ha ha ha. Very funny. Kuch bhi. So u r going to predict the price of Bitcoin. 😅. Very funny. It moves according to whim and fancy of Elon Musk and other big players. Your ML will shamefully fail. So don't even give a try. Anyways great conlmexy😂.
@JoaoRodrigues-yf7xc
@JoaoRodrigues-yf7xc 5 ай бұрын
Mate, you just arrived on a spaceship from Mars and are a little bit lost... The point of this is to learn how to use ML and to code with jupyterlab. It is in no way focused on actually predicting btc moves.
Predict Baseball Stats using Machine Learning and Python
54:59
Predict The Stock Market With Machine Learning And Python
35:55
Dataquest
Рет қаралды 691 М.
Как мы играем в игры 😂
00:20
МЯТНАЯ ФАНТА
Рет қаралды 3,1 МЛН
Inside Out 2: BABY JOY VS SHIN SONIC 3
00:19
AnythingAlexia
Рет қаралды 8 МЛН
Win This Dodgeball Game or DIE…
00:36
Alan Chikin Chow
Рет қаралды 35 МЛН
Bitcoin Sentiment Analysis Using Python & Twitter
29:42
Computer Science
Рет қаралды 26 М.
LSTM Top Mistake In Price Movement Predictions For Trading
9:48
CodeTrading
Рет қаралды 91 М.
Predicting Crypto Prices in Python
31:31
NeuralNine
Рет қаралды 130 М.
Stanford's FREE data science book and course are the best yet
4:52
Python Programmer
Рет қаралды 697 М.
Predict Football Match Winners With Machine Learning And Python
44:43
Build A Stock Prediction Web App In Python
25:19
Patrick Loeber
Рет қаралды 191 М.
Как мы играем в игры 😂
00:20
МЯТНАЯ ФАНТА
Рет қаралды 3,1 МЛН