-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Triple barrier events code returning IndexError 0 out of bounds #531
Comments
Have you checked for duplicates in the index? |
Yes, i ran numerous functions to remove problematic values but am still getting the same error, see below for the adjustments i tried: |
Running through the triple barrier labeling process, the code keeps getting an error
"IndexError: index 0 is out of bounds for axis 0 with size 0" - i take it this means it is trying to pull from an empty dataframe, but i have checked each of the inputs (cusum, ptsl, target,verticalbarriertimes, ES and Side) and they all have data. there are also no NaN, inf, NaT or other blank values or error in the dataframe. Any idea what could be causing this?
Code:
triple_barrier_events = ml.labeling.get_events(close=data['ES'],
t_events=cusum_events,
pt_sl=pt_sl,
target=daily_vol,
min_ret=min_ret,
num_threads=3,
vertical_barrier_times=vertical_barriers,
side_prediction=data['side'])
The text was updated successfully, but these errors were encountered: