Backtesting Hundreds of Stocks at Once, in Python

Поделиться
HTML-код
  • Опубликовано: 2 окт 2024

Комментарии • 36

  • @kevinmckinney100
    @kevinmckinney100 9 месяцев назад +6

    It might be a small group watching these coding videos as you say but I think anyone who is watching them greatly appreciates you sharing all the details of the backtesting strategy you use. Personally I'm hoping for a part 4 which covers the aggregation of all results like you demonstrate in your backtest videos, including the trade and drawdown histograms. I think the trade histogram showing the profitability of multiple random selections of trades is a particularly interesting and unique feature that I've not seen used elsewhere. Please keep up the great work!

    • @jayflaggs
      @jayflaggs 9 месяцев назад

      I second that.

  • @patrickbaboon
    @patrickbaboon Год назад +1

    Thanks for this demo. I'm a novice python coder but really interested in portfolio backtesting. Your Playlist of videos really gave me the confidence to design my own tests with the ultimate goal to go live

  • @oddskid
    @oddskid 10 месяцев назад

    Last time I asked when will the next backtesting tutorial would be posted you replied and posted it that same day.
    Trying my luck again!!!
    I love your videos, keep it up.

  • @sahafshoshani7736
    @sahafshoshani7736 9 месяцев назад +4

    BEST BACKTEST CHANNEL ON RUclips !!!

  • @vi-uu2jp
    @vi-uu2jp 4 месяца назад +3

    amazing video, looking forward ot the next one possibly explaining running simulations, data visualization with account balances, etc... that you have up on your other videos

  • @stanverhoeven5794
    @stanverhoeven5794 Год назад +3

    Thanks a lot for putting in all the effort in both the video and the Colab book! Really interesting learing from these particular video's and already trying to give it a go myself:).
    I have a suggestion which i would like to try out myself, but I am not sure on my thought process: If I would sort the trading results on the datetime index, would that provide me with the ability to count the maximum drawdown and equity curve? I am thinking about your backtest for the MACD + RSI + STOCH video in which you showed a really stable equity curve, however thinking that the datetime of those trades have a significant influence on that stable curve. You did adjust for this in later video's I think.
    Anyway thanks a lot again! Really interesting stuff to work with!!

    • @seriousbacktester
      @seriousbacktester  Год назад +1

      Yes absolutely, you could sort the rows by the datetime column and then create a column which is the cumulative sum of the gain column…pandas has a cumsum function which does just that. Actually the date time column is the date the trade is entered; to be even more real world you probably want to sort by the date gain/loss was realized; could make a new column trade_exit date and make it entry date plus trade length then sort by that instead of entry date ; I never thought of that before, will do that in future videos! Thanks!

  • @keltonpreece2016
    @keltonpreece2016 Год назад +3

    Yes! I’ve been excited for your next video. This is great!

  • @louiss2595
    @louiss2595 Год назад +3

    Come on man you're doing gods work, sincerely, please post more frequently

  • @KentSo0419
    @KentSo0419 Год назад +3

    This is an incredible demo. I wish more "backtesting" channels are as high quality as this one. This is so good.
    As an idea of your next video, would you be able to demo the monte carlo on a specific strategy and plot out the gain bell curve to check for statistical significance as in your previous videos?

  • @alxcancado
    @alxcancado Год назад +1

    Bravo! Thank you very much! I want to ask you, can you talk about survivorship bias and how we can get or workaround better data? I read somewhere that there are a paper saying that, for data with survivor bias it can increase about 7-10 % the results, per year. Anyway, thanks again, your videos are the best!

  • @DhavichandraDhirhe
    @DhavichandraDhirhe 11 дней назад

    Hii, i was doing some tedious data collection and bactesting for currencies like... Day when high or low of the week formed ( in relation to how previous week candle was)... Then same for daily candle including the session and time it formed relative to session and news release... And some other nuances into it..... Please can you suggest me some sources how can I do it more efficiently for years of data... Or if you're interested in collaboration

  • @Muhammadxuxix
    @Muhammadxuxix 5 месяцев назад

    could you do a backtest XAUUSD on the OANDA server using multiple ema 20 on (1-hour tf , 4-hour tf and daily). the entry rule is when the price is emerging up from the bottom of 4H ema and the 1H ema < 4H ema < daily (the short rule is the opposite). the SL is the last low or the 1.6 ATR. The TP is the last high of the 30-minute candle. when the order is on 1R, cut half of the order size. Thank you.
    the other thing that I am curious about is, what kind of indicator do you suggest to determine the trend of the market (trending or sideways), it will really help if you can identify and switch the strategy mode.

  • @jdaniele
    @jdaniele 7 месяцев назад

    Great video serie. Thanks for sharing it. By the way, you should consider the spread as a cost...😊

  • @adventurebay6619
    @adventurebay6619 Год назад +1

    This was a great help to me. You have motivated me to finally learn python. One issue I had with the notebook was the section where you are spliting all the symbol csvs in the folder that was created locally. For some reason I was getting the folder path name in the dict_keys output. I was able to fix this by using split('\\') instead of split('/'). After that everything work for me. Thanks again now I can go through and really diesect what each line of code is doing.

  • @nikbiz
    @nikbiz Год назад

    Is there a way to get in direct contact with you? Perhaps a business email or similar. I stumbled upon your channel today when I was looking for someone who actually knows what he's doing in terms of testing out strategies. I need someone to collaborate with (private project). The project would be mutually beneficial and involve backtesting with help of AI.
    Please reach out if you're interested and please post more often, your videos and explanations are wonderful.

  • @dingleberry10
    @dingleberry10 3 месяца назад

    Hey man, please include part 3 somewhere in the posted title. Will help especially in future when these videos get buried by the rest of your new uploads.

  • @rhino7460
    @rhino7460 11 месяцев назад +1

    Hi, thanks for sharing, is there modules/libraries to use this backtesting tech so that it can be used to scan on active data? The "Powerful swing or scalp strategy tuned for minimal drawdown and consistent results" is great, I did it in pine script but there are so few occurrences that it would need an extraodinary amount of alerts/seup to get enough trades to be worth it.

    • @seriousbacktester
      @seriousbacktester  11 месяцев назад

      Check out thinkorswim if you can....you can have it email or send push alerts in real time when strategy criteria are met

  • @leoconnor7473
    @leoconnor7473 Год назад

    Would love to see a backtest with ichimoku :)

  • @ConfusedKev
    @ConfusedKev Год назад

    Have you considered doing backtests on the Indices, Metals, or Major Forex Pairs?

    • @seriousbacktester
      @seriousbacktester  11 месяцев назад

      Great question; I actually just uploaded a new video where i tested a strategy on forex pairs, since that's what the original strategy was designed for. its the first time I've uploaded a backtest for anything other than stocks

  • @Ivy-mv1vl
    @Ivy-mv1vl 5 месяцев назад

    ❤😊❤d❤

  • @dsquared6441
    @dsquared6441 Год назад

    Thank you so much for creating this awesome channel. It's really insightful. Would it be possible to make a video about the "Twin Range Filter", combined with "Twiggs Money Flow" and "Laguerre Filter" indicators? Would love to hear your thoughts on this.

  • @miguelbetances1274
    @miguelbetances1274 Год назад

    Hello Sir, I have a strategy that I am trying to develop by using the ROC between 2 moving averages in order to enter MA crosses early but I need some help. Could you try making a strategy on this? I am calculating the ROC on the difference between the Moving Averages.

  • @victorsblog
    @victorsblog Год назад

    Fascinating. You've inspired me to start a Google Collab and write up backtests based on my own ideas & ideas I've found through the grapevine. Would love to hear your thoughts on your favorite/most profitable strategies that've worked for you based on your backtests. Obviously would be open to paying/donating for that content if it helps you.

  • @VOLightPortal
    @VOLightPortal 11 месяцев назад +1

    Fantastic stuff! Curious how you can also getting entries on specific dates like the end of month as well!

    • @seriousbacktester
      @seriousbacktester  11 месяцев назад

      Good question! I've never tried that, but in theory it wouldn't be too hard as the historical price data I archive does include date and time

    • @dpellegrino2003
      @dpellegrino2003 5 месяцев назад

      @@seriousbacktester Dont you have training courses? I am interested

  • @jm7476
    @jm7476 Год назад

    Thanks a lot!!
    Awesome content, miles ahead what others related channels offer
    I hope youtube notice and rewards you accordingly
    Cheers!

  • @haedike
    @haedike 8 месяцев назад

    Wonderful work you are doing here. Thanks for the education and the starter code in colab! Most grateful!

  • @haedike
    @haedike 8 месяцев назад

    Wonderful work you are doing here. Thanks for the education and the starter code in colab! Most grateful!