backtesting.py icon indicating copy to clipboard operation
backtesting.py copied to clipboard

how to get correct 15min value by using resample_apply with 1min data

Open zha0yangchen opened this issue 9 months ago • 1 comments

Expected Behavior

Expected data should same as this high = pd.DataFrame({'high': self.data.High}, index=self.data.index).resample('15min').agg('max').dropna().values[:, 0][-500:]

Actual Behavior

but when i use self.High = resample_apply('15min', None, self.data.High) and print( self.High[-1], high[-1]), the value of self.high is incorrect, but high[-1] is corrct.

Steps to Reproduce


python code goes here

Additional info

  • Backtesting version: 0.?.?
  • bokeh.__version__:
  • OS:

zha0yangchen avatar May 17 '24 08:05 zha0yangchen