vectorbt icon indicating copy to clipboard operation
vectorbt copied to clipboard

How to use vectorbt to be overweight and underweight backtesting?

Open shihyu opened this issue 3 years ago • 3 comments

Hi,

How to use vectorbt to be overweight and underweight backtesting?

Thanks

shihyu avatar Dec 13 '21 12:12 shihyu

@shihyu please elaborate what do you mean by overweight and underweight backtesting?

polakowo avatar Dec 17 '21 12:12 polakowo

Because the default setting for from_signal() is to buy once and sell once. I think @shihyu is asking how to buy again when the signal appears again, even if I've already bought before (overweight)

kevin851066 avatar May 28 '22 08:05 kevin851066

@kevin851066 There is “accumulate” argument which can be specified as a boolean value or array. Whenever its true, an entry will be executed again regardless of the current position. Set it to true at timestamps with entry signals and false at timestamps with exit signals for pyramiding, for example.

polakowo avatar May 28 '22 08:05 polakowo