Navigation

    Backtrader Community

    • Register
    • 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/

    Beginner setup | Using & Accessing data feed(s)

    General Code/Help
    1
    2
    158
    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.
    • Engineer treefive
      Engineer treefive last edited by

      Hey backtraders,

      Clearly I'm new here but I'm open to learning! I'm looking to get some help with some basic setup that I think most of you were able to hurdle. Following the Quickstart Guide I was able to get set up fairly easy. Next, Adding a Data Field this is where I struggled to understand how we were creating a data feed.

      if __name__ == '__main__':
          # Create a cerebro entity
          cerebro = bt.Cerebro()
      
          # Datas are in a subfolder of the samples. Need to find where the script is
          # because it could have been called from anywhere
          modpath = os.path.dirname(os.path.abspath(sys.argv[0]))
          datapath = os.path.join(modpath, '../../datas/orcl-1995-2014.txt')
      
      

      The quick start guide never explained how we are downloading csv or txt files from any of the data feeds. So, This is where I'm looking to get some help from within this commuity. Can someone kindly show me how they are configuing their data feeds? Just to be clear. The reason I'm here is mainly to learn about python through trading. I'd love to get a better understanding of python along with coding up some of my stragegies.

      Let me know if you need me to give more details or whatever. I also have a basic understanding of functional programming

      1 Reply Last reply Reply Quote 0
      • Engineer treefive
        Engineer treefive last edited by

        Not sure how to delete this post but I figured this out. I'm just getting started and was able to solve this problem. All i needed to do was step away for a second and come back to the problem.

        Current fix: the .txt file that was being referenced was within in the backtraders github repo. I'm still not certain how you are pulling data back to your computer but its still early in this learning process.... I'm actually getting excited after making such progress in one day

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