Algorithmic Trading - Machine Learning & Quant Strategies Course with Python

In this comprehensive course on algorithmic trading, you will learn about three cutting-edge trading strategies to enhance your financial toolkit. In the first module, you'll explore the Unsupervised Learning Trading Strategy, utilizing S&P 500 stocks data to master features, indicators, and portfolio optimization.
Next, you'll leverage the power of social media with the Twitter Sentiment Investing Strategy, ranking NASDAQ stocks based on engagement and evaluating performance against the QQQ return. Lastly, the Intraday Strategy will introduce you to the GARCH model, combining it with technical indicators to capture both daily and intraday signals for potential lucrative positions.
✏️ Course developed by @lachone_
💻 Code and course resources: github.com/Luchkata/Algorithm...
🔗 You can sign up for the data API used here: intelligence.financialmodelin...
🔗 Learn more about Lachezar and Quantitative Trading with Python here: www.quantfactory.ai/p/become-...
⭐️ Contents ⭐️
0:00:00 - Algorithmic Trading & Machine Learning Fundamentals
0:15:25 - Building An Unsupervised Learning Trading Strategy
2:05:08 - Building A Twitter Sentiment Investing Strategy
2:28:08 - Building An Intraday Strategy Using GARCH Model
🎉 Thanks to our Champion and Sponsor supporters:
👾 davthecoder
👾 jedi-or-sith
👾 南宮千影
👾 Agustín Kussrow
👾 Nattira Maneerat
👾 Heather Wcislo
👾 Serhiy Kalinets
👾 Justin Hual
👾 Otis Morgan
👾 Oscar Rahnama
--
Learn to code for free and get a developer job: www.freecodecamp.org
Read hundreds of articles on programming: freecodecamp.org/news

Пікірлер: 231

  • @sanethehappypill
    @sanethehappypill3 ай бұрын

    One thing I like about trading, everyone has an opinion n yet few are making money 💵

  • @nobodyknows3560

    @nobodyknows3560

    Ай бұрын

    well there are some making money, else there won't be big hedge funds

  • @bokoaruka9819

    @bokoaruka9819

    Ай бұрын

    @@nobodyknows3560 the big hedge funds won't share their opinions clearly though, only vaguely

  • @xyzplusxyzis2xyz
    @xyzplusxyzis2xyz6 ай бұрын

    Your KMeans clustering is totally useless when you're not normalizing the RSI values. In essence all the other features are just small noise in the clustering and you end up making the wrong conclusion that RSI is the main feature driving the clustering in your data.

  • @vzinko

    @vzinko

    5 ай бұрын

    this is correct. upvoted

  • @Artificial_Eagle

    @Artificial_Eagle

    3 ай бұрын

    Yep, the clustering part was only to make the "algo" more appealing. I thought he would have actually analyze each cluster trying to find useful features...

  • @TyTy-gm8yb

    @TyTy-gm8yb

    2 ай бұрын

    This example is for intra-day and day-trading as specified at the beginning of the video. After a quick research the best indicator for this kind of trading is the RSi. Due to this the main feature chosen by him is the RSI because it is the best indicator for this kind of trading strategies.

  • @bobthebuilder9416

    @bobthebuilder9416

    2 ай бұрын

    Based comment

  • @nilomartinezjr4108

    @nilomartinezjr4108

    Ай бұрын

    @@TyTy-gm8yb RSI is not the best indicator. It shows basically what has already happened in the past. It is by no means usable in a forecast model. Should you want to have useful data you could try using Money Flow, or simple price action with Volume. Or if possible, you can create a model using real time agression.

  • @sweealamak628
    @sweealamak6286 ай бұрын

    This has been a privilege. I worked in finance for a long time but never had the chance to see what goes on behind the scenes at fund management. I was only exposed to traditional portfolio managers who's strategies were thematic in nature and qualitatively driven. I'll probably never use any of these techniques or strategies for personal finance but it really gets you thinking of how things can be approached from a large portfolio perspective. GARCH model is daunting but this inspires me to finally understand what my boss was talking about all those years ago 😅

  • @sweealamak628

    @sweealamak628

    6 ай бұрын

    Turns out I can't even get the arch package to work. After pip install arch, can't even import it in Jupyter NB. 🤷🏻‍♂️

  • @eoinmcnulty5363

    @eoinmcnulty5363

    5 ай бұрын

    GARCH is only daunting if you don't understand it.

  • @femifasusi453
    @femifasusi4536 ай бұрын

    Awesome 😎. I have been looking and waiting for this topic. Good job 👌❤️

  • @YouTuberTV-mc7wm
    @YouTuberTV-mc7wm3 ай бұрын

    I love your analysis, always on the point. And yes, Xeventy is a game changer. Great project!

  • @natel.1059
    @natel.10596 ай бұрын

    Thanks for sharing! For the 1st project, I wonder how the clustering is different from selecting top RSI stocks in each month given RSI is not normalized? Or is it just for demoing the possibility of using the clustering algo?

  • @munivoltarc
    @munivoltarc6 ай бұрын

    I am amazed to see algo videos rarely on KZread. I appreciate your work. Could you please make a similar kind of video on price action algo trading with Wyckoff multi-timeframe analysis, without using any indicators, and generate trades live through your machine learning or AI models? Many people are eagerly waiting to see these kinds of videos, but no one has ever made any price action trading videos. I request you to do so at the earliest. Thank you, Muni Babu

  • @flexorx

    @flexorx

    6 ай бұрын

    Are you sure successful quant funds really trade Wyckoff, or what's worth - Fibonacci retracements? 😅

  • @munivoltarc

    @munivoltarc

    6 ай бұрын

    @@flexorx what ever they do, price action plays right, that enough for us...😏

  • @ShadowMind312
    @ShadowMind3126 ай бұрын

    A fellow Bulgarian! Congratulations on your success, Lachezar!!

  • @lachone_

    @lachone_

    6 ай бұрын

    Thank you mate, cheers!

  • @jaimem1325

    @jaimem1325

    6 ай бұрын

    Bulgarians don't play around, you know you stopped caring what people think when you don't code in dark mode.

  • @sophiophile
    @sophiophile6 ай бұрын

    If you are concerned about stocks that fall out of tne S&P500 (survivorship bias), you could have just checked the top 150 against those that were always present in the S&P500 and then dropped those that werent from your dataset. (Or set some cut-off where it had to be present at least x% of the time)

  • @hammam92

    @hammam92

    Ай бұрын

    Can you explain more about this?

  • @Tiger-ep6hc
    @Tiger-ep6hc4 ай бұрын

    the .loc doesn't fix the error encountered at 51:30 with values starting from 2020. It is actually the rolling average calc parameter min_periods=12 that you set that fixes the issue...

  • @albertohernandezaldamiz-ec2020
    @albertohernandezaldamiz-ec20204 ай бұрын

    Really interesting video. Thanks there are still people with the goal to teach. While I continue with my learning I have bought two bots for ES and NQ just to see how they work and they are giving me nice extra money for the last months. This also gives me the conviction that the authomated strategies could really work fine.

  • @Ivelin
    @Ivelin6 ай бұрын

    Excellent video. Thank you!

  • @franciscogamarra10
    @franciscogamarra106 ай бұрын

    Hi, very good video and good job! But the daily signal volatility definition needs to be more conservative i.e. 1 std and not 1.5 std, due to the high CV of the signal ( to improve the results)

  • @classicmedia001
    @classicmedia0016 ай бұрын

    Can you clarify whether survivorship bias occurs when including data from a company that has gone bankrupt, or when excluding data from a company that has faced bankruptcy?

  • @dirty_haute
    @dirty_haute6 ай бұрын

    It's not about beating the market, its about having an unsolvable problem that you can always use to learn against.

  • @over1498

    @over1498

    4 ай бұрын

    Lol. It's about beating the market.

  • @richardsifeanyi6766
    @richardsifeanyi67666 ай бұрын

    Thanks for this. I've been looking forward to it. 🙏

  • @lukhanyovictor

    @lukhanyovictor

    5 ай бұрын

    Are u a computer scientist?

  • @johnsmith-qc8ud
    @johnsmith-qc8ud5 ай бұрын

    Great video! Unfortunately normalization procedure in it introduces lookahead bias. You can't use the full range of values to calculate mean and stdev, you can only use the data from earlier dates at any given point of time.

  • @loganbishop4619

    @loganbishop4619

    4 ай бұрын

    He collapses it to the end of the month. The number your swing consist of days before

  • @argu2026
    @argu20266 ай бұрын

    Thank you! Exactly what I've been looking for :3

  • @lukhanyovictor

    @lukhanyovictor

    5 ай бұрын

    Are u a computer scientist?

  • @Zlatanov688
    @Zlatanov6886 ай бұрын

    Thank you for this treasure! Just bought your other course. Can’t wait to finish it🎉

  • @DesignMitho
    @DesignMitho6 ай бұрын

    Thank you, I was looking for it!

  • @lukhanyovictor

    @lukhanyovictor

    5 ай бұрын

    Good day , I would like to work with you on FOREX trading strategies

  • @Techify09
    @Techify096 ай бұрын

    Really good video iam curious can we apply this algoritmic trading to Forex markets?

  • @tabotcharlesbessong3756
    @tabotcharlesbessong37564 ай бұрын

    Thank you so much for this Free Code Camp

  • @tabotcharlesbessong3756

    @tabotcharlesbessong3756

    4 ай бұрын

    Please 🙏 🥺 do same for real estate

  • @jameswhand
    @jameswhand6 ай бұрын

    Pretty cool! Thanks a lot!😁

  • @classicmedia001
    @classicmedia0016 ай бұрын

    Please could you recommend books on algorithmic trading with python or machine learning???

  • @classicmedia001
    @classicmedia0016 ай бұрын

    does yfinance has survivorship -bias free data?

  • @TheAsselmeier
    @TheAsselmeier5 ай бұрын

    A good future use case might be the production, storage, use and trade of electricity in a household. Solar panels are so cheap, electricity is quite expensive/ volatile due to renewables at times. Electrification/ automatisation of households, variable prizes from providers, self production (photovoltaic cells), storage (e-cars, warm water, iot, refurbished battery cells,...), weather forecast,...

  • @natel.1059
    @natel.10595 ай бұрын

    Thanks for sharing the video. Can anyone help me understand the daily signal part in the GARCH modeling? Is the belief that the higher predicted return volatility leads to a higher projected return? Doesn't higher volatility mean higher risk?

  • @natel.1059

    @natel.1059

    5 ай бұрын

    NVM, the logic is reversed in the later code

  • @ml11566
    @ml115662 ай бұрын

    8:08 Workflow Process: 1. Collect and prepare the data, 2. Develop a hypothesis for a strategy, 3. Coding the model, 4. Backtest the strategy 9:19 Unsupervised Learning Project- uses ML strats without a labeled or predefined target variable. Unlike supervised learning because the model is not trained to make predictions, but to extract insights from data 12:45 Sentiment Investing Project - how people feel about stocks can impact stock prices/industries/overall market 14:04 Intraday Strategy Project- intraday approach means to buy/sell financial assets in same trady day to profit from short term price movements. Traders use real time data and risk management to make quick decisions and capitalize on market volatility 2:10:51

  • @PATRADER555
    @PATRADER5553 ай бұрын

    Is quant for only stocks ? I haven't come across the major currencies.

  • @user-hn4dw8qt6c
    @user-hn4dw8qt6c2 ай бұрын

    Tested with data until today (feb-22-2024) and a 1:18:00 there were different clusters 3, on dec-31 there was a cluster with rsi = 80 and other where the top rsi was around 60

  • @leander79416
    @leander79416Ай бұрын

    spectacular free content - thank you SO much

  • @user-ey2qe2qv4s
    @user-ey2qe2qv4s3 ай бұрын

    How to get the current twitter sentiment data for real time trading?

  • @ashutoshshukla2325
    @ashutoshshukla23255 ай бұрын

    I think that you will win " The Python One Liner Award" !

  • @scarbz
    @scarbz6 ай бұрын

    Perfect for my Quant journey

  • @brianoconner8405

    @brianoconner8405

    4 ай бұрын

    Are you following quant?

  • @rantg

    @rantg

    3 ай бұрын

    your quant journy will end soon when you realize it is just not possible, at all, you live in a dream if you think it is. There are just a small number of large organizations who can do this efficiently, it requires much more than a laptop.

  • @joemaruhhh
    @joemaruhhh17 күн бұрын

    Very valuable information, thanks for your work!

  • @leJ226
    @leJ2266 ай бұрын

    Thanks 🎉

  • @yawvoon2941
    @yawvoon29416 ай бұрын

    Thanks!

  • @parththakkar2067
    @parththakkar20676 ай бұрын

    Can you make for nse(india) trading. Because there is lot of freelancing job opportunity, but I can't find any good material or course to learn the algorithmic trading specifically for nse.

  • @manjeshsumukh2844

    @manjeshsumukh2844

    6 ай бұрын

    Is there trading based freelancing in India?

  • @ashutoshshukla2325

    @ashutoshshukla2325

    6 ай бұрын

    I think he means portfolio management.

  • @tushartiwari7929

    @tushartiwari7929

    4 ай бұрын

    Don't bother with Indian clients on freelancing website for trading. They suck your time and not worth it. And trading on nse is no different than any other market if you get the fundamentals right.

  • @coldbrewed8308
    @coldbrewed83084 ай бұрын

    How do we generate the twitter sentiment dataset by ourself?

  • @juergenx298
    @juergenx2985 ай бұрын

    Very good content!

  • @lucassanchez5939
    @lucassanchez59392 ай бұрын

    MIL GRACIAS POR LOS SUBTÍTULOS EN ESPAÑOL❤❤❤❤❤

  • @sabernajar5401
    @sabernajar54012 ай бұрын

    Hello thanks a lot for this tutorial, is there any way to download the code please ?

  • @pianoguyswe
    @pianoguyswe6 ай бұрын

    Well, good luck making this profitable.... 😄There are exactly zero profitable strategies out in the open like this, for the simple reason that everyone who actually comes up with something profitable will keep is to themselves so as not to lose their edge on the market.

  • @sportingmeme3606
    @sportingmeme36066 ай бұрын

    This algorithmic trading can be applied to any liquid traded financial market like forex,stocks,and crypto , right?

  • @WolfAssassin75

    @WolfAssassin75

    5 ай бұрын

    yes

  • @lukhanyovictor

    @lukhanyovictor

    5 ай бұрын

    Good day , I would like to work with you on FOREX trading strategies

  • @namanmadan5994
    @namanmadan59944 ай бұрын

    little confused if you took stocks with RSI around 70 of the previous month what was the logic to use a lot of features

  • @ennuiofpolicy

    @ennuiofpolicy

    2 ай бұрын

    I am on the same page with you. Have you got any response regarding that?

  • @passaroquetemasanaovoa
    @passaroquetemasanaovoa6 ай бұрын

    Nobody knows what's going to happen in the stock market. The tech stack is interesting though.

  • @kitchiu4743
    @kitchiu47432 ай бұрын

    Now the code doesn't work!!!

  • @anatolyalekseev101
    @anatolyalekseev1013 ай бұрын

    Doesn't it bother anyone that clustering is done on the ENTIRE dataset? and further asset selection is done month by month using cluster label that was computed using future data?

  • @yzqq748
    @yzqq7485 ай бұрын

    For number 2, an error says "AttributeError: 'NoneType' object has no attribute 'iloc'". What shoud I do with this?

  • @Dcborge

    @Dcborge

    Ай бұрын

    I am getting the same error and cannot find a workaround.

  • @user-oz5dc7xw4v
    @user-oz5dc7xw4v6 ай бұрын

    Great tutorial. Stuck on macd function though. Doesn't seem to work as is.def compute_macd(close): macd = pandas_ta.macd(close=close, length=20).iloc[:,0] return macd.sub(macd.mean()).div(macd.std())

  • @lukhanyovictor

    @lukhanyovictor

    5 ай бұрын

    Good day , I would like to work with you on FOREX trading strategies

  • @DiegoAbal

    @DiegoAbal

    Ай бұрын

    same error

  • @kundansonawane849
    @kundansonawane8496 ай бұрын

    Thanks ❤

  • @darkstorm2653
    @darkstorm26533 ай бұрын

    Do you build trading bots for fee?

  • @mohamedaityoussef9965
    @mohamedaityoussef99656 ай бұрын

    Youve went from coding to trading lol, tganks for everything

  • @suraj.panddey
    @suraj.panddey4 ай бұрын

    The api 'Sandbox api' you used in your previous video has stopped working.Any fix for this ?

  • @sajadghamari4748
    @sajadghamari47484 ай бұрын

    23:50 I guess ln is different from log in math which you used it in place of it.

  • @NoDepositBonusForexToday
    @NoDepositBonusForexTodayАй бұрын

    Thank you!

  • @sophiophile
    @sophiophile6 ай бұрын

    1:34:23 Why do you take the log of the returns?

  • @christianc8265

    @christianc8265

    3 ай бұрын

    usually the log returns supposed to follow a normal distribution more closely. well it still doesn't. you would need tick data and use volume instead of time to get really close to a normal distribution.

  • @noneofyourbusiness8625
    @noneofyourbusiness86256 ай бұрын

    I love this so much ahahaha lets go!!!

  • @gibran.a.d
    @gibran.a.d6 ай бұрын

    supperrrbzz...amazing..

  • @VictorsTravelvLog
    @VictorsTravelvLog12 күн бұрын

    i am confused. so you use kmeans clustering to select stocks. then you use 1 year of stock prices and efficient frontier to calculate weight of component stocks. you use 18 features to fit a regression model to get the beta coefficients, which basically tells you the weights of the features on each stock. however, you never use the regression model to make predictions. you only use the betas for clustering? so your 'model' does not have forecasting ability? or does it? and where is the bollinger bands and macd used?

  • @gawincheung317
    @gawincheung317Ай бұрын

    got an error on Calculate Rolling Factor Betas (58:04) . error message indicate : min_nobs must be larger than the number of regressors in the model and less than window. May i ask how can i resolve it ?

  • @VinayakGNair
    @VinayakGNairАй бұрын

    Is there any tutorial available which can reach how to get real-time data offered by brokers and place trade using api provided by broker. All these are in jupyter notebooks. I'm looking for something in real code which can run continuously

  • @user-gl9tr6eq7e
    @user-gl9tr6eq7e6 ай бұрын

    I'm a former quant. Back in my days we used to write all the algorithms ourselves on c++, including the Greeks to price options, multidimensional volatility surface(48) calculations per trad, etc.. Now days being a "data scientist" and a "quant" its about being just popular on social media.

  • @thenoblegod

    @thenoblegod

    5 ай бұрын

    Hey,since you are a former quant ,I found it really intriguing .I'm currently working on a script for currency analysis and since I'm relatively new to the quant world , I'd love to connect and chat about it .Maybe we could share some insights and experiences .Let me know if you're open to it. Cheers!

  • @GoodaJayz

    @GoodaJayz

    5 ай бұрын

    @@thenoblegodplease let me know when he messages you

  • @sophiophile
    @sophiophile6 ай бұрын

    2:27:59 LOL, the twitter sentiment trading strategy was killing it right up until Elon Musk bought twitter. Hahah

  • @sahoodsd
    @sahoodsd3 ай бұрын

    does anyone else having error in the part where calculating rolling five year average of dollar_volumn and reassigning to the dollar_volumn column which converts every values to Nan code:- data['dollar_volume'] = data['dollar_volume'].unstack('Ticker').rolling(5*12).mean().stack()

  • @JuanYoga
    @JuanYoga27 күн бұрын

    01:04:25 "From this point on things can get really complicated." So, the previous hour was just the warm-up? *gulps nervously*

  • @thetatso9462
    @thetatso94624 ай бұрын

    thanks mate you are a champ

  • @alpserbetli6219
    @alpserbetli621919 күн бұрын

    how did you obtain the sentiment data sir ?

  • @MrAless77m
    @MrAless77m3 ай бұрын

    In the Project 1 in the point 6 when clustering, there is an error alert saying that: KeyError: "['cluster'] not found in axis" - Any advice? thanks

  • @philipp2117

    @philipp2117

    3 ай бұрын

    I had the same , think the variable is not set and you need to drop it as its set only later if "cluster" in data.columns: data = data.drop('cluster', axis=1)

  • @MrAless77m

    @MrAless77m

    3 ай бұрын

    @@philipp2117 Here you go: from sklearn.cluster import KMeans if 'cluster' in data.columns: data = data.drop('cluster', axis=1) def get_clusters(df): df['cluster'] = KMeans(n_clusters=4, random_state=42, init=initial_centroids).fit(df).labels_ return df data = data.dropna().groupby('date', group_keys=False).apply(get_clusters) data

  • @justchris846
    @justchris8466 ай бұрын

    I’m so glad I have a day job!

  • @wrawlings146
    @wrawlings1462 ай бұрын

    Is any one else getting "None of ['index'] are in the columns" error about 1:57:00 when calculating wights?

  • @hammam92

    @hammam92

    29 күн бұрын

    change 'index' to "Ticker".

  • @pranavsingh1947

    @pranavsingh1947

    24 күн бұрын

    @@hammam92 pls tell where

  • @hammam92

    @hammam92

    24 күн бұрын

    @@pranavsingh1947 bro give me the code that gives the error.

  • @jagjeetchauhan9456
    @jagjeetchauhan94566 ай бұрын

    I am getting error in this line df.unstack('ticker')['dollar_volume'].resample('M') can anyone tell me how to solve this error?

  • @davidvandenbussche7361

    @davidvandenbussche7361

    6 ай бұрын

    same here, how did you solve it?

  • @Elnur.Zarabi

    @Elnur.Zarabi

    6 ай бұрын

    last_cols = [c for c in df.columns.unique(0) if c not in ['dollar_volume', 'volume', 'open', 'high', 'low', 'close']] # data = (pd.concat([df.unstack('ticker')['dollar_volume'].resample('M').mean().stack('ticker').to_frame('dollar_volume'), # df.unstack()[last_cols].resample('M').last().stack('ticker')], # axis=1)).dropna() #df.unstack(['ticker','date'])['dollar_volume'].reset_index('date').set_index('date').resample('M').mean() data = (pd.concat([df.unstack(['ticker'])['dollar_volume'].reset_index('date').set_index('date').resample('M').mean().stack('ticker').to_frame('dollar_volume'), df.unstack()[last_cols].reset_index('date').set_index('date').resample('M').last().stack('ticker')], axis=1)).dropna() data

  • @chaitanyasharma2385
    @chaitanyasharma23856 ай бұрын

    Is anyone else having trouble with the following line of code: df['bb_low'] = df.groupby(level=1)['adj close'].transform(lambda x: pandas_ta.bbands(close=np.log1p(x), length=20).iloc[:,0]) Apparently, pandas.tt_bands() returns none, but that doesn't seem to be the case in the video

  • @oneouthere

    @oneouthere

    6 ай бұрын

    If you are pulling current price data, VLTO does not have enough price history. Try removing it from the symbols_list and see if that fixes the issue.

  • @alfredozuloaga8326

    @alfredozuloaga8326

    6 ай бұрын

    I have same issue, complety stop.

  • @ohsd186

    @ohsd186

    6 ай бұрын

    same issue!

  • @ohsd186

    @ohsd186

    6 ай бұрын

    I changed 'length 20' to 'length 10'. Like this: df['bb_low'] = df.groupby(level=1)['adj close'].transform(lambda x: pandas_ta.bbands(close=np.log1p(x), length=10).iloc[:,0]). It worked, but I don't know why.

  • @AlanJereb

    @AlanJereb

    6 ай бұрын

    @@oneouthere this is the correct answer.

  • @janoskovacs3237
    @janoskovacs32374 ай бұрын

    First 2 hours was ok, mainly about getting some basics about panda, and some clustering idea, though what I miss that if I understand correctly re-balancing/weigthing happens on montly basis, which at 150 security (worst case) it takes big amount of money as most of trading platform has minimum fees, as a consequences probably your extra strategy profit would be eaten by cost. It was fun, but I have doubts that's the way to get rich :)

  • @Maximus18.6
    @Maximus18.6Ай бұрын

    Such an amazing video an content. You are magic, this content opens the door to explore different quantum trading strategies assited with artificial intelligence. For those who put destructive opinions , please fck yourselves and criticised when you contribute something. This is an awesome approach for beginners in the algorithm trading and machine learning field. This is the main stone for my project to develop an algorithmic trading strategy using quantitative methods, machine learning and artificial intelligence to create profitable long ansd short entry positions

  • @FX-Avatar
    @FX-Avatar26 күн бұрын

    How much Profit did You do with this ? Thanks for the Info!

  • @TheAISmarthub
    @TheAISmarthub6 ай бұрын

    I have trading model that’s proven and I’ve broken down. Would there be anyone with quant experience willing to take my parameters and incorporate into a systematic trading algorithm?

  • @user-el3lk1jj4j
    @user-el3lk1jj4jАй бұрын

    how do i install the anaconda prompt? i have python and vscode on my computer. thank you

  • @DalazG
    @DalazG3 ай бұрын

    Is this transferable to forex trading?

  • @epictetus__
    @epictetus__6 ай бұрын

    Bookmark: 15:00

  • @ThayHa-wg9si
    @ThayHa-wg9si3 ай бұрын

    Don't miss the chance to be part of the Xeventy presale guys! Easy 50x till the end of the year, and I´m a very conservative

  • @pedrokotii2417
    @pedrokotii24176 ай бұрын

    Nice!

  • @mohngumba3079
    @mohngumba30794 ай бұрын

    Could somebody please help out i have an issue with the chapter 3 starting from timestamp 34:02 saying a TypeError and after that the whole chapter doesn't work its affected the other chapters also

  • @mohngumba3079

    @mohngumba3079

    4 ай бұрын

    TypeError: Only valid with DatetimeIndex, TimedeltaIndex or PeriodIndex, but got an instance of 'Index' this is what i get i even copied the code from the github but still gives me this problem. Could i get some help

  • @MGh-fb4bt
    @MGh-fb4bt6 ай бұрын

    I got an error in the following line of code: Code: df.unstack()[last_cols].resample('M').last().stack('ticker') Error: KeyError: 'Level ticker not found' Anybody can help?

  • @Elnur.Zarabi

    @Elnur.Zarabi

    6 ай бұрын

    this is what I could make of it: last_cols = [c for c in df.columns.unique(0) if c not in ['dollar_volume', 'volume', 'open', 'high', 'low', 'close']] # data = (pd.concat([df.unstack('ticker')['dollar_volume'].resample('M').mean().stack('ticker').to_frame('dollar_volume'), # df.unstack()[last_cols].resample('M').last().stack('ticker')], # axis=1)).dropna() #df.unstack(['ticker','date'])['dollar_volume'].reset_index('date').set_index('date').resample('M').mean() data = (pd.concat([df.unstack(['ticker'])['dollar_volume'].reset_index('date').set_index('date').resample('M').mean().stack('ticker').to_frame('dollar_volume'), df.unstack()[last_cols].reset_index('date').set_index('date').resample('M').last().stack('ticker')], axis=1)).dropna() data

  • @epo295
    @epo2956 ай бұрын

    this thing is for students of python code. Not traders. But good video non the less

  • @KV45355
    @KV45355Ай бұрын

    how do you present something like this in a portfolio?

  • @vintage2069
    @vintage20696 ай бұрын

    Anyone else running into issues trying to install the pip packages or is it just me? Any solutions?

  • @DavidRoyPennCollazos
    @DavidRoyPennCollazos22 сағат бұрын

    I have come across an error normalising the MacD indicator "TypeError: unsupported operand type(s) for -: 'float' and 'NoneType' During handling of the above exception, another exception occurred: TypeError Traceback (most recent call last) /usr/local/lib/python3.10/dist-packages/pandas/core/computation/expressions.py in _evaluate_standard(op, op_str, a, b) 68 if _TEST_MODE: 69 _store_test_result(False) ---> 70 return op(a, b) 71 72 TypeError: unsupported operand type(s) for -: 'float' and 'NoneType'" Have followed the steps up until this point to the t, and have rewritten it to make sure. Have consulted GPT to see, what the issue is, but I have yet to find a way around it. It's suggestions resulted with a dataframe filled with all MacD values as NaN. Will continue to work towards a solution - thought I 'd post this here in the meantime.

  • @kumkan3588
    @kumkan35886 ай бұрын

    More Algo videos please

  • @Experimento0001
    @Experimento00016 ай бұрын

    I'm getting this error in the concatenation part: last_cols = [c for c in df.columns.unique(0) if c not in ['dollar_volume', 'volume', 'open', 'high', 'low', 'close']] data = (pd.concat([df.unstack('ticker')['dollar_volume'].resample('M').mean().stack('ticker').to_frame('dollar_volume'), df.unstack()[last_cols].resample('M').last().stack('ticker')], axis=1)).dropna() data TypeError: Only valid with DatetimeIndex, TimedeltaIndex or PeriodIndex, but got an instance of 'Index'

  • @davidvandenbussche7361

    @davidvandenbussche7361

    6 ай бұрын

    same here, have you solved it?

  • @madhurshinde4988

    @madhurshinde4988

    6 ай бұрын

    same error, did you get the solution?

  • @davidvandenbussche7361

    @davidvandenbussche7361

    6 ай бұрын

    @@madhurshinde4988 So far I did the following: last_cols = [c for c in df.columns.unique(0) if c not in ['dollar_volume', 'volume', 'open', 'high', 'low', 'close']] test = df.unstack('ticker')['dollar_volume'] test.index = pd.to_datetime(test.index) test2 = df.unstack()[last_cols] test2.index = pd.to_datetime(test2.index) data = (pd.concat([test.resample('M').mean().stack('ticker').to_frame('dollar_volume'), test2.resample('M').last().stack('ticker')], axis=1)).dropna() data be aware however that this method drops certain stocks in my case thus I have an empty dataframe after a few transformations and can't continue, I believe it's because if any of the tickers don't have data for the entire period of time covered by the DataFrame, they will be dropped during the resampling process.

  • @Elnur.Zarabi

    @Elnur.Zarabi

    6 ай бұрын

    same problem

  • @Elnur.Zarabi

    @Elnur.Zarabi

    6 ай бұрын

    last_cols = [c for c in df.columns.unique(0) if c not in ['dollar_volume', 'volume', 'open', 'high', 'low', 'close']] # data = (pd.concat([df.unstack('ticker')['dollar_volume'].resample('M').mean().stack('ticker').to_frame('dollar_volume'), # df.unstack()[last_cols].resample('M').last().stack('ticker')], # axis=1)).dropna() #df.unstack(['ticker','date'])['dollar_volume'].reset_index('date').set_index('date').resample('M').mean() data = (pd.concat([df.unstack(['ticker'])['dollar_volume'].reset_index('date').set_index('date').resample('M').mean().stack('ticker').to_frame('dollar_volume'), df.unstack()[last_cols].reset_index('date').set_index('date').resample('M').last().stack('ticker')], axis=1)).dropna() data

  • @tejasgala5092
    @tejasgala509225 күн бұрын

    I'm getting an "'NoneType' object has no attribute 'iloc'" error here @27:02 for bollinger bands and cant seem to find the solution: df['bb_low'] = df.groupby(level=1)['adj close'].transform(lambda x: pandas_ta.bbands(close=np.log1p(x), length=20).iloc[:,0]) can someone please help?

  • @VictorsTravelvLog

    @VictorsTravelvLog

    12 күн бұрын

    your ta.bbands did not return a dataframe. nontype means it's not a dataframe. do ta.bbands on df.xs('AAPL',level=1)['adj close' ] to see if you get a dataframe. maybe you stack it the wrong way?

  • @natnaelabayneh7664
    @natnaelabayneh76646 ай бұрын

    4 hours into the course already, such a great mentor and way of teaching

  • @harikrishan2641

    @harikrishan2641

    6 ай бұрын

    But the Total Video length as shown above is 2:59 hrs only

  • @reho5081

    @reho5081

    6 ай бұрын

    Where is the additional hours from?

  • @weddou100

    @weddou100

    6 ай бұрын

    bro is lying

  • @thamsanqamafuna2398

    @thamsanqamafuna2398

    6 ай бұрын

    Very Funny.

  • @PavelSenko
    @PavelSenko3 ай бұрын

    Any publicly available trading strategy by definition is not working.

  • @Neuroszima

    @Neuroszima

    2 ай бұрын

    Exactly, but it still does giv eyou some insight on how to analyze data. The real thing is to come up with something that would work

  • @YaraYara-fw7vh
    @YaraYara-fw7vhАй бұрын

    thanks

  • @LevelUpWay
    @LevelUpWay3 ай бұрын

    👏👏👏

  • @DuyNamTruong
    @DuyNamTruong3 ай бұрын

    I think Xeventy´s XVT will be one of the top performers in bullrun 2024/2025.

  • @theweshsingh6932
    @theweshsingh69323 ай бұрын

    How to get twitter data?

  • @user-ey2qe2qv4s

    @user-ey2qe2qv4s

    3 ай бұрын

    Let me know if you do get it ;)

  • @user-vu9lh5zz5i
    @user-vu9lh5zz5iАй бұрын

    дедок лучший!!!

  • @japorto100
    @japorto1006 ай бұрын

    Nice

  • @alpserbetli6219
    @alpserbetli621916 күн бұрын

    ## 6. Calculate Portfolio Returns with monthly rebalancing portfolio_df gives empty return:( I am npt be able to fix that issue. please help me pn this if you have find some time sir

  • @alpserbetli6219

    @alpserbetli6219

    16 күн бұрын

    interestingly returns_df .dropna() erase all dataframe:(