Usage of backtrader with Soybean future
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:
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,
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!
Thanks a lot @emilpuiu .
Do you think should I consider/include the secondary margin during backtest ?
No, initial margin alone is fine :)