vectorbt icon indicating copy to clipboard operation
vectorbt copied to clipboard

run_combs on thresholds

Open void-t-light-87 opened this issue 4 years ago • 1 comments

Hi,

How would you use vectorbt to simulate the following?

  1. You have a strategy that uses a set of time series unrelated to price.
  2. You have a grid of thresholds that the individual series have to exceed in order to buy or sell.
  3. You get back a matrix of performance depending on thresholds used.

Thanks

void-t-light-87 avatar Nov 22 '21 19:11 void-t-light-87

Hi @void-t-light-87, any function works on any series of numbers, not just prices. You can create an indicator using IndicatorFactory that takes all your time series as inputs (input_names), thresholds as parameters (param_names), and produces entries and exits (output_names). You then pass those produced arrays into Portfolio.from_signals. Please refer to the documentation where each part is described in greater detail.

polakowo avatar Nov 22 '21 22:11 polakowo