this is a video on learning code, not making money. the choice of the stock market as a subject is just a tool to create interest in the real subject of the video: coding ideas. I don't understand how people are so irate in this comments section about this. If the poster, or anybody, made real money with 40 lines of code... none of you would be posting here arguing about it, you'd be making money with 40 lines of code you found on a YT video. the stock market is just the frame for the idea.
@michaelheery74275 жыл бұрын
Aleays remember ITS GAMBLING...
5 жыл бұрын
@@michaelheery7427 How is being a consistently profitable trader classed as gambling? Its rather contradictory? I suppose it depends on how you define the term gambling but atleast separate the consistently profitable traders from the haphazard emotionally driven buffoons by appending the prefix "professional" and rightfully referring to the former as "Professional Gamblers."
@philippedeleersnyder12325 жыл бұрын
It is really blissful to share great opportunities like this. I never thought i would make it this far in just weeks with just trading and i give accolades to Iqd momentum Forex strategy. I was referred to the author Lukasz Wilhelm only in December of last year after watching series of Siraj Raval wonderful videos on youtube and my life has changed so much since then. Thank you Man .
@informativecontent47785 жыл бұрын
Fuckoff
@rushikeshdhamecha9482 Жыл бұрын
Dude, the way you explain the things... easily and with fun. The best teacher ever I know. Thank you for these amazing video lessons.
@vedankgoyal17064 жыл бұрын
This was just regression. One can't just use regression to "predict" stock prices as everyday the parameters involved are changing. Stock prices prediction involves a lot of different statistical concepts like Brownian Motion, Random Walk etc. There are different models in finance like Black-Scholes equation, Monte Carlo Simulation etc. which take into account these parameters. You have to know a decent amount of math to build a stock prediction algorithm
@sorvex92 жыл бұрын
lmfao, even if you know a 'decent amount of math' you still can't predict stock prices. If you can't predict human behaviour, you can't predict stock prices. Period. What you can use math for, is to capture very short-term trends and buy/sell in very high frequencies using a computer.
@rameshramachandran6988 жыл бұрын
This is a toy example. To build a system that works you would need to use Deep Reinforcement learning. And approach the stock market similar to playing a game. The system should be able to identify Good Risk to Reward setups and continuously monitor price action to ascertain whether the odds have changed. It is not enough to just predict the price action. The system should provide a good entry price a stop loss price and a profit exit price.
@SirajRaval8 жыл бұрын
good point thanks Ramesh
@washfi7 жыл бұрын
lol.... this model is all bulls hit.... common sense... make money..... the idea is very simple dear..you don't need 180 IQ to make make money in stock market nor you need any fancy financial model... these are all look Gud and seems interesting. The truth is that any dumb guy can make money in stock market... timing is impossible... it is time in the market and holding period that matters... quarter to quarter earning and reporting don't works... rest is the history...
@bluebull3997 жыл бұрын
A good trader can just look at a naked chart and if he sees recurring patterns he knows he has a high probability of winning. This talent alone requires no math and often I see bad traders get bogged down in math, algorithms and indicators when in reality you your brain does it all for you without even thinking about it. Just look at a chart and watch the patterns appear before your eyes.
@arthurmwai37287 жыл бұрын
Very true. Price action trading is the way to go: watch out for candlestick patterns and make your trade based on a risk:reward ratio with stopLoss and takeProfit
@plexm60606 жыл бұрын
I've seen a team from a top uni using something based on rnn to do this and the project last for a year. Their best effort was around 60%~70% in next day accuracy in first 5 months and 40% or less in the rest months. Overall it was not better than tossing a coin or even worse. Because it was "garbage in garbage out", and no one is able to ( or it is not worth to, compared to other profiting methods) get the genuine features of stocking market. However, there is a company using semantic analysis to read news to get a firm's status and ultimately making a bigger profit. But in this story the determiner is still human.
@amonst4r8 жыл бұрын
That's so freaky. I literally just decided to get into stock market prediction yesterday and was having trouble getting started. Perfect timing Siraj. Thank you!!
@amonst4r8 жыл бұрын
in fact yesterday, i also wrote a convenient function for downloading stocks from yahoo finance given a range of dates and an interval of time (by days, months, or years). it returns a list of dicts. i used csv.DictReader instead. if anyone's interested in using or tweaking it, i can post it on github.
@SirajRaval8 жыл бұрын
haha, life is stranger than fiction
@deepschoolai8 жыл бұрын
pandas, pd.read_csv would probably make reading the csv alot faster/ easier.
@SirajRaval8 жыл бұрын
tru tru
@pascal60948 жыл бұрын
@The Math Student How do you write this in a program with pandas?
The Math Student how prediction is done for 2018 year?? I mean what are values for input node ??
@fabian88136 жыл бұрын
Cheers for this, I've been looking for "stock market outlook tomorrow" for a while now, and I think this has helped. Have you ever come across - Sanames Stockify Scripophily - (just google it ) ? Ive heard some unbelievable things about it and my friend got excellent results with it.
@ytcio6 жыл бұрын
It's just regression, not prediction
@scotta86125 жыл бұрын
shhh don't tell the masses
@sescalaster5 жыл бұрын
Exactly. Any intro statistics course will tell you regression models help you make predictions for values within the range of your independent variables. Predicting outside this range is extrapolating the model and it has significantly higher risk. I wouldn't necessarily go for it to stack 'dem benjamins.
@scotta86125 жыл бұрын
@@sescalaster nobody gonna be stacking benjamins with a simple regression model with none of the underlying variables taken into account hahaha it's ludicrous
@1HourBule5 жыл бұрын
This guy is a poser if you look into his code base o. Github his coding is garbage and most of his stuff is incomplete or doesn't work
@carlosbustos35684 жыл бұрын
@@sescalaster Hey sergio Quick question Im intersted in math & using data to predict the future. Do you think a data analyst is a good carrer choice? Thank you anyone who can give me clarity
@jaeen76652 жыл бұрын
I know this is an old video, I just wanted to compliment you on your ability to take a very complex topic, and explain it like I'm five. I've heard it said in the past that if you can't Eli 5 a topic then you don't really know it as well as think you do. However, you've displayed that you know this topic very very well. Fantastic job.
@pasanpawan18347 жыл бұрын
Man, you break this down soo much better than other machine learning videos :)
@woolfel7 жыл бұрын
Having worked in the finance industry, the answer is "no, you can't predict stock prices." The signal to noise ratio makes it so any model you train won't work for long. It's the reason why High Frequency Trading is so dominant today. You don't need to predict the price, if you just skim a few cents per share and execute hundreds of millions of transactions. Before HFT became popular, algorithmic trading made up a few percent of the trading activity. Today HFT is responsible for more than half the activity on the major exchanges. It's neat to use deep learning, but predicting stock prices isn't going to work :)
@ivanmiskovic89277 жыл бұрын
Tell that to James Simons ^^
@piziskewl7 жыл бұрын
No, you can't @techn0vids. You are missing a very important variable and that is how the market is going to react, that is something you cannot predict and at best you'll be taking a shot in the dark.
@AkoZoom6 жыл бұрын
What's missing there in prediction (which are ground of trading ...) .. is the use of some (yep not so many !) patterns to describe the trends of the trade. Also first exercise is to train WITH the patterns useful to add some corrections to the prediction.
@vanstarr56106 жыл бұрын
woolfel as a trader i totally agree with you, predicting pricing is nonsense, your much better off by doing things like making sure your asset allocations are diverse but not spread to thinly, and diversify across asset classes, and strategy, one trade plan or strategy is not the solution for every trade....one must learn to trade in all market conditions...Markets are Dynamic and conditions can change rapidly...anyone who is new to the market and reading this should check out tastytrade.com and get educated in "Options Trading" God luck out there
@shadmansudipto72876 жыл бұрын
woolfel please read "the market wizards"
@jonstuartjon37 жыл бұрын
Just want to thank you, Siraj. Your videos are amazing...They're changing lives, for sure. Best of luck to you, and thanks again.
@shubhigautam96557 жыл бұрын
Really love your videos! I started watching them last night, and can't stop. Although you're a bit fast, I think it actually helps us focus on the things you say/ catch our own mistakes as we code. Great job Siraj! :) Please keep uploading more videos haha
@vman0498 жыл бұрын
Great video series! Technically, what you said about making predictions and visualizing them is not incorrect, but it would be a good idea to note that the predictions are in-sample. We should really make out-of-sample predictions to evaluate model performance!
@SirajRaval8 жыл бұрын
true, in-sample predictions i'll make a note thanks
@nabiltech13664 жыл бұрын
True.Also train sample to check whether model is overfitting or not
@Mosfet5108 жыл бұрын
This is a great channel, just what I was looking for. You have a good way of bringing someone up to speed fast.
@SirajRaval8 жыл бұрын
thanks Scott
@jackeown8 жыл бұрын
Isn't this just overfitting? at 6:24 you can see that you've trained on the variables dates and prices and then also use them as your testing data...or is there something I'm missing?
@YouTouchinside8 жыл бұрын
You are absolutely right
@SirajRaval8 жыл бұрын
the graph fits to the training data, i don't plot predicted points but you can print predicted data points to command line using the 2nd helper function.
@jackeown8 жыл бұрын
Thanks! I don't mean to nitpick, but what is your performance on data points outside of the date range upon which you trained?
@Loserfr8 жыл бұрын
Doesn't that depends on the time and resources associated with the training?
@ailabsus7 жыл бұрын
Seems like Siraj was trying to apply this model for different set for test and could not, after decided to just overfit. Anyway, find his videos very useful. Thanks, Siraj!
@EdwinDevey2 жыл бұрын
A great video. Reading the reviews it seems a lot of poeple are missing the point. The value of your output is the enthusiasm and inspirations to seek further knowledge. Those hoping to watch a 6 minute video then make a fortune the following day will always just be dreamers.
@JenPurple20224 жыл бұрын
Great appreciation and praise for his enthusiasm and clear presentation Been through the cycles and have a little bit knowledge about the stocks, trading, investment...etc 1) Long term investment is not the short term speculation which most people engage 2) Modeling is useful only to the extend that you have all the needed data (Such as the over the counter trading, falsified data and behind curtain operations like what happened before the 2008 financial crisis) 3) The best time to make the highest return? Unfortunately, the crisis time...
@sriramabhaktahanuma7 жыл бұрын
Fantastic Man! You are quick in teaching..like long story short. Subscribed...!!!!
@SirajRaval7 жыл бұрын
thx
@lilunchengsmiles5 жыл бұрын
If this guy can predict stock price, he won’t doing KZbin
@d7eemo2705 жыл бұрын
haha that is so very true xD
@lilunchengsmiles5 жыл бұрын
@@d7eemo270 It is possible to predict asset and also portfolio optimization. but I only trust those who are making living on those predictions, not KZbinrs.
@d7eemo2705 жыл бұрын
But that is totally my opinion :D
@sovereignbrand22535 жыл бұрын
Spoken like a true ass
5 жыл бұрын
Exactly, the field and title are nontheless interesting but show it works by testing in the real world. It won't since top investment banks, hedge funds and research firms employ the cream of the crop STEM researchers to model statistical arbitrage of stock markets. Also be careful not to fall into the trap of "over-optimisation" whereby you essentially begin "curve-fitting" your model to known historical data. All falls apart when you "walk" the model forward and test out-of-sample data. There must be a balance for the behaviour of your model.
@NicoLoffredo7 жыл бұрын
it's not a prediction, it's just a fit!
@Ninja-iq2xt7 жыл бұрын
I thought these short length videos wont explain much, but am amazed this is as effective as a 20min. video tutorial. you got one more subscriber! ;)
@transam3517 жыл бұрын
You are amazing!!!! Thanks so much for taking the time to do this
@SirajRaval7 жыл бұрын
thanks so much! more to come
@daltonbrady24927 жыл бұрын
Siraj you're so freaking awesome! Thanks for all the wonderful videos you've taught me so much!
@SirajRaval7 жыл бұрын
thanks Dalton
@adamgoyer20776 жыл бұрын
Thanks for putting this together - will continue to follow your work
@hellmutmatheus26268 жыл бұрын
My gawd man you are like prometheus that bring light to the mankind
@SirajRaval8 жыл бұрын
LOL thank you
@Eroenjin7 жыл бұрын
I've been in this game for a while and yes, you can create slightly better than random guesses based on historical stock price data alone (I've tested Kalman filters and recurrent neural networks in this case). However, I also analyze news and discussions related to the stock in question and include that data in my model (sentiment analysis is one part of that model). To my experience, the stock market is a very subjective market, i.e. a big portion of valuation is based on the perception of value rather than the actual value.
@bat-amgalanbat-erdene26217 жыл бұрын
Have you used that to earn money? What is the time interval do you trade in? Below a second, minutes, hours or days?
@juliansoto26516 жыл бұрын
...weeks, months, years, decades.
@tamastamas58058 жыл бұрын
Wow, you are making complicated so simple!! Thank you!
@SirajRaval8 жыл бұрын
anytime!
@fallout__boy11304 жыл бұрын
**Very wrong way** of doing time series prediction. I am sure a dummy model that predict t+1 being t would give a better R2 score. Things is that with market stock time series, the data is heavily correlated and you need to "de-correlate" (for instance x_t = x_t - x_t-1) before doing any regression work, otherwise your are getting a systemic error, x_t-x_t-1. The whole problem is to predict the variation of the "de-correlated" data set (ie the absolute difference between t and t+1 for instance). At least there is one absolute truth with your model, if you use it to trade you are sure to lose money :)
@robertnewton72638 жыл бұрын
You are awesome man! I watched every video and it has motivated me to learn these programs. I might even do a blog about it! Keep it up!
@SirajRaval8 жыл бұрын
Robert thats awesome, if you do a blog definitely send me the link
@riotviou42287 жыл бұрын
you have a funky channel, I'm definitely subscribing.
@Manuel-dz1iq6 жыл бұрын
this channel is gold. Thx bro
@faiyaadalam16648 жыл бұрын
Perfect! You go at a really good pace. Thanks a lot for the knowledge dump.
@SirajRaval8 жыл бұрын
thanks Faiyaad!
@klin1klinom6 жыл бұрын
I suspect accurate market prediction would change it's outcome, making it inaccurate in the end) One would have to consider consequences of selling or buying in anticipation of predicted dive/hike, possibly causing rapid bubble growth with inevitable burst, or just a total crash right away. If anything, guys down at "Wall St." would use tools to manipulate trading, actually shaping the market outcome rather than predicting it. Such software would also have to counter anything unusual, especially if it looks like trade anticipates its own activity (someone or something discovered a pattern)
@adnanqz49746 жыл бұрын
Amazing video! Going to use this example in a workshop I'm conducting for business school students this week! Will remember to cite you during the workshop and ask them to check out your channel. Cheers!
@AlgorithmicApostasy6 жыл бұрын
Brilliant use of WoWS clip! Bravo
@darylallen24855 жыл бұрын
Siraj, thanks for bringing this info to the masses!
@KennTollens4 жыл бұрын
Also, one cool way to get stock data. symbol = 'MSFT' df = web.DataReader(symbol, data_source='yahoo', start='2012-01-01', end='2020-01-01') data = df.filter(items = ['Open'])
@arthurrichardson18357 жыл бұрын
Hey, so I tried running this script on my mac and execution starts, but then nothing happens. Tried switching the backend for matplotlib and that didn't help. Any thoughts as to what I'm doing wrong?
@spotflare5 жыл бұрын
The game of monkey throwing darts, now in python!
@Ezio-Auditore944 жыл бұрын
1:50 to 2:07 this is an invaluable addition that makes the whole project easier
@ShakTMT3 жыл бұрын
well im pretty sure you cant do it without installing those things lol, not a case of easy or not
@snpsforyomom7 жыл бұрын
Siraj you are a python guru!
@SirajRaval7 жыл бұрын
thanks Mark!
@marcussky8 жыл бұрын
Love your video's, but please read a Finance book because you don't know what stocks are or what Efficient Market Hypothesis is either.
@SirajRaval8 жыл бұрын
lol thanks.
@marcussky8 жыл бұрын
Sirajology but seriously your video's are the best! They give such a fantastic overview of machine learning has been a huge help to my development. Don't stop!
@ayush3287 жыл бұрын
Marcus Gawronsky how prediction is done for 2018 year?? I mean what are values for input node ??
@Stingray-ey7hd7 жыл бұрын
Could you maybe elaborate a bit on what mr. Raval does not know about stocks and EMH?
@fakeapplestore47106 жыл бұрын
Calm down he went to Columbia
@vedhasp8 жыл бұрын
one question... are we not essentially doing the data fitting here, rather than actual prediction? I mean we used the (x,y) data, we still do not know yt for unknown xt from the future yet? Btw thanks for all your videos, you teach things really well!!! To the point, covering most important bits, concise, and making it interesting all the way!!!! Many many thanks!!!
@SirajRaval8 жыл бұрын
thanks a lot! the graph fits the existing data, we can print the predicted price to command line using the helper function. i didn't plot the predicted price good point will do better next time
@blockchainstreet7 жыл бұрын
I have ever seen, such a great tutorial !!>. You are simply superb.. You turned out the traditional teaching method to be fun & fact based all the time!.. Kudos to you!!... I have one question here, how do we plot the predicted price?
@robinborjesson84996 жыл бұрын
Correct. This is completely worthless for prediction.
@yashwantkolluru87366 жыл бұрын
Hey could you tell which helper function could we use to predict the future price? I was trying SVR.predict, but i don't think if it is the right one
@akompsupport7 жыл бұрын
OK Folks. Don't try this at home. The code is full of minor misspelling bugs which you will spend hours trying to figure out. Also Google stopped exporting the date value of stock prices in the format this example needs in order to work 'out of the box' so to speak, so you will have to correct for that issue as well. Finally, like all sane persons, if you use python in virtualenv you will need to use the entire directory to tell the program where the csv file is, on linux in my case: get_data('/home/user/Desktop/pystock/aapl.csv').
@trishl7077 жыл бұрын
I just love this guy.
@SirajRaval7 жыл бұрын
Love back thanks!
@kozmizm4 жыл бұрын
So energetic! and so oversimplified. I love your videos, but it's true. Keep up the good work. you teach people the basics, You're not the only click-baiter on younube
@2949peace6 жыл бұрын
my code is producing a graph that does not pass the vertical line test (basically circles around). any suggestions for fixing this? its driving me crazy
@waqarmehdi43945 жыл бұрын
Hey Siraj, we don't have to install csv library with pip. It is already installed.
@questforprogramming5 жыл бұрын
This video is of 2016 bro...may be it was like that at that time..!!
@pakodiale62865 жыл бұрын
2016 version of Python didn't have it pre-installed
@aleekazmi7 жыл бұрын
Dude why cant all the CS guys be like you. They are always full of themselves and socially awkward af. Big fan :)
@robthorn39107 жыл бұрын
Something seems wrong but I don't know what. I have a ANN and I fed it GSPC data (Standard and Poors 500) from Jan 2000 to date. The ANN loved it, converged in like 80 iterations, 100%. Ok, I suspect overfitting so I do the cross-validation thing, run the data again for each data vector against the others. Result: 100%. I'm asking it to predict one of five categories, down moderately, down a little, flat, up a little or up moderately. I simply do not believe 100% accuracy is possible but IDK what I'm doing wrong.
@NishaThomp937 жыл бұрын
Does csv file reader still work? My terminal keeps getting stuck on not having a mod named csvFileReader. I went into the folder all I have is csv.py in there. I tried trying just csv in place of cfr but I'm still getting errors.
@radhekrishanrathod90015 жыл бұрын
Everytime I have to pause video and read meme.
@najibcasa27455 жыл бұрын
This was great, thanks, I been tryin to find out about "stock prices history nyse" for a while now, and I think this has helped. Ever heard of - Fenason Zeyames Idea - (search on google ) ? Ive heard some interesting things about it and my friend got amazing success with it.
@faizahmed86907 жыл бұрын
You can use pandas for simplifying the CSV reading process
@techiegeekk75657 жыл бұрын
Do you know how to implement it for years of dataset instead of just 30 days?
@faizahmed86907 жыл бұрын
How big is your dataset?
@faizahmed86907 жыл бұрын
If it is very huge you can use chunk by chunk import using pandas
@techiegeekk75657 жыл бұрын
As in the above video, the dataset downloaded was for only a month...I want to implement it for data of 5 years.
@williamdixon31355 жыл бұрын
I loved the wolf's reference LMAO
@Sagricon7 жыл бұрын
If you are trying it with python 3.6 on windows probably need to change your imports 1. csv is already there no need to import it 2. use numpy+mkl from lfd.uci.edu instead of numpy 3. have to install scipy to make skikit-learn to work also available on above site. 4. matplotlib is fine. other surprise is that google finance is no longer provide link to download the historic prices however you can type the url in address bar to access the historic data www.google.com/finance/historical?q=aapl happy coding :)
@blockchainstreet7 жыл бұрын
I have ever seen, such a great tutorial !!>. You are simply superb.. You turned out the traditional teaching method to be fun & fact based all the time!.. Kudos to you!!... I have one question here, how do we plot the predicted price?
@keerthineeraj79372 жыл бұрын
exactly. ive the same doubt
@sidaliu89897 жыл бұрын
Great try. I think these linear regression models are valuable and better than MA(Moving Average) Models which are widely used in daily life. But the cost of calculation is much more than MA.
@Shaniloka3697 жыл бұрын
I can't believe all this is coming out of his head. So smart. Ugh
@nidavis8 жыл бұрын
The price of the stock is not tied to the profits of a company -- it's an open market where it's worth whatever a buyer is willing to pay. Profit might be an input but it's only one of many.
@SirajRaval8 жыл бұрын
it is one of many inputs yup
@rverm10002 жыл бұрын
i couldn't get it to display the graph. don't have any errors. video might be outdated now. or it may be the data csv file.?
@octocat79497 жыл бұрын
In real life chaos, Apple could not even exist by tomorrow, but awesome topic =)
@SirajRaval7 жыл бұрын
lol tomorrow will always exist as long we're around.
@octocat79497 жыл бұрын
Yep, it also could exist without Apple. (Don't forget about factors, that affect stocks. One cannot simply predict a result without all necessary data, but you could have very precise expectations, which is better than nothing)
@LearnToMaster6 жыл бұрын
Great tutorial. Had to comment out the poly model as it just hung there. I noticed with a larger data set of 365 days, it took about 10x longer to show the graph compared with the 30 days in this tutorial, but the predict function for predicting on the 366 day for example, never worked. Why? Is it just too much processing for my humble mac?
@mihirpota4157 жыл бұрын
Awesome dude...great work
@brandenray95874 жыл бұрын
This is literally regression toward the mean.
@sirellyn43916 жыл бұрын
I tried running dow jones data and it only comes up with a graph with 2 lines. Green and Blue. The blue line goes down diagonally, and the green line is across the bottom. No curves or deviation. Used data from 2015 to 2018. The actual numbers seem to fluctuate fine. Any ideas?
@ysites6 жыл бұрын
Where can we get the file with the data (the .csv file)? Because in GitHub the link points to wikipedia for support Vector Machine.
@Intelligent_foresee7 жыл бұрын
Apparently it can be predicted, by using progressive A.I. However, currently it's only merchandises and currency exchange rate
@FloreVEVO8 жыл бұрын
Interesting video, like always.
@SirajRaval8 жыл бұрын
thanks Floretta!
@scottphillpott87097 жыл бұрын
I think my program is running but... as you point out the graphs are not plotting. Trying to fix that. What module do you recommend python 3.4?
@SirajRaval7 жыл бұрын
tkAgg
@_mantejkaur5 жыл бұрын
Hey Siraj ! I am getting an ValueError : couldn't convert string to float : '21/03/2014' When I am trying to put date as an parameter. Please help me out.
@alteralec7 жыл бұрын
Nice simple example. A bit simplistic though. Suggestions: Using dates to predict stock price is clearly overfitting, add lagged features. Also, why not compute some error metric in addition of looking at the graph?
@peavri8 жыл бұрын
@Sirajology With the CSV I got the following message: python -m pip install csv Collecting csv Could not find a version that satisfies the requirement csv (from versions: ) No matching distribution found for csv
@Naminator998 жыл бұрын
csv should come pre installed with any distro of python
@SirajRaval8 жыл бұрын
yea it should come preinstalled don't worry about it
@KIKEROMA19975 жыл бұрын
Siraj you truly are amazing, but I think with the stock market it is not as simple as you think it is, for example Before the 2008 financial crisis all securities-related with the housing sector have been going up and up and up for almost 70 years , all previous data would have suggested and upwards trend going on forever, but it collapsed in 2008 due to the subprime mortgage crises, so in that regard I am skeptic, and also following the price trend violates one of the most important principles of investing which is don't follow the hype.
@hwapollo92468 жыл бұрын
I laughed at the machine learning whisper. So funny. I'm pulling the trigger. Siraj, can you do a Google Hangout with us? Let's change the world.
@SirajRaval8 жыл бұрын
lmao thanks. hmm email me your idea sirajraval1@gmail.com
@keithandrelashley6 жыл бұрын
I have trouble finding the CSV file on the google finance site. They should information on the stock but no place to click on "historic prices". Is there another way I can access Facebooks csv? I hope Yahoo doesn't have the same problem. :(
@MoncoCarser7 жыл бұрын
I would approach this investing problem with much more data (there is plenty of good numbers to use). I don´t care what is Apple´s stock price tomorrow (short-term thinking with a small set of companies is purely dangerous) as I want to find companies that appear best for long-term ownership. Thanks for your great videos!
@SirajRaval7 жыл бұрын
thanks new one on this coming this week!
@hemantrakesh50106 жыл бұрын
I don't get an output for this code. There are no errors as I'm using Sublime text editor to code this.. I have download the spreadsheet as well, but all I get is an empty python.exe window, No graphs. What might be the problem?
@pankajjoshi23108 жыл бұрын
you are doing a great job. Keep it up.
@SirajRaval8 жыл бұрын
thanks Pankaj!
@BryceChudomelka6 жыл бұрын
Siraj, PyCharm doesn't have the library for "import lstm". What alternative library should I be using? theanos_lstm? Thanks for your time.
@donnilchopda21126 жыл бұрын
Lstm is part of keras library..
@tcoe646 жыл бұрын
Hey Siraj! Sorry if this is a stupid question but how did you get the sklearn package to install with Sublime Text's python environment?
@akshayraj46276 жыл бұрын
just install from terminal. thats what i did
@richaranderia95066 жыл бұрын
can we apply grid search using the scikit learn library to optimally find the values of c,gamma and epsilon? if not which is the best way to find these parameter values without taking the default values??
@rexevan67147 жыл бұрын
this is like my time series college task
@ashish11497 жыл бұрын
Two class logistics regression and two class neural network can predict stock prices reasonably accurately to make you tons of money. One quick caution don't try to predict price but use classification algorithm. Most important past price data have no role to play. Use fundamental data!
@SirajRaval7 жыл бұрын
thanks
@nanchomolina5 жыл бұрын
Hi everyone, when I ran this line : get_data('AAPL.csv') it shows a error message": NameError: name 'get_data' is not defined" Can Anyone help me. I copied the same code from the video, but that line doesn't work.
@apoorvwatsky6 жыл бұрын
that wolf of wall street seen is better than the original one.
@ricardomarquez93486 жыл бұрын
very good content, you learn a lot
@Naoufal9338 жыл бұрын
I've been watching your videos the whole evening and I have just one thing to say : -The day you'll get 1.000.000 followers I'll be able to say " I was a fan before he was famous" :D good job.
@SirajRaval8 жыл бұрын
thanks!!
@hansmeiser60787 жыл бұрын
I got no ouput, no error message running demo.py on Win7/Anaconda even while trying alternative backends. Any suggestions? I'm so disappointed now...deeply depressed.
@supergamer-nc7hv4 жыл бұрын
on line 43 I got a bug what is it? predicted)price = .... predicted_price = ..... or something else?
@caueZero7 жыл бұрын
Thanks for the amazing video.
@rossjpg8 жыл бұрын
Pip install CSV = ERROR ???? Why?? "Could not find a version that satisfies the requirement csv (from version : ) Not matching distribution found for csv How can i solve it???
@SirajRaval8 жыл бұрын
glad you fixed it
@synju7 жыл бұрын
??? fixed? I can't install it either! :[
@jacklynch7047 жыл бұрын
I have the same issue!!!
@Yan-os3jl7 жыл бұрын
Did u get the solution.PLzzzzzzzzzzzz share.
@teunvanwezel22827 жыл бұрын
Bit late, but the csv module is part of the standard library. You don't have to install it.
@joshsmit7794 жыл бұрын
When you watch his apology video 😂. Like if you get it.
@abdullahmahi449010 ай бұрын
I like your video. However, I have some questions, so according to your video, you will have a predicted price of over $660 for a certain date. Do you think that's correct? please correct me of I am wrong. I am just learning
@ckyn3t4 жыл бұрын
So much coding within vanilla python, you can easily read csv's and do some ETL on the file in Spark. You can reduce those lines from 6 to 2 with Spark.
@zaksenterprises8 жыл бұрын
Thanks for this video. I found it to be simple to follow and easy to duplicate. The only question/issue is that you are doing the calculation based on the day and if you do it from the middle of one month to the next the graph loops back. I assume the date can be looked at using month and day or maybe month day and year correct?
@SirajRaval8 жыл бұрын
good point. this is a very simple example and you're right. it can definitely be improved
@mrundefined307 жыл бұрын
So by doing this you check if the existing prices are predicted correctly, how would you get the new ones? you don't show that in this video, for example: how can you predict the prices for the next day, for each hour or something
@andresfelipeestradarodrigu3015 жыл бұрын
How could i make my job without you siraj? JaJAJAJAJAJAJAJJA (Y)
@mohitmalik97636 жыл бұрын
Hey Siraj, have you ever used stock price prediction model to actually trade in stock market, if yes, how much profit/loss you made ?
@stalepalemale5 жыл бұрын
Love your videos Siraj, not only are you damn clever you're funny too! :)
@hiteshvaidya33318 жыл бұрын
How did you decide that we must use SVM/SVR, no-free-lunch, rbf and parameters like value of C, gamma etc. ?
@SirajRaval8 жыл бұрын
+Hitesh Vaidya decided to use SVM because its easiest to demo, other points were necessary to explain svm
@SirajRaval8 жыл бұрын
+Hitesh Vaidya decided to use SVM because its easiest to demo, other points were necessary to explain svm
@sebasbros31777 жыл бұрын
Traceback (most recent call last): File "stockprice.py", line 42, in get_data('aapl.csv') File "stockprice.py", line 12, in get_data with open(filename, 'r') as csvfile: IOError: [Errno 2] No such file or directory: 'aapl.csv' Help pls i'm stuck : (