Build A Stock Prediction Web App In Python

  Рет қаралды 182,328

Patrick Loeber

Patrick Loeber

Күн бұрын

In this tutorial we build a stock prediction web app in Python using streamlit, yahoo finance, and Facebook Prophet
NOTE: Some have trouble installing this on Windows because of pystan: Follow the official docs (facebook.github.io/prophet/do...) which shows how to install it for Windows and Linux. Or a simpler way would be to use Anaconda and then: conda install -c conda-forge prophet.
Get my Free NumPy Handbook:
www.python-engineer.com/numpy...
✅ Write cleaner code with Sourcery, instant refactoring suggestions in VS Code & PyCharm: sourcery.ai/?... *
⭐ Join Our Discord : / discord
📓 Notebooks available on Patreon:
/ patrickloeber
If you enjoyed this video, please subscribe to the channel!
Code:
github.com/patrickloeber/pyth...
Credits:
github.com/Conformist101/stre...
Streamlit Tutorial: • Build A Beautiful Mach...
Resources:
www.streamlit.io/
facebook.github.io/prophet/
You can find me here:
Website: www.python-engineer.com
Twitter: / patloeber
GitHub: github.com/patrickloeber
#Python
----------------------------------------------------------------------------------------------------------
* This is a sponsored or an affiliate link. By clicking on it you will not have any additional costs, instead you will support me and my project. Thank you so much for the support! 🙏

Пікірлер: 249
@patloeber
@patloeber 3 жыл бұрын
NOTE: Some have trouble installing this on Windows because of pystan: Follow the official docs (facebook.github.io/prophet/docs/installation.html) which shows how to install it for Windows and Linux. Or a simpler way would be to use anaconda and then: conda install -c conda-forge prophet.
@gaylonalfano
@gaylonalfano 3 жыл бұрын
For those that do not want to use conda: 1. pip install pystan==2.19.1.1 2. pip install fbprophet This should allow you to successfully install fbprophet and follow along. The issue lies with pystan 3+ that has some breaking changes. Hope this helps!
@navdissenyo7371
@navdissenyo7371 3 жыл бұрын
@@gaylonalfano I try this, but getting error
@waylonbradley1345
@waylonbradley1345 3 жыл бұрын
I know Im kind of randomly asking but does anyone know of a good place to stream newly released series online ?
@pine6568
@pine6568 3 жыл бұрын
@@gaylonalfano I tried it but I'm still getting error on fbprophet is there any other solution other than conda and pystan?
@dreamvillage9108
@dreamvillage9108 2 жыл бұрын
@@pine6568 Try anaconda
@k2icc
@k2icc 2 жыл бұрын
One of the best I have seen. Encountered some problems, but was able to fix them. Thanks for the video.
@mechwar1583
@mechwar1583 2 жыл бұрын
Thank you very much, I am a beginner and I was trying to plot the closing value and the opening value on a chart , and then I saw your video and it was exactly what I was looking for.
@bendev6807
@bendev6807 3 жыл бұрын
Really great tutorials, and this one help me discover new libraries that I wasn't aware of. Thanks a lot :)
@patloeber
@patloeber 3 жыл бұрын
Great to hear!
@Nedwin
@Nedwin 3 жыл бұрын
I am a Python enthusiast and I can say that this tutorial is awesome! ❤️
@patloeber
@patloeber 3 жыл бұрын
Awesome, thank you!
@asstunner1633
@asstunner1633 2 жыл бұрын
Thanks a lot! This tutorial was amazing!
@masonlee8573
@masonlee8573 2 жыл бұрын
This is a great tutorial. Thank you!
@rxi99
@rxi99 Жыл бұрын
You're a life saver, thank you so much for this tutorial
@newcooldiscoveries5711
@newcooldiscoveries5711 Жыл бұрын
Hi, I just wanted to take a moment to thank you for your awesome and useful tutorials here on KZfaq with people watching and learning from all over the globe. You are an unsung hero. By the way, the link above, when clicked, throws an error with the extra character at the end: html)
@veergoyal3423
@veergoyal3423 2 жыл бұрын
ONE OF THE WORLD BEST AND EASIEST TUTORIAL ALL LOVE FROM MY SIDE
@hassanalshekha1994
@hassanalshekha1994 2 жыл бұрын
This is really awesome...Thanks for sharing.
@devwalia165
@devwalia165 3 жыл бұрын
man love this video it's so useful I have t=get to learn about stramlit so easily and how to use other libraries hatsoff
@patloeber
@patloeber 3 жыл бұрын
great!
@jassskalkat
@jassskalkat 2 жыл бұрын
this is mental bro i love the tutorial
@yamitanomura
@yamitanomura 5 ай бұрын
Omg, amazing forecast!
@programmerrdai
@programmerrdai 3 жыл бұрын
Great Content Keep up the good work ;)
@mayacho4910
@mayacho4910 Жыл бұрын
One of the best content I’ve seen. stock is the best though I don’t self trade but I still make my profit with the help of my broker till I'm sure I can start of self trading
@theresagarcia1218
@theresagarcia1218 Жыл бұрын
I'm looking forward to investing in the stock market. I am still trying to figure out how the entire thing works
@mayacho4910
@mayacho4910 Жыл бұрын
@@theresagarcia1218 Obviously trading in stock is very volatile and risky, that's the reason most investors trade with a professional broker.
@mayacho4910
@mayacho4910 Жыл бұрын
@@theresagarcia1218 I would recommend my personal broker/trader, she can help you get started, just look with her name online.
@mayacho4910
@mayacho4910 Жыл бұрын
@@theresagarcia1218 'PRISCILLA DIANE AIVAZIAN"
@theresagarcia1218
@theresagarcia1218 Жыл бұрын
@@mayacho4910 Thank you for this, i will be sure to look her up, hopefully she can help me get started.
@rademilijasevic4313
@rademilijasevic4313 5 ай бұрын
Super cool, thanks a lot!
@list1726
@list1726 Жыл бұрын
Thanks. Good job 👍
@runthat
@runthat 3 ай бұрын
This was so so so good. You are awesome thank you so much.
@mohitpande2006
@mohitpande2006 2 жыл бұрын
Patrick thank you so much
@cindy8533
@cindy8533 2 жыл бұрын
I just wanna say. Thank you. Thank you so much💕
@patloeber
@patloeber 2 жыл бұрын
you're welcome :)
@jcatlantis
@jcatlantis 3 жыл бұрын
You are the best ;) keep going 💪
@patloeber
@patloeber 3 жыл бұрын
Thanks, will do!
@minanabil1035
@minanabil1035 3 жыл бұрын
WOW... great video many thanks
@patloeber
@patloeber 3 жыл бұрын
Glad you liked it!
@jllopezz
@jllopezz 3 жыл бұрын
Thank you ! Got working on my Mac
@patloeber
@patloeber 3 жыл бұрын
Great!
@saharshsaxena
@saharshsaxena 3 ай бұрын
great video!
@himanshiesway3280
@himanshiesway3280 10 ай бұрын
hey man! you are awesome
@ambujmittal6824
@ambujmittal6824 3 жыл бұрын
I am a simple guy. I get a notification from this channel, I hit like.
@patloeber
@patloeber 3 жыл бұрын
You are the best :)
@kavalisuresh8670
@kavalisuresh8670 3 жыл бұрын
Nice. From India. Thank You
@sunritjana4573
@sunritjana4573 3 жыл бұрын
Loved this video, it was awesome! And Which VSCode theme and font do you use?
@patloeber
@patloeber 3 жыл бұрын
Night Owl Theme
@chromaticfrog7407
@chromaticfrog7407 3 жыл бұрын
Very nice. Subbed.
@patloeber
@patloeber 3 жыл бұрын
thank you!
@reizkijihan9106
@reizkijihan9106 3 жыл бұрын
thankyou so much u help me a lot
@patloeber
@patloeber 3 жыл бұрын
glad to hear this!
@peterodesola5056
@peterodesola5056 2 жыл бұрын
thank you so much
@khenafhichem256
@khenafhichem256 3 жыл бұрын
thank u sir, keep going
@patloeber
@patloeber 3 жыл бұрын
thanks!
@siumhossain-
@siumhossain- 3 жыл бұрын
Explanation way just mind blowing 🌊....Find this channel from data professor .😍
@patloeber
@patloeber 3 жыл бұрын
Glad you found it :)
@dreamvillage9108
@dreamvillage9108 2 жыл бұрын
Great video! Can you please tell me how to do when the market open only Monday to Friday? Thank you very much!
@vbarai
@vbarai 3 жыл бұрын
Hi, How can we build real-time graph display using python. Data could be from kafka or elasticsearch like source?
@simonebenzi4189
@simonebenzi4189 3 ай бұрын
Awesome!! Could you do some addictional videos of this type? Maybe integrating some ML outputs with streamlit, e.g. XGBoost for energy consumption predition or classification, thank you!!!
@AcademyOmen
@AcademyOmen 3 жыл бұрын
So sweet ☺️☺️
@patloeber
@patloeber 3 жыл бұрын
😊
@jairjuliocc
@jairjuliocc 3 жыл бұрын
Thank you for your work . It was very easy to follow . Is possible embed this app in a existing web page?
@patloeber
@patloeber 3 жыл бұрын
Glad you like it! Unfortunately it is not trivial to integrate streamlit into e.g. Flask or some other framework because it's already using its own web server internally (which is tornado).
@deenabandhu2482
@deenabandhu2482 3 жыл бұрын
your channel minimum deserves 100k subs
@patloeber
@patloeber 3 жыл бұрын
thanks so much!
@Rabixter
@Rabixter 2 жыл бұрын
Very nice and clear tutorial. Thank you for the video.
@Rabixter
@Rabixter 2 жыл бұрын
github.com/rabiahmad/prophet_stock_prediction
@shreyashwaghmare1189
@shreyashwaghmare1189 2 жыл бұрын
which python version to use for current streamlit module and fbprophet?
@Tomiwahimself
@Tomiwahimself 2 жыл бұрын
Hello I know this is almost a year after you have made this video but I need to know what machine learning algorithm you used in this video and thanks for letting me about streamlit never heard of it till this video and its awesome
@itsmegayatri1999
@itsmegayatri1999 2 жыл бұрын
Which algorithm is used
@fantasyworld7536
@fantasyworld7536 2 жыл бұрын
Hello, how I can host this type of projects like the above project you made on hostinger or any other platform.
@TheAmazingpower
@TheAmazingpower 3 жыл бұрын
Is there a benefit using plotly graph objects over plotly express here? I like the express API a lot more (classic passing of df and just calling column names on variables, like ggplot or other libs handle input for plots).
@patloeber
@patloeber 3 жыл бұрын
I think both are fine :)
@mikeparenteau6902
@mikeparenteau6902 5 ай бұрын
Any way to adjust the forecast component graphs if you set streamlit to "wide" mode?
@nithinv1284
@nithinv1284 2 жыл бұрын
Can we upload a csv with the tickers in it and create a drop down
@dandan934
@dandan934 2 жыл бұрын
I use windows, to install the needed packs would I just use the console? (Beginner)
@Abhi-jz4cp
@Abhi-jz4cp Жыл бұрын
which algorithm is used for forecasting?
@openmindjustdoit1306
@openmindjustdoit1306 Жыл бұрын
thanks for this video i try it work fine but when i work next year the chart not up or down just like line how i can benfit this applaction and can read from csv file or excel file
@keertimahajan9922
@keertimahajan9922 2 жыл бұрын
For forecasting which machine learning algorithm isused
@kaviyatheerthagiri5332
@kaviyatheerthagiri5332 Жыл бұрын
Which algorithm you use to predict stock?
@paulocarneiro4947
@paulocarneiro4947 Жыл бұрын
Hello Patrick, thanks for this amazing tutorial! Please help me solving the following: - my Raw Data table doesn't show figures; and - line 27 "data = load_data(selected_stock) is displaying error on selected_stock, when I change to "selected_stock" the error disapears. Cheers! Paulo
@aravindts5040
@aravindts5040 3 жыл бұрын
While executing getting an attribute error "AttributeError: 'function' object has no attribute 'tail'" on line, st.write(data.tail()). Can't able to sort it out.
@mohamedelbialy4291
@mohamedelbialy4291 3 жыл бұрын
can i upload excel file or csv file instead of load data from yahoo finance
@ajay0425
@ajay0425 2 жыл бұрын
how to get predictions of next 100 days. i just cmplted this project n i'm so impressed by the predictions , im curious about future predictions
@itsmegayatri1999
@itsmegayatri1999 2 жыл бұрын
Which algorithm is used lstm or svm
@starlite5097
@starlite5097 3 жыл бұрын
Hello, I just discovered your channel and it's awesome. Please make tutorials with Computer Vision stuff or SLAM algorithms. ^_^
@patloeber
@patloeber 3 жыл бұрын
Thanks for the idea!
@eduardogamboa7209
@eduardogamboa7209 Жыл бұрын
Hi I know these is an old video but just wondering if you can maybe update it sinse the yfinance API seems to be closed and the code doesn't work. Love your work and thanks in advance
@kingsleymbonu8370
@kingsleymbonu8370 3 жыл бұрын
Nice video I'm using spyder IDE but after running the code I cannot find the local host to the browser to see what have written for example localhost: 8051.Is there anyway i can make it work
@carelanthony4668
@carelanthony4668 2 жыл бұрын
i have a trouble in yfinance module, there is any solution?
@yosolonopuedo
@yosolonopuedo 3 жыл бұрын
Loved the video! One question though, why do you always use plotly and never use Bokeh for example? Just curious.
@patloeber
@patloeber 3 жыл бұрын
Because both Streamlit and fbprophet support plotly out of the box
@yosolonopuedo
@yosolonopuedo 3 жыл бұрын
@@patloeber I understand. How complicated is using Bokeh? (Sorry for asking so much)
@computerscience5820
@computerscience5820 2 жыл бұрын
getting error on installing prophet i install pystan and then tried pip install prophet also tried pip install fbprophet but getting error :DLL load failed :Failed building wheel for prophet
@XxXGennXxX
@XxXGennXxX 2 жыл бұрын
Hi, i'm getting this date format "2021-10-01T00:00:00+02:00" on streamlit but on my terminal i get "2021-09-27" , how can i get what i see on my terminal in streamlit?
@RandomVids-lg9lu
@RandomVids-lg9lu Жыл бұрын
Will this be accepted as a mini project if i use this?
@tshiamoselemogwe4234
@tshiamoselemogwe4234 11 ай бұрын
Good day, What IDE are you using?
@wasss3745
@wasss3745 2 жыл бұрын
It can integrate to a web based application? Im a beginner sir, Thankyou if there is anyone will answer my question
@_abhishekhonparkhe_
@_abhishekhonparkhe_ Жыл бұрын
Can somebody explain me the forecast components graphs
@sigma10188
@sigma10188 Жыл бұрын
how I can forcast another stock other than mentioned stock
@sudhanyogi2560
@sudhanyogi2560 2 жыл бұрын
Which version python did you used?
@Dhirendrakumar-fe3nn
@Dhirendrakumar-fe3nn 2 жыл бұрын
I have an issue streamlit show (no module named 'fbprophet') Please respond
@herammbb
@herammbb Жыл бұрын
Can someone explain the meaning of the last 3 components graphs
@benonyegilson9129
@benonyegilson9129 2 жыл бұрын
Everything after the Raw data chart doesn't appear on the screen what did i do wrong?
@zachfenton608
@zachfenton608 3 жыл бұрын
vielen dank
@patloeber
@patloeber 3 жыл бұрын
:)
@keertimahajan9922
@keertimahajan9922 2 жыл бұрын
Can u show me how to cluster stocks sectorwise plz share video
@harshavardhanmudiam5533
@harshavardhanmudiam5533 2 жыл бұрын
is there anyway to use this on windows, because ive been trying for a while and nothing is working
@rajat_1825
@rajat_1825 2 жыл бұрын
AttributeError: 'Prophet' object has no attribute 'stan_backend' how to fix this
@saiwilatt4636
@saiwilatt4636 8 ай бұрын
is it using the real time data for prediciton??
@aryanagarwal9184
@aryanagarwal9184 22 күн бұрын
In this is it possible to choose from any stocks intead of the designated one by the user himeslf
@vireaksok4213
@vireaksok4213 Жыл бұрын
I want to get rid of the light blue shadow in Forecast graph, does anyone here know how to do it?
@Abhinavkumar_ai
@Abhinavkumar_ai 11 ай бұрын
what is the accuracy of this model ??
@karthikb.s.k.4486
@karthikb.s.k.4486 3 жыл бұрын
Hi what is the vscode theme that you are using it looks beautiful please let me know
@patloeber
@patloeber 3 жыл бұрын
Night Owl
@karthikb.s.k.4486
@karthikb.s.k.4486 3 жыл бұрын
Thanks a lot
@alanpauljaxon9054
@alanpauljaxon9054 3 жыл бұрын
Hi I am trying to build my skills in analytics. I didn't understand what is venv, how to run things in it etc.
@patloeber
@patloeber 3 жыл бұрын
it's a virtual environment in Python
@nashwaanalikhan
@nashwaanalikhan 3 жыл бұрын
Hello Sir I am watching your Intermediate Python Tutorial. I am trying to make my way into Artificial Intelligence using Python, do you recommend anything (also I am just learning through KZfaq and other websites only)?
@patloeber
@patloeber 3 жыл бұрын
that's cool! I recommend my ML from scratch series and Andrew Ng's Machine Learning course
@damianwysokinski3285
@damianwysokinski3285 3 жыл бұрын
You can have a look at deep learn8ng specialization of Andrew Ng too
@yashaspradeep7073
@yashaspradeep7073 3 жыл бұрын
Can i upload this as an html file to run on a website so i can show this is a personal project? and if so can you make a video on how to do that
@patloeber
@patloeber 3 жыл бұрын
yeah you can deploy streamlit on e.g. Heroku
@KushG420
@KushG420 3 жыл бұрын
I am trying to this type of prediction in a website 🙏🙏 an elaborate reply would help very much...
@enhjargal5895
@enhjargal5895 8 ай бұрын
Where should I install modules
@user-atul07
@user-atul07 3 жыл бұрын
How can we deploy this website live
@mrshot2273
@mrshot2273 Жыл бұрын
I need create home page , sign in and sign up for please help me
@mannosemannose9273
@mannosemannose9273 Жыл бұрын
How could this error be resolved? : ValueError: Column ds has timezone specified, which is not supported. Remove timezone. Traceback:
@saud5133
@saud5133 2 жыл бұрын
Hello... How to Read a Binary File Like Metastock Files Using Python
@brishtisowmondal6562
@brishtisowmondal6562 2 жыл бұрын
can i run this on colab?
@pranshusaini2645
@pranshusaini2645 11 ай бұрын
I'm not able to import anything at all The libraries pyarrow, fbprophet at all. any Ideas How can I fix them
@bibinbjacob4942
@bibinbjacob4942 2 жыл бұрын
Can we do it on windows?
@gerardpuche
@gerardpuche 8 ай бұрын
what IDE is that? (Xcode?)
@user-atul07
@user-atul07 3 жыл бұрын
can we use google collab for this and if we do so how can we access website link
@patloeber
@patloeber 3 жыл бұрын
haven't tried it
@bandai2
@bandai2 Жыл бұрын
As today you can also install prophet as "pip install prophet" if you have problems installing the packages
@jehuss
@jehuss 3 жыл бұрын
can you deploy strimlit in a domain?
@patloeber
@patloeber 3 жыл бұрын
Yes you can deploy it
@viane123456
@viane123456 2 жыл бұрын
is it possible to do for Indian exchanges? NSE and BSE?
@rseditography7534
@rseditography7534 Жыл бұрын
Yes, India stock name (.NS) add .ns in end
@mussaalamri10
@mussaalamri10 2 жыл бұрын
|I really dont understand where and how you run streamlit. can you please help? i am using jupyter and windows 10
@patloeber
@patloeber 2 жыл бұрын
you have to create a python script and then run the command from the terminal
Predict The Stock Market With Machine Learning And Python
35:55
Dataquest
Рет қаралды 654 М.
50 YouTubers Fight For $1,000,000
41:27
MrBeast
Рет қаралды 195 МЛН
Heartwarming moment as priest rescues ceremony with kindness #shorts
00:33
Fabiosa Best Lifehacks
Рет қаралды 38 МЛН
Cat Corn?! 🙀 #cat #cute #catlover
00:54
Stocat
Рет қаралды 17 МЛН
Predicting Stock Prices with FBProphet in Python
21:26
NeuralNine
Рет қаралды 29 М.
Streamlit: The Fastest Way To Build Python Apps?
11:57
pixegami
Рет қаралды 85 М.
Build a Stock Trend Prediction Web App in Python | GeeksforGeeks
56:31
Stock Price Prediction Using Python & Machine Learning
49:48
Computer Science
Рет қаралды 1,2 МЛН
How to create a great dev environment with Docker
29:55
Patrick Loeber
Рет қаралды 256 М.
Python Website Full Tutorial - Flask, Authentication, Databases & More
2:16:40
Run your own AI (but private)
22:13
NetworkChuck
Рет қаралды 1,3 МЛН
Predicting Stock Prices in Python
29:14
NeuralNine
Рет қаралды 528 М.
Automate with Python - Full Course for Beginners
2:42:55
freeCodeCamp.org
Рет қаралды 1,5 МЛН
50 YouTubers Fight For $1,000,000
41:27
MrBeast
Рет қаралды 195 МЛН