I am creating a backtest using vectorbt library. This is my function for all the portfolio metrics:
pf = vbt.Portfolio.from_signals(
signal_data['close'],
entries,
exits,
init_cash=10_000_000,
freq='D'
)
Now, instead of using the close price I want to switch to bid and ask prices for my trades.
Is there a convenient way to do this?