Тёмный

Learn How to Code a Trading Bot in Python 

TradeOptionsWithMe
Подписаться 67 тыс.
Просмотров 25 тыс.
50% 1

Опубликовано:

 

29 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 71   
@TradeOptionsWithMe
@TradeOptionsWithMe 3 года назад
If you want to learn algorithmic trading, check out this free course that I created here on RU-vid: ru-vid.com/group/PLtqRgJ_TIq8Y6YG8G-ETIFW_36mvxMLad
@testchannel4695
@testchannel4695 3 года назад
Wow, let's see how efficient this would be. Thank you for putting all of this together!
@TradeOptionsWithMe
@TradeOptionsWithMe 3 года назад
You’re very welcome
@AuroBarcelo
@AuroBarcelo 3 года назад
Can un make a tutorial how to connect Quantconecct with Binance and make a spot bot?
@mateaandmilos
@mateaandmilos 3 года назад
Great work!
@TradeOptionsWithMe
@TradeOptionsWithMe 3 года назад
Thanks!
@guillaumelanglois4511
@guillaumelanglois4511 3 года назад
Great stuff!
@John-dw6jb
@John-dw6jb 3 года назад
Amazing, thank you. How long did it take you to get this good at coding? I have been coding for about 6-12 months and still struggle producing and algorithm such as this one on my own.
@TradeOptionsWithMe
@TradeOptionsWithMe 3 года назад
I have plenty of years of programming experience, but nonetheless I still can’t just write down an algorithm such as this one from scratch. I also have to constantly look up things in the documentation, forum, and other sites. To be able to write a trading algorithm on QuantConnect (or any other site) requires you to not only know the supported programming language (Python) but also the supported API. Learning this basically is like learning a new programming language. So don’t worry if you feel like you don’t understand too much at first. Just start with very basic stuff and work yourself up from there. If you haven’t already, I recommend going through QuantConnect’s boot camp since that gives you a good introduction to its API.
@John-dw6jb
@John-dw6jb 3 года назад
@@TradeOptionsWithMe Thank you so much. That's great advice! I look forward to seeing more QuantConnect videos from you.
@krishnarachh2613
@krishnarachh2613 3 года назад
Great one. But do they have database of Indian stocks?
@TradeOptionsWithMe
@TradeOptionsWithMe 3 года назад
Thanks for the comment. As far as I know, QuantConnect currently does not yet offer Indian stock data. If you have your own data, you might be able to make that work through Lean. They have made plans to add international markets such as India in the future. I can't tell you when this will be released but they will likely post an announcement when they do.
@krishnarachh2613
@krishnarachh2613 3 года назад
@@TradeOptionsWithMe Thankyou!!
@EctoMorpheus
@EctoMorpheus 3 года назад
It costs 30 dollars a month? That doesn't match with any of their subscription options. Is the $8 one not enough?
@TradeOptionsWithMe
@TradeOptionsWithMe 3 года назад
Thanks for the comment. You need the $8 research pack to get access to everything. For a live trading node, you need to pay an additional $20 a month (or less with a yearly subscription). So in total it costs $28 per month for a live trading node + the research pack (or less with a yearly subscription).
@EctoMorpheus
@EctoMorpheus 3 года назад
@@TradeOptionsWithMe alright, thanks for the clarification. I think that's kinda expensive if you're not immediately trading with upwards of $10k, but it is what it is
@eliasrouita310
@eliasrouita310 3 года назад
Runtime Error: AttributeError : 'FundamentalFactorAlphaModel' object has no attribute 'lastMonth' at Update in AlphaModel.py:line 19 :: if algorithm.Time.month == self.lastMonth: AttributeError : 'FundamentalFactorAlphaModel' object has no attribute 'lastMonth'
@TradeOptionsWithMe
@TradeOptionsWithMe 3 года назад
Thanks for the comment. I recommend just using the link in the description box to clone my code. That should definitely work without any problems.
@TradeOptionsWithMe
@TradeOptionsWithMe 3 года назад
Create your free QuantConnect account here: www.quantconnect.com/?ref=towm You can clone the code from this algorithm here: www.quantconnect.com/forum/discussion/10209/fundamental-investing-example-algorithm/p1?ref=towm
@Enoch_Root
@Enoch_Root 2 года назад
Hi, did they get rid of the module selection and algorithm builder functions? I cannot find them anywhere on QuantConnect, neither in the GUI nor any references in the supporting documents or the community..? How to access them?
@empowercode
@empowercode 3 года назад
Hey! I just found your channel and subscribed, love what you're doing! Particularly, I like how clear and detailed your explanations are as well as the depth of knowledge you have surrounding the topic! Since I run a tech education channel as well, I love to see fellow Content Creators sharing, educating, and inspiring a large global audience. I wish you the best of luck on your RU-vid Journey and can't wait to watch your next upload. Cheers, happy holidays, and keep up the great work :)
@conniec2000
@conniec2000 Месяц назад
With the downloaded code, if I examine the order, it is not executed once a months, the orders scattered many days of a month, why is that?
@anunchka9190
@anunchka9190 3 года назад
The code in this video, have you tested it by giving it small capital to work with and allowed it to work over the course of 1-3 weeks? If not, what would your predictions be based solely on the information in this video.
@TradeOptionsWithMe
@TradeOptionsWithMe 3 года назад
Thanks for your comment. I have not yet done that, but that’s something that you definitely should do before live trading an algorithm since paper trading is immune to backtesting mistakes/errors such as overfitting, look ahead bias etc. It’s hard to say how good this would perform, especially over such a short time-frame. But I certainly believe that it would be profitable over a long enough time frame.
@michaelnoel1306
@michaelnoel1306 3 года назад
Does anyone know a free place where you can test the algorithms using paper trading?
@TradeOptionsWithMe
@TradeOptionsWithMe 3 года назад
The problem is that paper trading requires your algorithm to be up and running at all times since it has to be able to react to new data on a constant basis. That’s why most firms charge for that. Theoretically, it’s possible to develop and host algorithms on your own machine. This, however, requires you to get the data from somewhere. Furthermore, you would have to leave it running while it paper trades.
@michaelnoel1306
@michaelnoel1306 3 года назад
@@TradeOptionsWithMe Is it possible for me to manually buy the stocks instead of having the algorithm do it for me. So I do not have to host it.
@TradeOptionsWithMe
@TradeOptionsWithMe 3 года назад
Sure, you can use your algorithm just for the signals. But that doesn’t solve the problem. For it to generate the signals, it still hast to be live.
@michaelnoel1306
@michaelnoel1306 3 года назад
Ok, thanks. If I buy the monthly subscription does it automatically renew.
@TradeOptionsWithMe
@TradeOptionsWithMe 3 года назад
Yes it does. You would have to cancel it manually for it to end.
@sammox7346
@sammox7346 3 года назад
Just discover this channel, awesome work guy and thanks for all your videos, that's exactly what I'm looking for 👍 the only thing is I have to adapt these knowledges to Futures , let's see what Will happen 🧐
@Blackhatmmike
@Blackhatmmike 3 года назад
thank you for the video. only starting out but I noticed that the algo is doing a lot of unexpected trading (avg 8 trades per day) selling/buying small quantities (mostly 1 share) . what could be the issue?
@TradeOptionsWithMe
@TradeOptionsWithMe 3 года назад
Probably because of the rebalancing that the portfolio construction model initiates.
@GuYuHei
@GuYuHei 3 года назад
The tutorial is amazing, but just wondering that I cannot find the Insight Portfolio model when I create the project. Do I need to pay for it or is it not available anymore?
@TradeOptionsWithMe
@TradeOptionsWithMe 3 года назад
Thanks for the comment. They recently changed the UI for the algorithm creation, they might’ve forgotten to add that portfolio model. But I don’t believe you need to pay to use it. You just have to copy the import statement and set the portfolio construction model. That should do the trick.
@anunchka9190
@anunchka9190 3 года назад
A question about the Universe Selection... From where do these stocks and symbols come from? Is it from all of NASDAQ and NYSE? There are some Universe Modules that can find securities from Technology Indexes, etc, so I was wondering what grouping of securities does this algorithm search its stocks to construct the Insight Weighted Portfolio Model? Edit: Because I would like to execute a similar, but modified framework on a certain industry, or index. A video on how to do this would be fantastic! Also would I be able to insert individual stocks to invest in along with the selected Universe?
@TradeOptionsWithMe
@TradeOptionsWithMe 3 года назад
Thanks for the question und suggestion. QuantConnect has data for pretty much all US stocks (close to 20000 symbols). For a full list and more details on this, I recommend checking out the documentation page here: www.quantconnect.com/docs/data-library/equity?ref=tow There are plenty of other universe selection models including a manual selection model. This manual universe selection model allows you to manually add whatever securities you want to. If you want to learn some more details about universe selection, you could check out the boot camp example algorithms on QC that give you an introduction to universe selection and QC in general. I hope this helps.
@aketo8082
@aketo8082 Год назад
Thank you, and happy new year. Is this also possible to programm that in PyCharm?
@jeepjr
@jeepjr 3 года назад
congratulations on the channel and video, I wanted your contact because I am wanting to set up a grid robot that will act according to RSI would have and have the function of dragging upwards?
@TradeOptionsWithMe
@TradeOptionsWithMe 3 года назад
Thanks for the comment. I recommend checking out my free algorithmic trading course playlist. The 6th video is coming this Friday and in it you will learn how to use indicators like RSI in QuantConnect.
@user-wr4yl7tx3w
@user-wr4yl7tx3w Год назад
do you have other videos on QuantConnect?
@TradeOptionsWithMe
@TradeOptionsWithMe Год назад
Yes, I have an entire free course that you can find on my channel: ru-vid.com/group/PLtqRgJ_TIq8Y6YG8G-ETIFW_36mvxMLad
@techzzz121
@techzzz121 3 года назад
Im a newbie in trading but i know a bit of coding so i guess i would try this
@bluejazzman
@bluejazzman 3 года назад
I followed along with you, but my backtest stops after 4 years. is this because I have the free account?
@TradeOptionsWithMe
@TradeOptionsWithMe 3 года назад
Thanks for the comment. They might have recently added a limit to free account backtesting. I am not sure though. Does it say anything when it stops?
@bluejazzman
@bluejazzman 3 года назад
@@TradeOptionsWithMe The only message I get is that the backtest is complete. Looking at the purchase page i see you get a second research node when you buy the researcher subscription so Im guessing that has something to do with it. Great videos bro - this is the best yt channel to actually learn about algo trading imo. Keep up the good work!
@TradeOptionsWithMe
@TradeOptionsWithMe 3 года назад
@@bluejazzman Thanks for the positive feedback. As I said, they might have added a backtest limit recently, but it should say so if that's the reason. You could try contacting QuantConnect support. But buying a research node likely isn't the solution. If you would have to buy something, you would have to upgrade your backtesting node from free to a premium one.
@toddmeyers4747
@toddmeyers4747 3 года назад
@bluejazzman @TradeOptionsWithMe I have the same problem. I clicked on the Logs tab and found this message near the bottom: "You have exceeded maximum number of orders (10000), for unlimited orders upgrade your account."
@asierlarruskain7206
@asierlarruskain7206 3 года назад
Do i have to pay in order to have access to the modules or they are free?
@TradeOptionsWithMe
@TradeOptionsWithMe 3 года назад
You can use them for free
@jdf2159
@jdf2159 2 года назад
Do you maybe have a Python source code for trendlines?
@eeropar3543
@eeropar3543 3 года назад
You said the QuantConnect price is 30 dollar per month. How come the cheapest one is 48 dollars per month?
@TradeOptionsWithMe
@TradeOptionsWithMe 3 года назад
A researcher seat + live trading node is $28 a month, but you’re right, there might be some additional costs if that’s all you want. I believe I’m currently paying $48 a month.
@eeropar3543
@eeropar3543 3 года назад
@@TradeOptionsWithMe Thanks Can you do a crypto trading bot. There's a great amount of demand for a video like that!
@TradeOptionsWithMe
@TradeOptionsWithMe 3 года назад
On my Todo-list.
@eeropar3543
@eeropar3543 3 года назад
@@TradeOptionsWithMe Awesome since bitcoin and ethereum are rising there is no better time to upload!
@MM_LoanOfficer
@MM_LoanOfficer 3 года назад
How are the returns coming along?
@TradeOptionsWithMe
@TradeOptionsWithMe 3 года назад
I have been paper trading this algorithm since the release of this video. So far it has accomplished a return of about 4%. But note that such a short time frame isn’t very significant, so these results don’t say too much. If you want to test it in a more detailed manner, you can just use the link in the description box to backtest it yourself.
@gradyhost4574
@gradyhost4574 3 года назад
LOVE YOUR VIDEOS!!!!
@TradeOptionsWithMe
@TradeOptionsWithMe 3 года назад
Thank You!
@drewwoo
@drewwoo 3 года назад
This content is so amazing man. Can’t thank you enough. Learn so much and so well done. Keep it up!!
@TradeOptionsWithMe
@TradeOptionsWithMe 3 года назад
Hi Drew, Thanks for the positive feedback. I am happy to see that you liked the video.
@a1b290
@a1b290 3 года назад
It appears that there is mistake in the code in the line "size_scores = self.Scores(added, [(lambda x: x.Fundamentals.MarketCap, False, 1)])"; i believe it ought to be size_scores = self.Scores(added, [(lambda x: x.Fundamentals.MarketCap, True, 1)]) as larger the marketcap the better the stock is deemed to be. Am I correct?
@TradeOptionsWithMe
@TradeOptionsWithMe 3 года назад
Better is very subjective. This strategy tries to exploit the so-called size effect which says that smaller cap stocks tend to outperform larger cap stocks. See the Quantpedia entry that I linked in the description box for more details.
@a1b290
@a1b290 3 года назад
@@TradeOptionsWithMe Thank you for the reply and the answer does make sense. One more question: when you construct the score, you multiply a rank (lower numerical value is better) with quality wt, size wt, and value wt. Now that seems to be incorrect to me. You should divide the rank with the weight to reflect your intent of giving more siginficant to quality and value ranks and lesser weight to size ranks. Agree?
@TradeOptionsWithMe
@TradeOptionsWithMe 3 года назад
@@a1b290 Glad it helped. No, the multiplication is what I want since that's the weighting I want to use.
Далее
Algorithmic Trading Using Python #2
10:04
Просмотров 109 тыс.
10 Algorithmic Trading Mistakes to Avoid!
14:32
Просмотров 63 тыс.
Офицер, я всё объясню
01:00
Просмотров 3,9 млн
КАК БОМЖУ ЗАРАБОТАТЬ НА ТАЧКУ
1:36:32
My 10 “Clean” Code Principles (Start These Now)
15:12
This Is Why Python Data Classes Are Awesome
22:19
Просмотров 807 тыс.
Why Independent Quants Don't Exist
10:14
Просмотров 80 тыс.
Have You Picked the Wrong AI Agent Framework?
13:10
Просмотров 69 тыс.
Resources to Start Coding Trading Algorithms
8:55
Просмотров 332 тыс.