backtesting.py icon indicating copy to clipboard operation
backtesting.py copied to clipboard

Setting position size to 10% for each trade

Open buckydroid opened this issue 3 years ago • 1 comments

I want to trade with 10% of my total capital for each orders...

Can't find any information about it in the documentation.

So is there any way to do that while backtesting?

buckydroid avatar Aug 02 '22 10:08 buckydroid

Can't find any information about it in the documentation.

That's peculiar, since it's literally mentioned everywhere that you can use order size= between 0 and 1 to mean a fraction of equity:

self.buy(size=0.1)  # =10%

kernc avatar Aug 02 '22 11:08 kernc