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/

    How do I install the sample data from backtrader library?

    General Code/Help
    2
    8
    117
    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.
    • G
      Gleetche last edited by

      Hi there,

      I am trying to run the sample code from:
      https://www.backtrader.com/blog/posts/2019-08-29-fractional-sizes/fractional-sizes/
      68832cfd-5c0e-4b95-9a1c-6804560d7a6b-image.png

      ,and it uses the sample data from backtrader library. Since I copy pasted the code and ran it, it says there is no such data, so I will assume I have to download it manually. And I guess this is where to get the data from:
      https://github.com/mementum/backtrader

      But how do I install it? the installation note :
      16f8997e-b05d-4928-9380-2d7d1bbb6e5f-image.png
      Which I already did when I first installed backtrader.

      1 Reply Last reply Reply Quote 0
      • vladisld
        vladisld last edited by

        You can get the full source code from here:
        https://github.com/mementum/backtrader

        1 Reply Last reply Reply Quote 0
        • G
          Gleetche last edited by

          @vladisld it would be helpful if you elaborate more. I have pasted the directory to my project directory and the problem persists. Which source code are you talking about?

          G 1 Reply Last reply Reply Quote 0
          • G
            Gleetche @Gleetche last edited by

            @vladisld
            My question is how do I install it? I apologize if my question is not clear.

            1 Reply Last reply Reply Quote 0
            • vladisld
              vladisld last edited by

              @Gleetche said in How do I install the sample data from backtrader library?:

              Which source code are you talking about?

              Backtrader is an open source project. The data file mentioned in the blog post is part of the testing data sets available in the /datas sub-directory of the Backtrader's project source code which you may just clone from github. (I'm not sure those data sets are included in the installed package though).

              So the good way to play with the Backtrader's samples is to actually clone the Backtrader repository and work directly with it.

              Alternatively you may just download this specific data file from directly from github and continue working with the installed package:

              https://github.com/mementum/backtrader/blob/master/datas/2005-2006-day-001.txt

              1 Reply Last reply Reply Quote 0
              • G
                Gleetche last edited by

                @vladisld

                "So the good way to play with the Backtrader's samples is to actually clone the Backtrader repository and work directly with it."

                and how do I do this? How do I clone the backtrader repository into my directory? or how do I place the specific data into the place where I needed to place? Where do i place it?

                I have downloaded the file. I just don't know what do with it.

                1 Reply Last reply Reply Quote 0
                • G
                  Gleetche last edited by

                  Because I have

                  1. Downloaded the files
                    c301efa7-d051-4498-b943-8e2f5c2f7433-image.png
                  2. Tried pasting it into several folders of my project files, expecting it would "fit".

                  and still:
                  645515a4-6aac-4e15-83bf-83134202c863-image.png

                  1 Reply Last reply Reply Quote 0
                  • G
                    Gleetche last edited by

                    I solved it

                    @vladisld thanks

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