If the headline was made on a weekend then subtract BDay(0) to fetch the next business day's market open time
Q1:curr_date_open = pd.to_datetime(date).floor('d').replace(hour=9,minute=30) - BDay(0)
Q1: For this code, I dont get the logic. i) what is the floor('d') means? ii) BDay(0), (0) for what?
# Calculate the previous business day's market close time for the headline
Q2:prev_date_close = (curr_date_open - BDay()).replace(hour=16,minute=0)
Q2: - BDay(),why is case we don't have 0 inside the bracket?