Here is a sample of the data:

Goal:

create a new timestamp column for when running_bid_max greater than or equal to the value in ask_price_target_good . Then create a separate timestamp column for when running_bid_min is less than or equal to ask_price_target_bad .

Note: This will be performed on a large amount of data and needs calculated as fast as possible. I'm hoping I don't have to iterate through all rows via iterrows()

running_bid_min and running_bid_max are calculated using a running.min() and pd.running.max() from a certain time frame in the future (this example is using a 5 minute timeline. So it will be the running min,max 5 minutes from the current time)

copy the data below and then use df = pd.read_clipboard(sep=',')