I hope you are enjoying the series. You can clone the code from this video here: www.quantconnect.com/forum/discussion/11052/algorithmic-trading-video-series?ref=towm But note that coding along can lead to a better learning effect!
@urban23273 жыл бұрын
Very clearly explained! Waiting for more food!
@urban23273 жыл бұрын
Is it possible to access the Slice data in a purely time driven strategy made with Schedule.on(), (because OnData() method is not needed)?
@TradeOptionsWithMe3 жыл бұрын
Sorry for the late reply. Yes, that is possible. You can, for instance, access such a slice object through history requests. This will be covered in more detail in about the 6th video of this series.
@alexsolo91892 жыл бұрын
@@TradeOptionsWithMe hi i was thinking how can sell stock at certain percentage let's say 1% when the stock goes up by 1% than it's value when purchased , so how can I write code based on this situation i don't know much about it , will u assist me
@oozification Жыл бұрын
replicated the same code but it did not work with end date specification I had to remove end data method , do you know why it might be the case ?
@bipmix6 ай бұрын
it may please you to know that as a totally rank beginner at python and coding, i was abkle to follow this command by command and re-do the code, and it worked! i would also say to others who are watching this: take the tie to opy the code lines, item by item and learn the fundamentals before going on to other more complex issues because this video can be used as a fallback solutions when you run into problems. its really basic but a must. once you can plug in the data, yu are golden, great series!
@memecomic63057 ай бұрын
the quality of this series is insanly good. thanks a lot.
@PGhai8 ай бұрын
Hi, I am trying to follow with your video, noticed that most of the things has changed. do you have any latest video to follow on OR any resources to learn ?
@tr0wb3d3r5Ай бұрын
Managed to make it run with this code, still need to fix something because it's not closing positions but 90% there, I know it's related to how "price" is handled: from datetime import timedelta class EmotionalTanAlpaca(QCAlgorithm): def initialize(self): self.set_start_date(2020, 1, 1) self.set_end_date(2021, 1, 1) self.set_cash(100000) spy = self.add_equity("SPY", Resolution.DAILY) spy.set_data_normalization_mode(DataNormalizationMode.RAW) self.spy = spy.Symbol self.set_benchmark("SPY") self.set_brokerage_model(BrokerageName.INTERACTIVE_BROKERS_BROKERAGE, AccountType.MARGIN) self.entry_price = 0 self.period = timedelta(days=31) self.next_entry_time = self.time def on_data(self, data: Slice): if self.spy not in data.bars: return price = data.bars[self.spy].close if not self.portfolio.invested: if self.next_entry_time price: self.liquidate(self.spy) self.log("SELL SPY @" + str(price)) self.next_entry_time = self.time + self.period
@chadneiro90888 ай бұрын
Are there updated videos because the api has changed and the methods in this are no longer available in the framework.
@maximilianmuhlenberg41933 жыл бұрын
Thank you so much for this series! It really helps me a lot to become familair with the QC-Platform
@paragonpartners20582 жыл бұрын
Thanks, just followed along and typed up myself. This is a good Hello World introduction.
@KokeBeast233 жыл бұрын
I loved coding on my own alongside this video because I made mistakes I would have never noticed if I had just copied the code! Thanks for making it so easy to follow along with I had a question about being able to “sift through” different stocks in the market. Or will we always have to choose a specific one like SPY in this case? I’d love to see a video dealing with this. Thank you!
@TradeOptionsWithMe3 жыл бұрын
Yes, it’s also possible to create an algorithm with a dynamic universe of stocks or other securities. That will be covered later in the series. I plan on covering this in the 8th video.
@eh7141 Жыл бұрын
This is such quality content, Im baffled sir.
@wenceslasebe10033 жыл бұрын
thank you for such great content . at which pace are you going to add the new videos?
@TradeOptionsWithMe3 жыл бұрын
My plan is to upload one video every 1-2 weeks. But note that the future videos will likely include more coding and thus be longer than the first few videos. I’m doing the best I can.
@wenceslasebe10033 жыл бұрын
Thank you again . I’m just a bit enthousiactic about learning algo trading
@TradeOptionsWithMe3 жыл бұрын
Just uploaded the next part ;)
@ira95573 жыл бұрын
Hi, please, can you explain, what describes exposure? and what does is mean, if it is flat? Thank.
@TradeOptionsWithMe3 жыл бұрын
It means how much risk you’re exposed to. For example, if you buy 100 shares of AAPL for $100 each, your exposure would be 100*$100=$10000 since that’s what you could lose.
@ira95573 жыл бұрын
@@TradeOptionsWithMe and what does it mean if "Equity - Long Ratio" = 0,9696. (from Exposure Chart)?
@shanejackson20623 жыл бұрын
I've been having some issues with backtesting, even if I just copy your code from the QC forums. I keep getting an error saying that 'Python slice object has no attribute 'bars''. So the algorithm never identifies a price, and never executes any orders. The backtest chart is just a flat line. Seeing as this happens even with your code, is this an issue with the QC platform? I haven't completed enough of my bootcamp training to be allowed post to the forums there...
@GuyFawkes9113 жыл бұрын
great video. I am hoping for an options bot in the future. specifical selling vertical spreads would be nice
@TradeOptionsWithMe3 жыл бұрын
Options will be covered later in this series.
@windillvanniekerk2093 жыл бұрын
Can you make a video how to add Python on metatrader
@samuelmacintyre38202 жыл бұрын
Don't think you can. Metatrader has its own language (MQL4/5), with that said there is a library that allows you to access the Metatrader terminal from a Python application, but then you have to think about how to host your application/program. www.mql5.com/en/docs/integration/python_metatrader5
@mark17313 жыл бұрын
Do you know of any good lessons on KZbin for a beginner learning python?
@mohammedzakizaki1453 жыл бұрын
Hi Brilliant tutorial, Is just if the elif condition is not satisfied then you are locked with the initial investment, is that correct?
@unknownman52963 жыл бұрын
nice video man please make more
@33wunduentrance933 жыл бұрын
Hi Thank you! This is excellent and a lot easier to understand than the materials on Quantconnect. To follow the QCA Framework aren't you suppose to generate insights, create alpha and risk models? Will you share these in the next videos, and how often should we expect video updates?
@TradeOptionsWithMe3 жыл бұрын
I’ll try to upload once a week. What you’re describing is QuantConnect’s algorithm framework. We will explore this later in the series. But first understanding the fundamentals as well as classical algorithms is essential to fully understand the framework.
@MrAnders103 жыл бұрын
Hey. How many parts do you think this series will have?
@TradeOptionsWithMe3 жыл бұрын
Not sure, but there should definitely be more than enough content to create at least 20 videos. After covering all the main areas of the QC API, I’d like to end the series with plenty of example algorithm videos.
@kabuqq2 жыл бұрын
Is it possible to support subtitles? This is a bit difficult for non-native English speakers.
@boswer393 жыл бұрын
Hi ! Thank you for your video ! I have an issue : "self is not defined" and this error is linked to the line "if not self.Portfolio.Invested :". I tried to fix it thanks to advices from internet but it's still broken. Do you have an idea why I have such an error ? I copy past your code from this video.
@TradeOptionsWithMe3 жыл бұрын
Hi, thanks for the questions. It seems like you are trying to access a class property outside of a class. I guess something with your indentation is wrong. My recommendation would be to use the link in the description box to clone my code instead of copy pasting it. That should definitely work.
@boswer393 жыл бұрын
@@TradeOptionsWithMe Thank you very much, it's working well ! Let's go to the next video ;-)
@abhaykolapkar41373 жыл бұрын
can we use this platform and APIs for binary options trading? Can you make videos on binary options auto trading bots , how can it be created and deployed to real time broker
@TradeOptionsWithMe3 жыл бұрын
No, binary options aren’t supported by QuantConnect. But note that the vast majority of binary options offered by brokers aren’t legitimate investment products. I’d recommend staying away from binary options. For a more detailed breakdown as to why, check out this post: tradeoptionswithme.com/binary-options-review/
@afletch1173 жыл бұрын
Thanks for the series, great content! How does OnData handle data when your algo is subscribed to multiple symbols? Is it handed a dictionary argument?
@gregkendall35593 жыл бұрын
I think that is pretty much right. You can loop through "data" which contains what happen for that day (resolution daily). for i in data: print( "symbol : " , i.key) print("close : ", i.close) like that basically, but you use self.Log instead of print. Not sure if data is a dictionary or a list but it is iterable.
@TradeOptionsWithMe3 жыл бұрын
Yes, that’s right.
@afletch1173 жыл бұрын
@@gregkendall3559 @TradeOptionsWithMe Thank you for your reply. I tried the following code, with variations several times: def OnData(self, data): for i in data: print("close : ", i.close) Every time I got an error like this: Error: object has no attribute "close" at OnData print("close : " in main.py:line such and such Can you tell what is missing here?
@gregkendall35593 жыл бұрын
@@afletch117 you can get close amount this way: in OnData data[i.Key].Close or self.Securites[i.Key].Close
@jessojohn9226 Жыл бұрын
hi louis, one question if start date is jan 1,2020 is the value of close price on the on_data method from the previous date?
@JF-Gagné2 ай бұрын
hey ! nice, but unfortunately the whole syntaxe seems to have changed. So we can't code along
@SylvainThibault-dz5oe2 ай бұрын
Just went through it and coded along with no issue. Camelcase was changed to snake case.
@EssosinamKOMOU10 ай бұрын
Thank you for these videos
@happypotato46943 жыл бұрын
I didn't really get the "Self" in "OnData", what does it do/mean? I am sorry i am not an expert....
@philcREI3 жыл бұрын
Self is a reference to the class object you are in and is how classes in python work. He is using python classes to encapsulate all his code/ functions / methods.
@philcREI3 жыл бұрын
And his class extends some other class so he has all that classes methods he is basing his class on. So you have to know all about the class he is extending. Where those other methods came from, probably available in some webpage or api guide on quantconnect
@happypotato46943 жыл бұрын
@@philcREI oh i got it, thanks!
@ryankao19833 жыл бұрын
I read about dollar bar & volume bar in some financial machine learning books, and some people say it is better to use dollar bar because of it's statistical properties? would like to know if this is common in practice?
@TradeOptionsWithMe3 жыл бұрын
Thanks for the comment. Sadly, I can’t really comment on this without further context. What exactly do you mean by volume and dollar bars and in which context do you want to use them?
@farmingbyfaith42103 жыл бұрын
Great video. Is there a way to import data from a csv and use that as OHLC data? If not, is it possible to import the CSV as an extra filter mechanism to influence the trading logic?
@SOURABHAHUJA-r2k Жыл бұрын
Can someone please tell me why self.entryPrice is set to zero?
@TradingBuggy14 күн бұрын
To establish the subject (entryPrice) with a value so you can reference to it later in the code.
@cryptolicious37383 жыл бұрын
hi, i am really enjoying this series but why is the AI episode removed ? it was listed yesterday and i was going to watch it today
@TradeOptionsWithMe3 жыл бұрын
I did not remove any videos. Not sure which AI video you are referring to.
@cryptolicious37383 жыл бұрын
@@TradeOptionsWithMe i thought there was one towards the end using machine learning / ai ....?
@TradeOptionsWithMe3 жыл бұрын
@@cryptolicious3738 The series is not finished yet. That video has not been made yet. I'd estimate that so far around half of the series is done and I'm trying to upload a new video about every two weeks.
@cryptolicious37383 жыл бұрын
@@TradeOptionsWithMe fantastic ! very exciting ❤ , i really appreciate your effort helping me get these skills :)
@vanquoc81 Жыл бұрын
Hi Louis, a fellow trader, and computer science enthusiast here. Love the series. I finished (except for the Tiingo lesson) the Bootcamp on QuantConnect and just started with your course. I love the way how you edited the video with clearly illustrated examples. Makes it for visual learners a lot easier to grasp the concept. I just finished lesson 4 Handling data but came across something weird when running the backtest. There is a difference in the backtest result between my equity curve, max. profit, PSR, etc, and the one in your video. I used the exact code, but somehow it yield a different result. It makes me worried about the reliability of the backtest engine itself. Do you know where this is coming from? I was thinking maybe it has to do with the LEAN engine version of the current master branch. Hope you can shine some light. 😁
@williamratelband69183 жыл бұрын
So cool! Thanks a lot.
@mohamedtrfnx66323 жыл бұрын
Thank you so much for this series but try to talk slower and use simpler terms
@sheesh42103 жыл бұрын
If I Do SetHoldings("STOCK", 1.5) is the extra 50% considered margin? or does it glitch
@TradeOptionsWithMe3 жыл бұрын
Yes, that would be interpreted as a leveraged position
@peteortiz94813 жыл бұрын
Can someone explain how to set the entry time and exit time in beginner language please? Specifically the: self.nextEntryTime
@TradeOptionsWithMe3 жыл бұрын
I can try. The self.nextEntryTime variable simply saves a date and time. self.Time always is the most recent date and time. So the first line just checks whether the date saved in self.nextEntryTime is before the current time. If that’s the case, we want to start investing again. The second line sets the self.nextEntryTime variable to a date and time in 31 days from now (since self.period is 31 days). Doing this will guarantee that the condition in the first line will stay false for the next month which means that the bot won’t invest during that time. I hope this helps.
@user-wr4yl7tx3w Жыл бұрын
Little difficult to follow
@unknownman52963 жыл бұрын
please provide captions sir
@aeromaker_fpv11 күн бұрын
Quantconnect no longer woking, it wont allow you to create a project anymore.
@mauricioalfaro94063 жыл бұрын
Your accent, my friend...English subtitles please!!!!!!