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/

    Running copy/pasted samples from documentation gives different results than those presented in the documentation

    General Discussion
    documentation quickstart samples
    2
    5
    569
    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.
    • H
      hadrien-toma last edited by hadrien-toma

      For instance for the sample "Our First Strategy", I get different results than those presented. Explicitly, I get :

      2000-12-26, Close, 30.94
      2000-12-27, Close, 30.69
      2000-12-28, Close, 31.06
      2000-12-29, Close, 29.06
      Final Portfolio Value: 100000.00
      

      When the documentation says I should get :

      2000-12-26T00:00:00, Close, 29.17
      2000-12-27T00:00:00, Close, 28.94
      2000-12-28T00:00:00, Close, 29.29
      2000-12-29T00:00:00, Close, 27.41
      Final Portfolio Value: 100000.00
      

      Is the difference due to differences in the imported data? In this case, why is the data different? I simply git cloned the master branch and use its data to try the samples in the doc.

      1 Reply Last reply Reply Quote 0
      • B
        backtrader administrators last edited by

        Dividends

        1 Reply Last reply Reply Quote 0
        • H
          hadrien-toma last edited by hadrien-toma

          @backtrader Hum alright, thank you, so what have I to do to get the same results as the documentation? I would like to continue my quick start having exactly the same results :s.

          1 Reply Last reply Reply Quote 0
          • B
            backtrader administrators last edited by

            Get a copy of the data which matches the data back when the documentation was 1st written, which you can do by looking at old commits.

            H 1 Reply Last reply Reply Quote 1
            • H
              hadrien-toma @backtrader last edited by

              @backtrader Perfect, thank you very much!

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post
              Copyright © 2016, 2017, 2018 NodeBB Forums | Contributors
              $(document).ready(function () { app.coldLoad(); }); }