For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See:

Different strategy output for different cash input

  • Hi guys. I am new to backtrader, and started to experiment with it. I've been running the MA example (my code is basically the same as the last chunk from aside from the data which an ETH-EUR historical daily data). And I have noticed that the outcome of the strategy (thus the strategy itself) depends on the starting cash. Which parameter makes it that way ? Is that linked to the sizer, and its stake ? (I don't understand much what a sizer means)

    For example: with 1000 cash, and the MA strategy in the example, I end up with 983 at best (so losing strategy)
    For example: with 100 cash, and the MA strategy in the example, I end up with 231 at best (so hard-winning strategy)

    Thanks for your help.

  • Ok, nevermind, this was indeed related to the sizer.
    So basically, the default sizer is set to 1. However, with 100 currency, I couldn't buy 1 ETH until it was at the all-time low. This is why coincidentally I was buying at the ATL, giving me a huge ROI

Log in to reply