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/

    Usage of backtrader with Soybean future

    General Code/Help
    future soybean
    2
    4
    544
    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.
    • A
      alexgiul last edited by

      Hi guys,

      I am a newbie of backtrader and try to run simple backtesting stuff but I dont know how to configure it correctly...

      I have copied the code here:
      https://www.backtrader.com/blog/posts/2015-07-26-commission-schemes/commission-schemes.html#commission-schemes

      and adapted to my case

      This is the paper I am trying to implement: https://kjtradingsystems.com/Act/davey0410.pdf

      The first issue is how to configure the "comminssion" scheme for soybean...

      I have taken the information from CME website (https://www.cmegroup.com/trading/agricultural/grain-and-oilseed/soybean_contract_specifications.html) and configure the commission in this way:

      cerebro.broker.setcommission(commission=8, margin=2350, mult=5000, name=instrument_name) # soybean

      Running the code I get very big profit/loss and I suppose to have mis-configured the commission scheme.

      The goal of this project is to get the same results as the author of paper.

      Any help is very appreciated,
      Alex

      1 Reply Last reply Reply Quote 0
      • E
        emilpuiu last edited by

        Hey,

        Multiplier for Soybean is 50. Prices are quoted USd/bu (i.e. tick size 0.25, each tick is worth 12.5$).

        Just change the multiplier to 50 and you are good to go. Also, Initial margin for speculator is 2585$, and the secondary margin is $2350.

        Hope this help!

        A 1 Reply Last reply Reply Quote 0
        • A
          alexgiul @emilpuiu last edited by

          Thanks a lot @emilpuiu .
          Do you think should I consider/include the secondary margin during backtest ?

          E 1 Reply Last reply Reply Quote 0
          • E
            emilpuiu @alexgiul last edited by emilpuiu

            @alexgiul

            No, initial margin alone is fine :)

            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(); }); }