Backtrader Community

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/

    Where Should I Get Data From?

    General Code/Help
    2
    4
    181
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Z
      Z last edited by

      I was using yfinance to collect my data, but the data is highly inaccurate. I would love to hear some suggestions on where to obtain accurate data from. I'm using Backtrader for backtesting only, so I shouldn't need to access new data every day. I think I'll only need to download a large amount of data once (maybe 25 years on all SP500 stocks).

      Thanks for any feedback!

      R 1 Reply Last reply Reply Quote 0
      • R
        Reinke @Z last edited by

        @Z , I download my data from Alphavantage, because I can get splits and dividends
        explicitly called out on the days even in the free version. I don’t like using adjusted data. But due to the API call limit of 5 per minute, I wrote a background downloader. And data quality is not great either.

        Z 1 Reply Last reply Reply Quote 1
        • Z
          Z @Reinke last edited by

          @Reinke I'm very new to backtesting (and trading in general I guess) with no real knowledge of statistics, what would be the disadvantage of using adjusted data vs. unadjusted with splits and dividends? Also new to coding lol trying to figure out how to use backtrader so that I can avoid manually backtesting due to the fact that with manual testing the amount of data you're testing is much less and therefore could be highly inaccurate on how good a strategy is. It's a journey for sure, but 1 step at a time I suppose.

          R 1 Reply Last reply Reply Quote 0
          • R
            Reinke @Z last edited by

            @Z I think in most jurisdictions tax treatment of dividends vs unrealized gains or even vs realized gains is different. So if you simulate cash outflows for taxes it makes a difference for some strategies. If your commission is calculated on per share basis, it’s important to know when the split happened.

            It might not be your biggest priority right now. For feeding the indicators I mostly use
            the adjusted close as well.

            1 Reply Last reply Reply Quote 1
            • Referenced by  Z Z 
            • 1 / 1
            • First post
              Last post
            Copyright © 2016, 2017, 2018, 2019, 2020, 2021 NodeBB Forums | Contributors