How to Code a AI Trading bot (so you can make $$$)

  Рет қаралды 439,693

Nicholas Renotte

Nicholas Renotte

Күн бұрын

🐍 Get the free Python course
go.coursesfromnick.com/python
👨‍💻 Sign up for the Full Stack course and use KZfaq50 to get 50% off:
www.coursesfromnick.com/bundl...
Hopefully you enjoyed this video.
💼 Find AWESOME ML Jobs: www.jobsfromnick.com
🤖 Get the Code: github.com/nicknochnack/MLTra...
Disclaimer: This has been developed for academic purposes. Nothing herein is financial advice, and NOT a recommendation to trade real money. Please use common sense and always first consult a professional before trading or investing.
Oh, and don't forget to connect with me!
LinkedIn: bit.ly/324Epgo
Facebook: bit.ly/3mB1sZD
GitHub: bit.ly/3mDJllD
Patreon: bit.ly/2OCn3UW
Join the Discussion on Discord: bit.ly/3dQiZsV
Happy coding!
Nick

Пікірлер: 718
@NicholasRenotte
@NicholasRenotte 3 ай бұрын
If you get a get_news() error when running the model make sure you're running alpaca-tade-api equal to 3.1.1 or greater. If not, run the following install and you should be good to go. pip install alpaca-trade-api==3.1.1 I updated the README in GitHub so you should be sweet to smash it.
@IRTYU-5D3
@IRTYU-5D3 3 ай бұрын
I get an api error that has something to do with the ML model IDK if you can help but if you do you may really help a junior dev get ahead.Starting backtest for MLTrader... INFO:backtest_stats:Starting backtest... Progress |--------------------------| 3.46% [Elapsed: 0:00:04 ETA: 0:02:07]2024-02-04 00:48:11,863: root: ERROR: Strategy.create_order() got an unexpected keyword argument 'type' 2024-02-04 00:48:11,865: root: ERROR: Traceback (most recent call last): File "/Users/jasonwilliams/anaconda3/envs/trader/lib/python3.10/site-packages/lumibot/strategies/strategy_executor.py", line 822, in run self._run_trading_session() File "/Users/jasonwilliams/anaconda3/envs/trader/lib/python3.10/site-packages/lumibot/strategies/strategy_executor.py", line 773, in _run_trading_session self._on_trading_iteration() File "/Users/jasonwilliams/anaconda3/envs/trader/lib/python3.10/site-packages/lumibot/strategies/strategy_executor.py", line 286, in func_output result = func_input(self, *args, **kwargs) File "/Users/jasonwilliams/anaconda3/envs/trader/lib/python3.10/site-packages/lumibot/strategies/strategy_executor.py", line 310, in func_output result = func_input(self, *args, **kwargs) File "/Users/jasonwilliams/anaconda3/envs/trader/lib/python3.10/site-packages/lumibot/strategies/strategy_executor.py", line 86, in func_output return func_input(self, *args, **kwargs) File "/Users/jasonwilliams/anaconda3/envs/trader/lib/python3.10/site-packages/lumibot/strategies/strategy_executor.py", line 388, in _on_trading_iteration on_trading_iteration() File "/Users/jasonwilliams/anaconda3/envs/trader/lib/python3.10/site-packages/lumibot/tools/decorators.py", line 62, in func_output frame, result = call_function_get_frame(func_input, *args, **kwargs) File "/Users/jasonwilliams/anaconda3/envs/trader/lib/python3.10/site-packages/lumibot/tools/decorators.py", line 30, in call_function_get_frame result = func(*args, **kwargs) File "/Users/jasonwilliams/ML Project/MLTradingBot/tradingbot.py", line 56, in on_trading_iteration order = self.create_order( TypeError: Strategy.create_order() got an unexpected keyword argument 'type' Exception in thread MLTrader: Traceback (most recent call last): File "/Users/jasonwilliams/anaconda3/envs/trader/lib/python3.10/site-packages/lumibot/strategies/strategy_executor.py", line 822, in run self._run_trading_session() File "/Users/jasonwilliams/anaconda3/envs/trader/lib/python3.10/site-packages/lumibot/strategies/strategy_executor.py", line 773, in _run_trading_session self._on_trading_iteration() File "/Users/jasonwilliams/anaconda3/envs/trader/lib/python3.10/site-packages/lumibot/strategies/strategy_executor.py", line 286, in func_output result = func_input(self, *args, **kwargs) File "/Users/jasonwilliams/anaconda3/envs/trader/lib/python3.10/site-packages/lumibot/strategies/strategy_executor.py", line 310, in func_output result = func_input(self, *args, **kwargs) File "/Users/jasonwilliams/anaconda3/envs/trader/lib/python3.10/site-packages/lumibot/strategies/strategy_executor.py", line 86, in func_output return func_input(self, *args, **kwargs) File "/Users/jasonwilliams/anaconda3/envs/trader/lib/python3.10/site-packages/lumibot/strategies/strategy_executor.py", line 388, in _on_trading_iteration on_trading_iteration() File "/Users/jasonwilliams/anaconda3/envs/trader/lib/python3.10/site-packages/lumibot/tools/decorators.py", line 62, in func_output frame, result = call_function_get_frame(func_input, *args, **kwargs) File "/Users/jasonwilliams/anaconda3/envs/trader/lib/python3.10/site-packages/lumibot/tools/decorators.py", line 30, in call_function_get_frame result = func(*args, **kwargs) File "/Users/jasonwilliams/ML Project/MLTradingBot/tradingbot.py", line 56, in on_trading_iteration order = self.create_order( TypeError: Strategy.create_order() got an unexpected keyword argument 'type' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/Users/jasonwilliams/anaconda3/envs/trader/lib/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/Users/jasonwilliams/anaconda3/envs/trader/lib/python3.10/site-packages/lumibot/strategies/strategy_executor.py", line 835, in run raise RuntimeError("Exception encountered, stopping BackTest.") from e RuntimeError: Exception encountered, stopping BackTest. Creating trades plot... Creating indicators plot... Creating tearsheet... 2024-02-04 00:48:12,776: root: ERROR: Not enough data to create a tearsheet, at least 2 days of data are required. Skipping ((Sorry for the long explanation please help))
@mohz832
@mohz832 3 ай бұрын
Thanks a million! I was going to ask 🙂
@UpVerse7
@UpVerse7 3 ай бұрын
How can the bot be improved, what else can we do increase the accuracy and better the bots decision making on trades??
@andreasbaros5528
@andreasbaros5528 2 ай бұрын
Anybody else gets this error?: TypeError: Strategy.create_order() got an unexpected keyword argument 'type'
@romannyapi3176
@romannyapi3176 12 күн бұрын
but how to import the strategy code in the app ?
@NicholasRenotte
@NicholasRenotte 3 ай бұрын
Also OG trading logs, settings and data is in the GitHub repo in the log folder in case you want it y’all.
@larsondavis8155
@larsondavis8155 2 ай бұрын
Duuuude. Love watching. The quickness at which you move step to step is fantastic. And the breakdown as you're doing it is fantastic. Fantastic.
@johantro
@johantro 2 ай бұрын
he is so good at it. I learnt a lot from him.
@nafizbran
@nafizbran 2 ай бұрын
Fantastic.
@mdawg998
@mdawg998 Ай бұрын
What programs do I need for this?
@DBriddo
@DBriddo Ай бұрын
@@mdawg998learn python programming... m.kzfaq.info/get/bejne/qrGEjdJzl7zOpZ8.html
@mdawg998
@mdawg998 26 күн бұрын
Has this worked for you?
@jwia007
@jwia007 3 ай бұрын
Instead of using your files, I love coding with you on each video. You are amazing sir! Thank you
@NicholasRenotte
@NicholasRenotte 3 ай бұрын
Awesome, do you go back to the files as well occasionally? Sometimes I find it a little hard to get context of where the app is at.
@DerrellProctor
@DerrellProctor 2 ай бұрын
Crisp, smart way of explaining, necessary and sufficient information. That was helpful. Thank you.
@mdawg998
@mdawg998 26 күн бұрын
Has this worked for you?
@swizman2709
@swizman2709 3 ай бұрын
Great video, very clean code and easy to code it along with you. 10/10!
@mdawg998
@mdawg998 26 күн бұрын
Has this worked for you?
@CodingWithLewis
@CodingWithLewis 3 ай бұрын
Love the thorough detail of building this bot from beginning to end!
@NicholasRenotte
@NicholasRenotte 3 ай бұрын
Cheers Lewis!! You’re crushing it man, shorts are 🔥
@mdawg998
@mdawg998 Ай бұрын
What program is he using so I can begin?
@mdawg998
@mdawg998 Ай бұрын
What programs do I need for this?
@NicholasRenotte
@NicholasRenotte Ай бұрын
@@mdawg998 Python and somewhere to code. I used VS Code for this.
@krieger63
@krieger63 23 күн бұрын
Hey Nicolas, really brilliant workshop and explanation to make em an idea on ML trading implementation. Thx a lot. You did great !
@wasgeht2409
@wasgeht2409 3 ай бұрын
Bro is back! Thank you :) Best regards from Germany
@NicholasRenotte
@NicholasRenotte 3 ай бұрын
Ayyy thank you so much man!! Took a little break to study, pumped to be back!
@iamdrex7349
@iamdrex7349 3 ай бұрын
I truly appreciate the effort you've put into sharing your knowledge and expertise. Looking forward to more great content from you in the future!
@NicholasRenotte
@NicholasRenotte 3 ай бұрын
Thanks so much for checking it out! 🙏
@user-ok4op5wu4p
@user-ok4op5wu4p 3 ай бұрын
Welcome back! I really love to watch your codes.
@NicholasRenotte
@NicholasRenotte 3 ай бұрын
Thanks so much man, good to be back!!
@guillermoalvarezdelacadena5110
@guillermoalvarezdelacadena5110 3 ай бұрын
AMAZING VIDEO!! I've been looking for a video like this!
@NicholasRenotte
@NicholasRenotte 3 ай бұрын
Thanks a mil 🙏
@mdawg998
@mdawg998 Ай бұрын
What programs do I need to do this?
@ludwigb6334
@ludwigb6334 3 ай бұрын
Hey, it would be great if you continue the RL journey of yours. Coding more complex simpy environments, applying real-life cases etc. I would highly appreciate it!! Thanks for your content!
@NicholasRenotte
@NicholasRenotte 3 ай бұрын
Oooh yeah RL is tricky but we can give it a go using lumibot now! Will study up while I’m travelling!
@bryanmoralespallero9732
@bryanmoralespallero9732 3 ай бұрын
This is really good, Nic. Thank your very much!
@NicholasRenotte
@NicholasRenotte 3 ай бұрын
Thanks a million Bryan!! 🙏
@GXNG_SA
@GXNG_SA Ай бұрын
totally new to coding and as a professional trader this video is awesome to the point it seems like I already know how to code . splendid
@husamitani7491
@husamitani7491 Ай бұрын
SIr i am currently learning algorithmic trading through several courses , however I stopped by coincidence at this video and observed how really good you are ! BUt unfortunately as I checked your channel there doesnt seem to be much more about the same topic as I thought , you have general coding stuff. In case you made a training courses I would be delighted to join in it , or if you can make more trading related videos about algo and quant trading if possible .... your information is so precious . Thank you
@djl3009
@djl3009 3 ай бұрын
"Part I : Build the baseline bot":"00:00:43", "Import libraries - lumibot etc":"00:00:56", "Part II : Position sizing and limits":"00:10:11", "Part III : Getting some news":"00:15:48", "Part IV : Bringing in the ML Model (AI)":"00:23:43", "Part V : Integrating our trading signal (sentiment)":"00:28:27"
@NicholasRenotte
@NicholasRenotte 3 ай бұрын
The real MVP!
@gershwinwest
@gershwinwest 3 ай бұрын
​@@NicholasRenotte👌🏾it's complex and it works 🙋🏽‍♂️But me have questions😅 It's about the "lumibot" what is it and where can i install/get it😗
@AbasiibiangakeUdo
@AbasiibiangakeUdo 9 күн бұрын
Can u drop ur WhatsApp number...so u can teach mii
@user-su7wd3sb1q
@user-su7wd3sb1q Ай бұрын
necessary and sufficient information. That was helpful. Thank you.
@paulharris4780
@paulharris4780 Ай бұрын
Hey there! This is an amazing video. The best Bot video, and also one of the best Python videos in general! Question - Would this be difficult to setup to buy crypto instead? I'm going to work on that this week lol
@cjnew47
@cjnew47 Ай бұрын
Legend ! As a soon to be CS grad and trading enthusiast, this is a very informative video. Gives you a different perspective to the market, beyond the human side of it. Market makers aren’t sitting at their desk entering/exiting whale size positions by the second, computers are…code is ! I started to learn pine script (still might) to utilize scripting on tradingview, but thank you for displaying an exciting way to breaking into quant trading with python . Thank you 10000 times, earned a new subscriber!
@mdawg998
@mdawg998 Ай бұрын
What programs do I need for this?
@cjnew47
@cjnew47 Ай бұрын
@@mdawg998anaconda/ vs code (visual studio)
@Splarkszter
@Splarkszter 3 ай бұрын
This is really cool. I learned a lot, wish to see more of these kind of things :)
@NicholasRenotte
@NicholasRenotte 3 ай бұрын
Glad you enjoyed it, plenty more coming!
@thewatersavior
@thewatersavior 3 ай бұрын
love the library summary!
@NicholasRenotte
@NicholasRenotte 3 ай бұрын
Yeah? Got it, will keep it in for the next vid!
@jaimem1325
@jaimem1325 Ай бұрын
This video is an automatic subscription trigger lol thank you!
@atanasneykov1514
@atanasneykov1514 2 ай бұрын
Very interesting code and explanation! I have several question: Is there any check on sufficient funds in the investment account? If the funds in the account is low, how would the bot react? Is there protection in the form of a residual reserve of funds for any taxes for the positions for positions that are already active?
@sufyan2317
@sufyan2317 3 ай бұрын
Bro is back with some insane projects !
@NicholasRenotte
@NicholasRenotte 3 ай бұрын
😉 just needed a little time to cook!
@cartoonchan182
@cartoonchan182 3 ай бұрын
Hey nick nice video as always... i havent used TF in a long time so if i start i would feel like learning a new framework so planning to shift to pytorch and based on all huggingface videos i guess pytorch is better(also cant find that many TF videos regarding hugging face)??
@staracucare519
@staracucare519 2 ай бұрын
Great video, What version of NVIDIA driver do you use to speed up the machine learning processing? For me, I can only use old version 11040 driver to make the script work, but it processes slow. Newer NVIDIA driver makes "Torch" out of memory after 20% Progress then stop.
@howryaa6705
@howryaa6705 3 ай бұрын
Hey bro love the vid new sub.... I just wanted to know where you learnt this all I'm currently in the position where I've finished high school planning to go uni for computer science, just wanted some advice or maybe some knowledge where you came on your journey to build this skillset of coding and having social media presence etc..
@futuresick100
@futuresick100 3 ай бұрын
Cheers from Greece! Thanks for this.
@NicholasRenotte
@NicholasRenotte 3 ай бұрын
Ayo, thanks happening Greece!! I’m not too far from you right now, in Barcelona!
@user-kr1us1mz3i
@user-kr1us1mz3i 2 ай бұрын
καλησπερα αδερφε! σου απαντησα γτ ειδα εισαι ελληνας.. εχεις δοκιμασει και ειναι legit ενα τετοιο bot? ειναι κομπλε η φαση?
@futuresick100
@futuresick100 2 ай бұрын
για σου ρε φιλε. καλος ειναι. δε το εχω παιξει ακομα. τι να σου πω; καλο ειναι. @@user-kr1us1mz3i
@giwrgoslos9343
@giwrgoslos9343 25 күн бұрын
@@user-kr1us1mz3i και εγω Ελληνας ειμαι .εχετε φτιαξει κωδικα για trading ?
@Jaybaas
@Jaybaas 3 ай бұрын
Thank you so much Nic! This is beautiful 👏🏾🙌🏾
@NicholasRenotte
@NicholasRenotte 3 ай бұрын
Yooooo! How you doing man?! Thank you so much!!
@SOUL_FULL_MENS1
@SOUL_FULL_MENS1 3 ай бұрын
Yeah I am doing good​@@NicholasRenotte
@JeDesi
@JeDesi 3 ай бұрын
Hi, Nicholas! Thank you very much for this tutorial. Got a question. How much time does it take to understand the particular topic, so that you can explain it so well? 30 minutes of coding, knowing exactly what to import, how to use and why, with brief and elegant explanation. I'm really impressed.
@NicholasRenotte
@NicholasRenotte 3 ай бұрын
Building the original code takes a few weeks depending on how big the project is. Understanding it and memorising how to put it together for a video took 3 days for this one.
@pedro-rodriguespt
@pedro-rodriguespt 3 ай бұрын
Hi Nicholas. Great Video. Is possible you build a python code for use XTB ? Trade is better for stocks, Crypto or Forex , or you can use for everything that you want ?
@jg643
@jg643 19 күн бұрын
Great video! Have you considered building a version of it in which it still implements the stop loss, but picks stocks at random instead of news and sentiment? In fact, it would be interesting to combine the two into one app and then see how one performs against the other. Similar to the experts against the darts
@himanshudash5512
@himanshudash5512 3 ай бұрын
you are amazing sir please make more programming videos on trading👌👌
@NicholasRenotte
@NicholasRenotte 3 ай бұрын
You got it!
@miguelzuniga
@miguelzuniga 3 ай бұрын
I've made my own trading algo as well, but i'm working on a different way.. by using an image classifier to look for specific graph patterns from a bunch of indicators while scalping at the min, plus news
@NicholasRenotte
@NicholasRenotte 3 ай бұрын
Ohhh man, I was like I wonder if I can get an image captioning model to classify a candlestick pattern as another strategy! How you going with your strat?
@miguelzuniga
@miguelzuniga 3 ай бұрын
@NicholasRenotte The strategy works on its own for forex ( 4 multi timeframe macd + ema ), but the pattern is easier to detect visually by looking at all of the indicators at the same time. I created an image classifier following your video and it works but I still have some false positives during the signal detection. I'm getting the indicator data from mql4/5 through zmq and python is plotting before sending it to the classifier. It takes about a day to have enough data to train the model. Your videos helped me a lot. Kudos on all the content you get out there.
@salockingaming6246
@salockingaming6246 3 ай бұрын
I’m doing something similar. I found a website that you can pay and get minute to minute quotes, right now I have about ten years of data from ten different stocks. Each has a year of basically minute to minute candles, I am experimenting with reinforcement learning
@ivohage
@ivohage 3 ай бұрын
How are you going with this? Does it work?
@salockingaming6246
@salockingaming6246 3 ай бұрын
@@miguelzuniga I’m trying basically the same thing but just looking at quote data instead of images, how much data did you use to train it on and for how long? After about 8 hours of training of the same year of AAPL stock mine wasn’t working.
@ga1205
@ga1205 3 ай бұрын
I think you should have used floor() vs. round() to set the quantity. round() may round up to the next integer if the decimal > .5. That should cause an error since it will cost more than what you wanted to risk. floor() rounds down.
@NicholasRenotte
@NicholasRenotte 3 ай бұрын
Yep I think you’re right! Good spot!
@TheKahunas2722000
@TheKahunas2722000 3 ай бұрын
Yes or use // operator i beleive that would do the same thing .
@mahdis-hs6bn
@mahdis-hs6bn 3 ай бұрын
Thanks for your wonderful video . Is it maybe possible to use some forecasting model inside the strategy and use it and the sentiment to open or close an order based on them ? and if so the forecasting model should be a single step model or a multi step ?
@NicholasRenotte
@NicholasRenotte 3 ай бұрын
Could defs bring forecasting into it, sometimes the simplest solutions are best but I could def try that!
@user-mv8xi6hx7u
@user-mv8xi6hx7u 2 ай бұрын
Great video and awesome idea! I think you can even publish some papers, Thank you❤
@Dillion-ls5gi
@Dillion-ls5gi 2 ай бұрын
Amazing video Nicholas, well im pretty much good with my earns with coach spencer
@Dillion-ls5gi
@Dillion-ls5gi 2 ай бұрын
reach him
@Dillion-ls5gi
@Dillion-ls5gi 2 ай бұрын
on his teleg ramm
@Dillion-ls5gi
@Dillion-ls5gi 2 ай бұрын
userr namee
@Dillion-ls5gi
@Dillion-ls5gi 2 ай бұрын
tradinghold 7
@balachandraalnethaji1548
@balachandraalnethaji1548 2 ай бұрын
a reliable lad with nice credentials
@mikesara7032
@mikesara7032 3 ай бұрын
You're a legend mate, thank you!
@NicholasRenotte
@NicholasRenotte 3 ай бұрын
Cheers man, thanks so much for checking it out! 🙏
@walt5507
@walt5507 3 ай бұрын
Thank you for the excellent code, Nicholas. May I ask you to add the Gemini platform API for a comparison please as I'm having trouble getting that to go using your code and I need some guidance?
@lianng1223
@lianng1223 27 күн бұрын
Great explainer video Nick🎉Does the GitHub files also include the stats server you show on the video to compare the Bot’s performance to SPY?
@coinboybit7281
@coinboybit7281 3 ай бұрын
Good stuff! Thank you very much Nick! Do you mind sharing you laptop specs as well as any recommendation on a decent laptop to run local llms? I’m looking to buy one to run local llms for coding and don’t really know much. Thanks a bunch again man!
@NicholasRenotte
@NicholasRenotte 3 ай бұрын
This video was run on my deep learning machine 2080 super and an AMD cpu with 32GB of RAM. But I originally developed it on my MacBook Pro M1 Max with 32 gb of RAM.
@maxpocock492
@maxpocock492 2 ай бұрын
HI Nicholas, great video, thanks so much for sharing! I have followed step by step and got the point where my bot is now up and running paper trading in alpaca - only thing is it's not really doing anything yet? is this normal or have i missed something?
@FootballFan4850
@FootballFan4850 3 ай бұрын
Love your videos! What about Video classification models?
@NicholasRenotte
@NicholasRenotte 3 ай бұрын
Hmmmm just realised I never did a deep video classification tutorial. On the list.
@MajjinBuu
@MajjinBuu 3 ай бұрын
Would try to create an interactive streamlit dashboard for this looks like a very cool POC Love your videos man❤
@NicholasRenotte
@NicholasRenotte 3 ай бұрын
Oh yeah, a little UI to manage it on top?
@seththunder2077
@seththunder2077 3 ай бұрын
@@NicholasRenotte Yes please continue this series. This is very underrated and having something like streamlit and a UI will be very helpful. Also, thanks for this video!!!!
@diegocaumont5677
@diegocaumont5677 3 ай бұрын
Nicholas BEEN putting out that consistent high quality content.
@NicholasRenotte
@NicholasRenotte 2 ай бұрын
DIEGO!! Thanks a mil!!
@willowkonrad8893
@willowkonrad8893 3 ай бұрын
Hi interesting video. A quick question for anyone who has the time. This is the first Ive heard about alpaca, For some reason I thought that it is a broker in the states. My question is, if someone builds a bot with this api, my take is, with not much effort the bot can be used to trade through mt4, mt5, ctrader, ninja trader and others, then it can be used with any broker that offers access using any of the mentioned trading platforms. If so that sounds more practical than learning a whole bunch of api's Did I get that rightly cheers, and thanks for sharing you code.
@rafael.gildin
@rafael.gildin 3 ай бұрын
Thanks for the effort ❤
@NicholasRenotte
@NicholasRenotte 3 ай бұрын
Thanks for checking it out!! 🙏
@keitasamba3259
@keitasamba3259 3 ай бұрын
Thank you so much for your video and for sharing your insights on Lumibot! Would it be possible for you to create a video explaining how to use an AI agent like Mistral to achieve similar results?
@NicholasRenotte
@NicholasRenotte 3 ай бұрын
Sure, I actually built it with Mixtral to begin with but it was a little slow and had to do a bunch of prompt engineering. Can share the code though.
@jameswhitaker4357
@jameswhitaker4357 2 ай бұрын
For Mac users, what do you recommend to run Python for projects like these? Cloud client or desktop? Which one?
@g.s.3389
@g.s.3389 3 ай бұрын
I think that the ML part can be extrapolated and run on all the stocks in last 5 days to find which are the stocks with positive sentiment and focus on them instead of the opposite. which is what traders do going to the news in the morning before starting to look at the markets....
@NicholasRenotte
@NicholasRenotte 3 ай бұрын
Oh so find stocks with positive sentiment and invest in those?
@g.s.3389
@g.s.3389 3 ай бұрын
@@NicholasRenotte could be an idea....
@carlosvelez3243
@carlosvelez3243 3 ай бұрын
So the ML component is for new sentiment? Can a reinforcement learning ML be used on previously closed bars to make the bot a bit more predictive, based on a indicator? For example, the bot looks at where the price is relative to the Kijun-Sen (Baseline) with a lookback period of 8. The bot would place a random trade of short or long, get rewarded for every increase of X amount, and get penalized for every decrease of X amount. There should also be a reward for closing a position, a second reward if closing made it money, and a penalty if it lost money. The goal of the bot is to figure out what is the likelihood that you would make money if you went long or short at this moment in time, with respect to where the price is to this indicator.
@NicholasRenotte
@NicholasRenotte 3 ай бұрын
Yep! Could definitely use RL for that it just takes a bunch of time to train, I did it in another video but never integrated it as fully as this.
@mvee3288
@mvee3288 Ай бұрын
@@NicholasRenottewhat video can is this in
@bradygallagher4449
@bradygallagher4449 Ай бұрын
Great video. I am a trader who has been licensed since 2015. I’ve only recently (since 2020) been playing with python. I decided to have a little fun and change the ticker to stocks, funds, and other indexes. Swings from outperformance of 34% CAGR from S&P400 and Nasdaq was negative $1B. With a b. My plan is to add in screening functionality to build a small basket of stocks and then let this loose. Thanks for doing the video.
@ethan9936
@ethan9936 Ай бұрын
Hey brady when u changed the ticker did the sheets titles change as well? I was trying to do QQQ or TSLA but it kept on giving me SPY as the title
@bradygallagher4449
@bradygallagher4449 Ай бұрын
@@ethan9936 it turned from what was downloaded from GitHub, then new files were created to support the functionality of what I envision. I added a screener that built basket portfolios prior to the backtest. I didn’t care if the title was still SPY since that is often the benchmark.
@randomcomputer7248
@randomcomputer7248 Ай бұрын
when trading you should be considering the Volume of the stock trading aswel as price. If a share drops or rises on small volume you might want to wait for beter volume to give a better signal.
@Nanas82
@Nanas82 3 ай бұрын
This is so exciting. Thank you. Noob's question : How is the tearsheet generated ? I didn't notie it in the code.
@tunahanada6116
@tunahanada6116 3 ай бұрын
He's back with a legendary project
@NicholasRenotte
@NicholasRenotte 3 ай бұрын
Thanks so much!!
@andreasbaros5528
@andreasbaros5528 3 ай бұрын
Great content thanks, much appreciated! How would you revise the code to trade simultaneously more than one etfs/stocks instead of just one like the SPY example? What am asking is how to adjust this code for a portfolio of several instruments instead of one ETF
@StrongOneYT
@StrongOneYT 2 ай бұрын
Thats what I am tryinbg to figure out
@gabrielarudoh9161
@gabrielarudoh9161 3 ай бұрын
great video, it explains alot. i will like if you could do a video analysis about Reef Chain
@g.s.3389
@g.s.3389 3 ай бұрын
question: why did you use pytorch and tokenizer to use the transformer when from tranformers you could just use pipeline?
@monirhosenmonirhosen8612
@monirhosenmonirhosen8612 3 ай бұрын
Now I understand there are more to learn in this trading each day, I hope it works for other of different stocks not just SPY
@MrElectrecity
@MrElectrecity 3 ай бұрын
❤❤Welcome back we miss you and your videos so much❤❤❤
@NicholasRenotte
@NicholasRenotte 3 ай бұрын
Ohh thank you so much!! I’m back, needed a little break to study up some stuff but I’m here!!
@micbab-vg2mu
@micbab-vg2mu 3 ай бұрын
Thank you for the great video:)
@NicholasRenotte
@NicholasRenotte 3 ай бұрын
Anytime, cheers for checking it out!!
@Ep314
@Ep314 2 ай бұрын
Could you make a follow up video on how to deploy/utilize this bot?
@investorscavern
@investorscavern 3 ай бұрын
Welcome back! All the way from South Africa!
@NicholasRenotte
@NicholasRenotte 3 ай бұрын
Ayyyy thanks so much!!
@ElisendaPliego
@ElisendaPliego 2 ай бұрын
Oriental blue tonic has become my daily reminder that self-care can be both indulgent and beneficial. It's a treat for both body and soul 🙏
@peralser
@peralser 3 ай бұрын
You are the Messi of the programmers!!! Thanks for building it and sharing it!!
@NicholasRenotte
@NicholasRenotte 3 ай бұрын
Ayyy thanks so much, if only my football was close as well 😅
@nelsonniedzielski
@nelsonniedzielski 3 ай бұрын
as everyone gets on the ai trading bot id expect the future of what causes volatility will change. I just dont see how the system functions with ai analysis. I'm curious if ai likes the way we have structured markets globally. That may have more long term implications for investment infrastructure then scripting some trades
@user-fu9cw5ey8s
@user-fu9cw5ey8s Ай бұрын
Wow your code is great, I love it❣❤
@vindictivepigeon2586
@vindictivepigeon2586 Күн бұрын
is it possible to write this to use multiple symbols within the same strategy? you would basically be just creating more strategies with different symbols/%cash @ risk then adding all your strategies to the traders and with the run_all function it would be operating with all the strategies you added?
@JuanRamirez-di9bl
@JuanRamirez-di9bl 3 ай бұрын
Haven't seen the video yet but looks like a lot of fun!!
@NicholasRenotte
@NicholasRenotte 3 ай бұрын
🙏 thank you Juan!!
@kevinspaeth5895
@kevinspaeth5895 3 ай бұрын
Thanks for the awesome video. I am having some problems with my authentication, but I have submitted a request into Alpaca to figure this out. I can not wait to run this on my paper account! Very cool. Thanks for putting this together! I would think that having the program allow an individual stock to be named at the start of running the program would be cool. Thoughts?
@NicholasRenotte
@NicholasRenotte 3 ай бұрын
Definitely! It’s easy enough to spin it up for other symbols. I think I might do another video with some other symbols/asset classes soon.
@hboivin2
@hboivin2 3 ай бұрын
Nice video and explanations. I am not able to install Trensflow on my computer; I receive an error. Do you have a video for Windows users?
@hichemmh6065
@hichemmh6065 3 ай бұрын
Excellent I have an idea, the next video demonstrating real-time violence detection using YOLOv8 or another advanced model. Explore its capabilities to enhance security and prevention in various scenarios. and thank you
@jfamjizzyjae
@jfamjizzyjae 3 ай бұрын
Great video Nicholas! I just subscribed to learn much more. Does this work for meme coins as well?
@NicholasRenotte
@NicholasRenotte 3 ай бұрын
Possibly, I’d need to test. I gave it a crack on BTCUSD and it looked promising but again that was only during back testing
@timmaggs4827
@timmaggs4827 3 ай бұрын
@@NicholasRenotte Thanks so much for this I'm struggling to get a backtest working for BTCUSD I understand the ticker for Yfinance is BTC-USD but still doesn't spend anything. I feel like I'm missing something really obvious
@mocabeentrill
@mocabeentrill 3 ай бұрын
You're incredible. Well done
@NicholasRenotte
@NicholasRenotte 3 ай бұрын
Thanks so much 🙏
@tvnkap4291
@tvnkap4291 2 ай бұрын
Very good video bro, can i use this code in MetaTrader 5?
@nicholassilva147
@nicholassilva147 2 ай бұрын
This is so much to try to understand for a noob
@jennypeon
@jennypeon 2 ай бұрын
What video of yours should I watch first as an absolute beginner? Do you have an order you recommend?
@coricabell6696
@coricabell6696 3 ай бұрын
Hi Nicholas, will your code work in Thinkorswim platform or what broker is compatible with your code?
@NicholasRenotte
@NicholasRenotte 3 ай бұрын
Looks like it works with these brokers: lumibot.lumiwealth.com/brokers.html
@zaytradellc
@zaytradellc 3 ай бұрын
Hey first day here subbed ❤ how can i use dmi indictor to act as the cot repoert in python
@cammycross6861
@cammycross6861 7 күн бұрын
do you have a video that explains coding for someone just starting
@mavicprah8063
@mavicprah8063 Ай бұрын
I will watch the video later, thanks a lot. Is this AI trading bot actually useful for making money or it´s just for learning purposes?.
@Fraunzi
@Fraunzi 3 ай бұрын
Please make more of these types of videos, so cool!
@NicholasRenotte
@NicholasRenotte 3 ай бұрын
Trading vids or AI vids or both?!
@OmarASDpouloulou
@OmarASDpouloulou 3 ай бұрын
@@NicholasRenotte BOTH Please !
@Fraunzi
@Fraunzi 3 ай бұрын
Trading vids please and btw your skills are unmatched, keep up the awesome work!@@NicholasRenotte
@kabbe1346
@kabbe1346 2 күн бұрын
what are u programming in?
@actorjohanmatsfredkarlsson2293
@actorjohanmatsfredkarlsson2293 3 ай бұрын
Hi there,. Great video. What version of alpaca_trade_api do you use, because the I use the alpaca-trade-api==0.26 and it doesn't seem to have the get_news method. Or am I missing something?
@user-uq8sv5mt3h
@user-uq8sv5mt3h 3 ай бұрын
Getting similar error
@rickytickytavee
@rickytickytavee 3 ай бұрын
Would you mind outlining the reasearch you did/resources you looked at to build this for those who want to start looking more into this type of stuff?
@fernandolourival6215
@fernandolourival6215 5 күн бұрын
Hi, I fell in love with your video, I thought it was really good, could you create an analysis script for IQ Optio?
@Dr_Girthly_Baggington
@Dr_Girthly_Baggington 3 ай бұрын
Respect to you son, i have wanted to do this for a long time but i dont have the skill in coding,. I will follow and copy you. If i become wealthy... I WILL send you a percentage... Thank you for your time and mind.
@NicholasRenotte
@NicholasRenotte 3 ай бұрын
Let me know how you go!! Looking forward to it 🙏
@Soonicx1
@Soonicx1 3 ай бұрын
How are you doing right now?
@Dr_Girthly_Baggington
@Dr_Girthly_Baggington 3 ай бұрын
bad news... I killed the system i built it on and had to format the partition lol and also sadly my mum has been ill, in hospital and all sorts so i have not had the time to re build. Now you have reminded me I will do it this evening if i can. I rally liked it before i killed it...@@Soonicx1
@Julian_Bristol
@Julian_Bristol Ай бұрын
I tried this. I have some issues with it. For one, it seems that it "makes trades" but it never actually does. So some of those trades that it says it does don't ever happen. But still it is displayed on the breakdown like it has. For instance look at March 11th, 2020. It says that a buy was placed that day but looking into the code, the sentiment ai is neutral so a trade never actually occurs. Why do you think this is? I tried to implement some fixes like checking the number of stocks we currently have purchased, and doing so, I found that it makes significantly less trades than it states. Nonetheless, this is a great build and when the sentiment ai part is used in conjunction with a more robust ai that is trained on the buying and selling trends, this could be a big deal
@leoraysung3417
@leoraysung3417 2 ай бұрын
is this possibkle to use in google collab? If not what environment are you using?
@_Mux_
@_Mux_ Ай бұрын
How would you go about the same set sup but for a synthetic index market that does not require news events
@khalidhusain723
@khalidhusain723 3 ай бұрын
hello nicholas !! I had been facing an issue while installing lumibot. Had been trying to resolve it since past three days but couldnt. Would you mind helping me out ?
@noobicorn_gamer
@noobicorn_gamer 3 ай бұрын
Man wish I dedicated my life in coding back when I was young seeing how much fun you have building this and that 😂 gonna admit mad jealous
@mocabeentrill
@mocabeentrill 3 ай бұрын
It's never late mate!
@NicholasRenotte
@NicholasRenotte 3 ай бұрын
What they said ^ but also….i am having a helluva time with it 😅. Stoked you’re enjoying it!!
@s_the_first
@s_the_first 3 ай бұрын
Start now. Python is easy-ish. JavaScript also.
@randyturner180
@randyturner180 2 ай бұрын
Why am I not seeing any graphs when I run it. It ran for almost 35 minutes and saw that it was moving my balance up and down but no graphs. Also how do we get it to update the paper trade account at Alpaca. Mine is still at 100,000.
@wasm79
@wasm79 3 ай бұрын
do you have a video explaining q,k and v in transformers and how they are derived?,
@smanqele
@smanqele 2 ай бұрын
I'm a developer myself, but I'll get my 14 year old to start with a project like this since he dreams of being BIG in active trading/investment. New sub here!
@schleepco
@schleepco 3 ай бұрын
im having issues with installing Lumibot. metadata is having issue generating. i've upgraded pip tools to no avail. im using python 3.12.1 on mac could it be a compatibility issue?
@aaribazfar9451
@aaribazfar9451 3 ай бұрын
How do i deploy it like irl, like it trades for me? On any specific trading websites?
@huydh
@huydh 3 ай бұрын
Interesting project! I appreciate you explaining it with diagrams too! ❤ Yet again, live coding doesn’t reflect the true problem solving process which should take much longer and with a lot more struggles😅 it’s a nice experience anyway
@NicholasRenotte
@NicholasRenotte 3 ай бұрын
I don’t know how I can package four weeks of crying over my keyboard into one video 😅 haha thanks a mil man, glad you enjoyed it!!
@kennydubroff7772
@kennydubroff7772 3 ай бұрын
@@NicholasRenottea picture is worth a thousand words. An imprint of QWERTY on one’s forehead explains any coding task
@NicholasRenotte
@NicholasRenotte 3 ай бұрын
@@kennydubroff7772 LOL mechanical keyboards are rough to sleep on
@kennydubroff7772
@kennydubroff7772 3 ай бұрын
@@NicholasRenotte also to repeatedly bang your head against
@TracySnell
@TracySnell 15 күн бұрын
@@NicholasRenotte Add a bonus 1000x timelapse clip!
I Tried Day Trading w/ a Trading Bot Algorithm
14:01
Daniel Inskeep
Рет қаралды 850 М.
Run your own AI (but private)
22:13
NetworkChuck
Рет қаралды 1 МЛН
ISSEI funny story😂😂😂Strange World | Pink with inoCat
00:36
ISSEI / いっせい
Рет қаралды 27 МЛН
Зу-зу Күлпәш.Курс (6 бөлім)
40:48
ASTANATV Movie
Рет қаралды 278 М.
Godzilla Attacks Brawl Stars!!!
00:39
Brawl Stars
Рет қаралды 10 МЛН
I used LLaMA 2 70B to rebuild GPT Banker...and its AMAZING (LLM RAG)
11:08
I Gave My Terrible Trading Bot $10,000 to Trade Stocks
16:05
Coding with Lewis
Рет қаралды 455 М.
I Built a Trading Bot to let Subscribers Trade $25,000 on Twitch
12:59
Don’t Build AI Products The Way Everyone Else Is Doing It
12:52
Steve (Builder.io)
Рет қаралды 335 М.
I Built a Trading Bot with ChatGPT
18:33
Siraj Raval
Рет қаралды 1,8 МЛН
How ChatGPT Built My App in Minutes 🤯
8:28
Website Learners
Рет қаралды 1,8 МЛН
How I Made AI Assistants Do My Work For Me: CrewAI
19:21
Maya Akim
Рет қаралды 654 М.
How I'd Learn AI (If I Had to Start Over)
15:04
Thu Vu data analytics
Рет қаралды 645 М.
How To Self Study AI FAST
12:54
Tina Huang
Рет қаралды 396 М.
3D printed Nintendo Switch Game Carousel
0:14
Bambu Lab
Рет қаралды 1,8 МЛН
#Shorts Good idea for testing to show.
0:17
RAIN Gadgets
Рет қаралды 3,5 МЛН
Google I/O 2024 - ИИ, Android 15 и новые Google Glass
22:47