vectorbt
vectorbt copied to clipboard
How to use vectorbt to be overweight and underweight backtesting?
Hi,
How to use vectorbt to be overweight and underweight backtesting?
Thanks
@shihyu please elaborate what do you mean by overweight and underweight backtesting?
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 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.