vectorbt
vectorbt copied to clipboard
run_combs on thresholds
Hi,
How would you use vectorbt to simulate the following?
- You have a strategy that uses a set of time series unrelated to price.
- You have a grid of thresholds that the individual series have to exceed in order to buy or sell.
- You get back a matrix of performance depending on thresholds used.
Thanks
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.