Current behaviour, it will throw error (Some OHLC values are missing (NaN)) and program will quit.
After modify: The missing OHLC values (NaN) are filled forward using the .fillna(method='ffill') method for 'Open', 'High', 'Low', and 'Close' columns. For the 'Volume' column, missing values are filled with 0. You can adjust this logic based on your specific requirements.
File: kernc/backtesting.py/backtesting/backtesting.py
Line no: 1110 - 1113
# if data[['Open', 'High', 'Low', 'Close']].isnull().values.any():
# raise ValueError('Some OHLC values are missing (NaN). '
# 'Please strip those lines with `df.dropna()` or '
# 'fill them in with `df.interpolate()` or whatever.')
Current behaviour, it will throw error (Some OHLC values are missing (NaN)) and program will quit. After modify: The missing OHLC values (NaN) are filled forward using the .fillna(method='ffill') method for 'Open', 'High', 'Low', and 'Close' columns. For the 'Volume' column, missing values are filled with 0. You can adjust this logic based on your specific requirements.
File: kernc/backtesting.py/backtesting/backtesting.py Line no: 1110 - 1113
suggest to replace with: