Algorithmic Trading - Machine Learning & Quant Strategies Course with Python

Поділитися
Вставка
  • Опубліковано 26 гру 2024

КОМЕНТАРІ • 346

  • @tansutazegul8297
    @tansutazegul8297 3 місяці тому +55

    I have a similar project where I identify the top 10 stocks with the highest momentum based on a 10-year data review. Then, using the Markowitz efficient frontier, I create portfolios with minimum variance and maximum Sharpe ratio. The I work on the descriptive statistical analysis to visualize everything such as monthly prices, variance etc. After that, I calculate beta and alpha using CAPM, and finally, I run 15 different regression models with 18 independent variables to predict the price-to-earnings ratio.
    I love this kindda detail stuff. Well done!

  • @BEAUTIFULDIANAFRANCIS
    @BEAUTIFULDIANAFRANCIS 3 місяці тому +140

    You work for 40yrs to have $1m in your retirement, Meanwhile some people are putting just $10k in a meme coin for just few months and now they are multi millionaires. I pray that anyone who reads this will be successful in life .

    • @LeslieWagenheim
      @LeslieWagenheim 3 місяці тому +3

      I'm new to cryptocurrency and don't understand how it really works. how Can someone know the right approach to investing and making good profits from cryptocurrency investments?

    • @MarcelinaMakowski
      @MarcelinaMakowski 3 місяці тому

      What opportunities are there in the market, and how do I profit from it?

    • @BEAUTIFULDIANAFRANCIS
      @BEAUTIFULDIANAFRANCIS 3 місяці тому +1

      Cynthia Alexandra Jackson is the licensed fiduciary I use. Just research the name. You’d find necessary details to work with a correspondence to set up an appointment..

    • @AnnBurrow-vb8tt
      @AnnBurrow-vb8tt 3 місяці тому +1

      Thanks for sharing, I just looked her up on the web and I would say she really has an impressive background in investing. I will write her an e-mail shortly.

    • @timhutter
      @timhutter 23 дні тому +1

      😂😂😂😂🇳🇬

  • @sweealamak628
    @sweealamak628 Рік тому +73

    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 Рік тому

      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 Рік тому +2

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

    • @ZNE1323
      @ZNE1323 5 місяців тому +2

      Garch is actually a fairly simple thing it just sounds scary because of its ugly name, whatever textbook you have just ask chatgpt to explain it in layman terms and build up from there👍

  • @sanethehappypill
    @sanethehappypill 11 місяців тому +159

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

    • @nobodyknows3560
      @nobodyknows3560 8 місяців тому +7

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

    • @bokoaruka9819
      @bokoaruka9819 8 місяців тому

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

    • @josephbutterwine
      @josephbutterwine 7 місяців тому +1

      he failed

    • @weishi8620
      @weishi8620 3 місяці тому

      ​@@nobodyknows3560Thats why it is increasingly difficult for sole traders as indicators can be manipulated by the big money.

  • @ShadowMind312
    @ShadowMind312 Рік тому +39

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

    • @hardy_brothers
      @hardy_brothers Рік тому +2

      Thank you mate, cheers!

    • @jaimem1325
      @jaimem1325 Рік тому

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

  • @xyzplusxyzis2xyz
    @xyzplusxyzis2xyz Рік тому +170

    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 Рік тому +17

      this is correct. upvoted

    • @Artificial_Eagle
      @Artificial_Eagle 11 місяців тому +4

      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 9 місяців тому +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 9 місяців тому +2

      Based comment

    • @nilomartinezjr4108
      @nilomartinezjr4108 9 місяців тому +15

      @@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.

  • @BaileyJames-zv2ddd
    @BaileyJames-zv2ddd 6 місяців тому +103

    Our economy is afflicted by uncertainty, housing troubles, foreclosures, global shifts, and the aftermath of the epidemic, all of which contribute to instability. To restore stability and drive growth, all sectors must urgently address rising inflation, slowing GDP, and trade disruptions

    • @LouisMorganxb3
      @LouisMorganxb3 6 місяців тому

      The US dollar is losing value due to inflation, while other currencies are gaining strength, creating uncertainty. Nonetheless, many people remain confident in the Dollar's perceived safety. I'm concerned that my 420K retirement funds may lose value, therefore I'm looking for other financial stability.

    • @OscarOwenn
      @OscarOwenn 6 місяців тому

      With my stressful career, I don't have time for investment analysis. For seven years, a fiduciary has managed my portfolio, responding to market situations, ensuring for effective navigation and informed decisions. Consider taking a similar plan of action.

    • @BaileyJames-zv2ddd
      @BaileyJames-zv2ddd 6 місяців тому

      Do you mind if I ask you to recommend the coach you employed? It seems you've figured it all out.

    • @OscarOwenn
      @OscarOwenn 6 місяців тому

      My CFA, 'Leah Foster Alderman', is a well known figure in her field. I recommend looking into her qualifications further. She has extensive knowledge and is a treasure trove for anyone seeking to manage the financial markets.

    • @BaileyJames-zv2ddd
      @BaileyJames-zv2ddd 6 місяців тому

      Regards. her handler was simple to locate and appears to be extremely capable and adaptable. We scheduled a phone conversation.

  • @dirty_haute
    @dirty_haute Рік тому +22

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

    • @over1498
      @over1498 11 місяців тому +20

      Lol. It's about beating the market.

    • @thetasworld
      @thetasworld 5 місяців тому

      ​@@over1498 mainly it's about gambling

    • @ROSE-bk6kt
      @ROSE-bk6kt 3 місяці тому

      market inefficiencies*​@@over1498

  • @InezPhillips
    @InezPhillips 6 місяців тому +4

    yyyyeah wow 9 in a row on the demo and 4 in live. Thanks. Been waiting for something that finally works for me. I understand now how it works.

    • @frostyrunners
      @frostyrunners 4 місяці тому

      Hello Inez! Did you get to make the model he gave functional to the actual market right now? I thought his model wasn't actually functional or did you add a lot more stuff?? I would greatly appreciate a response!

  • @Tiger-ep6hc
    @Tiger-ep6hc 11 місяців тому +9

    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...

  • @DigitalBreakthrough
    @DigitalBreakthrough 2 місяці тому +2

    Your analysis of market trends is always spot on.

  • @AmantisAnalytics
    @AmantisAnalytics Рік тому +26

    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 Рік тому +1

      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 Рік тому +1

      @@thenoblegodplease let me know when he messages you

  • @andigjonii
    @andigjonii 4 місяці тому

    Your strategies are simply amazing! I've tried so many different approaches to binary options over the years, but nothing has worked as well as your methods. Thank you for sharing your knowledge and expertise with us - you're truly making a difference in the lives of so many traders.

  • @sophiophile
    @sophiophile Рік тому +12

    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 8 місяців тому

      Can you explain more about this?

  • @yusuftaylan-t6g
    @yusuftaylan-t6g 16 днів тому

    Благодаря тебе стал разбираться в арбитраже и связках)

  • @ml11566
    @ml11566 10 місяців тому +11

    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

  • @munivoltarc
    @munivoltarc Рік тому +17

    I am amazed to see algo videos rarely on UA-cam. 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 Рік тому +1

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

    • @munivoltarc
      @munivoltarc Рік тому +1

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

  • @dorothylynch8165
    @dorothylynch8165 7 місяців тому +2

    Watching your video about trading help more to understand the beauty and benifits of trading, thank you for sharing.

  • @YouTuberTV-mc7wm
    @YouTuberTV-mc7wm 11 місяців тому +9

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

  • @yawvoon2941
    @yawvoon2941 Рік тому +2

    Thanks!

  • @Nizav-qu5zt
    @Nizav-qu5zt 3 місяці тому +1

    1:57:47 on here i got no error but the portfolio_df returns 'Adj Close' multiple times and not return any of the dataframe/output other than that. any solution?

  • @wrawlings146
    @wrawlings146 9 місяців тому +3

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

    • @hammam92
      @hammam92 8 місяців тому +1

      change 'index' to "Ticker".

    • @pranavsingh1947
      @pranavsingh1947 8 місяців тому

      @@hammam92 pls tell where

    • @hammam92
      @hammam92 8 місяців тому

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

    • @ishamsyahputra
      @ishamsyahputra 6 місяців тому

      @@hammam92 ....
      returns_dataframe = np.log(new_df['Adj Close']).diff()
      portfolio_df = pd.DataFrame()
      for start_date in fixed_dates.keys():

      try:
      end_date = (pd.to_datetime(start_date)+pd.offsets.MonthEnd(0)).strftime('%Y-%m-%d')
      cols = fixed_dates[start_date]
      optimization_start_date = (pd.to_datetime(start_date)-pd.DateOffset(months=12)).strftime('%Y-%m-%d')
      optimization_end_date = (pd.to_datetime(start_date)-pd.DateOffset(days=1)).strftime('%Y-%m-%d')

      optimization_df = new_df[optimization_start_date:optimization_end_date]['Adj Close'][cols]

      success = False
      try:
      weights = optimize_weights(prices=optimization_df,
      lower_bound=round(1/(len(optimization_df.columns)*2),3))
      weights = pd.DataFrame(weights, index=pd.Series(0))

      success = True
      except:
      print(f'Max Sharpe Optimization failed for {start_date}, Continuing with Equal-Weights')

      if success==False:
      weights = pd.DataFrame([1/len(optimization_df.columns) for i in range(len(optimization_df.columns))],
      index=optimization_df.columns.tolist(),
      columns=pd.Series(0)).T

      temp_df = returns_dataframe[start_date:end_date]
      temp_df = temp_df.stack().to_frame('return').reset_index(level=0)\
      .merge(weights.stack().to_frame('weight').reset_index(level=0, drop=True),
      left_index=True,
      right_index=True)\
      .reset_index().set_index(['Date', 'index']).unstack().stack()
      temp_df.index.names = ['date', 'ticker']
      temp_df['weighted_return'] = temp_df['return']*temp_df['weight']
      temp_df = temp_df.groupby(level=0)['weighted_return'].sum().to_frame('Strategy Return')
      portfolio_df = pd.concat([portfolio_df, temp_df], axis=0)

      except Exception as e:
      print(e)
      portfolio_df = portfolio_df.drop_duplicates()
      portfolio_df
      ...
      will print
      ...
      "None of ['index'] are in the columns"

  • @benjaminsommer7096
    @benjaminsommer7096 5 місяців тому +1

    Such an insightful video with clear and understandable explanations. Much appreciated. Thank you very much.

  • @imtryinghere1
    @imtryinghere1 Місяць тому

    I followed this video and became a billionaire in 9 minutes. Thank you for your excellent instruction.

  • @natnaelabayneh7664
    @natnaelabayneh7664 Рік тому +8

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

  • @sofiyamironova6447
    @sofiyamironova6447 3 місяці тому

    Your explanations are clear and concise, making it easy for me to follow along

  • @tejasgala5092
    @tejasgala5092 8 місяців тому +1

    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 7 місяців тому

      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?

    • @tejasgala5092
      @tejasgala5092 6 місяців тому

      @@VictorsTravelvLog Thanks for your reply! Actually the problem was with 'length' parameter which is set to 20. So every stock must have atleast 20 rows of data or else pandas_ta.bbands will return nonetype which in turn throws an error.
      This is solved by removing those stocks with less than 20 rows of data:
      df = df.groupby(level='ticker').filter(lambda x: len(x) >= 20)

  • @Maximus18.6
    @Maximus18.6 9 місяців тому +2

    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

  • @ShuaitaoTan
    @ShuaitaoTan 7 місяців тому +1

    u made everything look so easy!!! thank you for the lesson, I am trying to duplicate this lesson and go a little beyond in terms of generating a SQL dataset and making a potential web page out of it

  • @DelmaBaque
    @DelmaBaque 5 місяців тому

    Thank you for your video. That was amazing to watch how you built an account from $1!

  • @gawincheung317
    @gawincheung317 9 місяців тому

    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 ?

  • @femifasusi453
    @femifasusi453 Рік тому +11

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

  • @leander79416
    @leander79416 8 місяців тому

    spectacular free content - thank you SO much

  • @dariusmamani-e3c
    @dariusmamani-e3c Місяць тому

    Отличная связка, спасибо за подробности.

  • @TheAsselmeier
    @TheAsselmeier Рік тому +2

    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,...

  • @VictorsTravelvLog
    @VictorsTravelvLog 7 місяців тому +1

    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?

  • @richardsifeanyi6766
    @richardsifeanyi6766 Рік тому +4

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

  • @natel.1059
    @natel.1059 Рік тому +4

    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?

  • @nelsoncreemov
    @nelsoncreemov 2 місяці тому +1

    I'm getting this error when trying to create the Bollinger Bands columns: 'NoneType' object has no attribute 'iloc' .

  • @Ivelin
    @Ivelin Рік тому +3

    Excellent video. Thank you!

  • @ashutoshshukla2325
    @ashutoshshukla2325 Рік тому

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

  • @lemabui
    @lemabui 2 місяці тому +1

    I'm following this but came across an issue. When downloading from YFinance, I get my dataframe with the date in date+timestamp format, rather than just date like you do in the video. Later on, that causes an issue with joining/pivoting tables from different data sources. Is there a quick solution you could recommend? Any help would be greatly appreciated!

  • @coldbrewed8308
    @coldbrewed8308 Рік тому +2

    How do we generate the twitter sentiment dataset by ourself?

  • @albertohernandezaldamiz-ec2020
    @albertohernandezaldamiz-ec2020 11 місяців тому +1

    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.

    • @JuanchoGarVi
      @JuanchoGarVi 6 місяців тому

      what bots did you buy? thanks

  • @9ixrecordss
    @9ixrecordss Рік тому +2

    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?

  • @lucassanchez5939
    @lucassanchez5939 10 місяців тому

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

  • @alpermalkoclotus
    @alpermalkoclotus 2 місяці тому

    Dear ‪@lachone_‬ , many many thanks for your efforts and for sharing it with us. I want to ask where the standardization is done in the first project. Don't we need to standardize all the features around 1:22 before we apply Kmeans clustering?

  • @argu2026
    @argu2026 Рік тому +10

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

  • @yzqq748
    @yzqq748 Рік тому +2

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

    • @Dcborge
      @Dcborge 8 місяців тому

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

    • @mathieueasygo1255
      @mathieueasygo1255 3 місяці тому

      Hey, it seems like you have a NoneType object instead of a DataFrame.

  • @PavelSenko
    @PavelSenko 11 місяців тому +5

    Any publicly available trading strategy by definition is not working.

    • @Neuroszima
      @Neuroszima 9 місяців тому +1

      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

  • @Techify09
    @Techify09 Рік тому +4

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

  • @joemaruhhh
    @joemaruhhh 8 місяців тому

    Very valuable information, thanks for your work!

  • @alpserbetli6219
    @alpserbetli6219 8 місяців тому +1

    how did you obtain the sentiment data sir ?

  • @Zlatanov688
    @Zlatanov688 Рік тому +5

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

  • @franciscogamarra10
    @franciscogamarra10 Рік тому +9

    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)

  • @johnsmith-qc8ud
    @johnsmith-qc8ud Рік тому +8

    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 Рік тому +1

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

    • @antoniozeus4
      @antoniozeus4 7 місяців тому

      ​@@loganbishop4619 upon further review, the normalization is applied per security using the entire time series so I think this is an issue raised by @johnsmith-qc8bud ... wouldn't the correct way to do this would be to apply normalization on a rolling basis?

  • @mohngumba3079
    @mohngumba3079 11 місяців тому

    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 11 місяців тому

      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

  • @jagjeetchauhan9456
    @jagjeetchauhan9456 Рік тому +2

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

    • @david_vdb
      @david_vdb Рік тому +1

      same here, how did you solve it?

    • @Elnur.Zarabi
      @Elnur.Zarabi Рік тому

      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

  • @scarbz
    @scarbz Рік тому +2

    Perfect for my Quant journey

    • @brianoconner8405
      @brianoconner8405 11 місяців тому

      Are you following quant?

    • @rantg
      @rantg 11 місяців тому +2

      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.

  • @aleestvr2756
    @aleestvr2756 6 місяців тому +1

    hi, i tried to copy your implementation. in the first project after 7th step, at for start_date in fixed_dates.keys() loop, i get an empty portfolio_df, with this error:
    "None of ['index'] are in the columns".
    i did not find out why

    • @winterroll5255
      @winterroll5255 6 місяців тому

      same error

    • @winterroll5255
      @winterroll5255 6 місяців тому

      I think its something to do with the dates being mis-labeled

  • @PiuPatel-z7j
    @PiuPatel-z7j 10 місяців тому +1

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

  • @winterroll5255
    @winterroll5255 6 місяців тому

    I am getting a "None of ['index'] are in the columns" error at around 1:50:00

    • @archiedascombe2734
      @archiedascombe2734 5 місяців тому

      Same here - even downloading his python notebook and running it gives the same error, So frustrating!

  • @anatolyalekseev101
    @anatolyalekseev101 10 місяців тому +3

    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?

  • @CarlosAlmuñes
    @CarlosAlmuñes 5 місяців тому +1

    Связка отличная, респект автору!

  • @ElGranDonRodrigoPoncedeLeonDuq
    @ElGranDonRodrigoPoncedeLeonDuq 10 місяців тому

    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

  • @tabotcharlesbessong3756
    @tabotcharlesbessong3756 Рік тому

    Thank you so much for this Free Code Camp

  • @namanmadan5994
    @namanmadan5994 Рік тому +2

    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 10 місяців тому

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

  • @partht21
    @partht21 Рік тому +5

    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 Рік тому +1

      Is there trading based freelancing in India?

    • @ashutoshshukla2325
      @ashutoshshukla2325 Рік тому

      I think he means portfolio management.

    • @tushartiwari7929
      @tushartiwari7929 Рік тому +1

      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.

  • @DesignMitho
    @DesignMitho Рік тому +1

    Thank you, I was looking for it!

    • @lukhanyovictor
      @lukhanyovictor Рік тому

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

  • @sachind.b3014
    @sachind.b3014 6 місяців тому

    31:13 the macd indicator, pandas_ta.macd is not working what to do. Pls help

    • @theoagastya1185
      @theoagastya1185 5 місяців тому

      Did you find a solution?

    • @junyaophoon7671
      @junyaophoon7671 2 місяці тому

      copy your code and paste it to chatgpt and ask it to fix it

  • @HaeKaines
    @HaeKaines 5 місяців тому

    Great trader, I got a lot of ideas from you.

  • @himanshuthakur4761
    @himanshuthakur4761 4 місяці тому

    In the GARCH model, daily data and intraday data are of different dates, so how can you merge the signal columm which was derived from daily data with daily data, please explain

  • @jameswhand
    @jameswhand Рік тому +1

    Pretty cool! Thanks a lot!😁

  • @NhuNhuQuynhVu
    @NhuNhuQuynhVu 11 місяців тому

    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

  • @9ixrecordss
    @9ixrecordss Рік тому +1

    does yfinance has survivorship -bias free data?

  • @chaitanyasharma2385
    @chaitanyasharma2385 Рік тому +10

    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

    • @rollerss
      @rollerss Рік тому +4

      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 Рік тому +1

      I have same issue, complety stop.

    • @ohsd186
      @ohsd186 Рік тому +1

      same issue!

    • @ohsd186
      @ohsd186 Рік тому

      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 Рік тому

      @@rollerss this is the correct answer.

  • @natel.1059
    @natel.1059 Рік тому +1

    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 Рік тому

      NVM, the logic is reversed in the later code

  • @sportingmeme3606
    @sportingmeme3606 Рік тому +1

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

  • @theweshsingh6932
    @theweshsingh6932 11 місяців тому +1

    How to get twitter data?

    • @PiuPatel-z7j
      @PiuPatel-z7j 10 місяців тому

      Let me know if you do get it ;)

  • @darkstorm2653
    @darkstorm2653 10 місяців тому

    Do you build trading bots for fee?

  • @nlarchive
    @nlarchive Рік тому +2

    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'

    • @david_vdb
      @david_vdb Рік тому

      same here, have you solved it?

    • @madhurshinde4988
      @madhurshinde4988 Рік тому

      same error, did you get the solution?

    • @david_vdb
      @david_vdb Рік тому

      @@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 Рік тому

      same problem

    • @Elnur.Zarabi
      @Elnur.Zarabi Рік тому +5

      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

  • @sophiophile
    @sophiophile Рік тому

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

    • @christianc8265
      @christianc8265 10 місяців тому

      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.

  • @v-hypertopic7757
    @v-hypertopic7757 27 днів тому

    'NoneType' object has no attribute 'iloc' at 27mins?

  • @anira1504
    @anira1504 5 місяців тому

    can i use visual studio or PyCharm?

  • @kitchiu4743
    @kitchiu4743 9 місяців тому +2

    Now the code doesn't work!!!

  • @softashutube
    @softashutube 5 місяців тому

    Can we filter out stocks that have price lower than its valuation based one of valuation method

  • @sajadghamari4748
    @sajadghamari4748 11 місяців тому

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

  • @passaroquetemasanaovoa
    @passaroquetemasanaovoa Рік тому +6

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

  • @MrAless77m
    @MrAless77m 11 місяців тому

    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 10 місяців тому

      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 10 місяців тому

      @@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

  • @CMT-p6q
    @CMT-p6q 10 місяців тому +1

    one critic use dark mode, it better at contract and healthier for you eyes

  • @princesstheo136
    @princesstheo136 5 місяців тому +2

    I usually look up your videos for updates! Our government has no idea how people are suffering these days. I feel for people with disabilities not getting the help they deserve. Thank you Mrs SONIA DIXON, imagine investing $12,000 and received $305,500.

    • @Chidinma-o6s
      @Chidinma-o6s 5 місяців тому

      She must be really dedicated and well trusted for people to talk much good about

  • @juanyoga
    @juanyoga 8 місяців тому

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

  • @Ibforextrader
    @Ibforextrader 11 місяців тому

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

  • @sophiophile
    @sophiophile Рік тому +4

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

  • @DalazG
    @DalazG 11 місяців тому

    Is this transferable to forex trading?

  • @JustinGiglio-o3f
    @JustinGiglio-o3f 8 місяців тому

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

  • @chuanem-o8r
    @chuanem-o8r 5 місяців тому

    Связка топовая. Спасибо, бро!!!

  • @sabernajar5401
    @sabernajar5401 10 місяців тому

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

  • @EliagaQuliyev-s5y
    @EliagaQuliyev-s5y 5 місяців тому

    Крутейшая связка, редко такой процент бывает

  • @suraj.panddey
    @suraj.panddey 11 місяців тому

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