class_docstr: Provides functions for doing event studies on price action on an intraday basis and daily basis.
  
      
class_docstr_tok: ["Provides","functions","for","doing","event","studies","on","price","action","on","an","intraday","basis","and","daily","basis","."]
code: def get_economic_event_ret_over_custom_event_day(
      self,
      data_frame_in,
      event_dates,
      name,
      event,
      start,
      end,
      lagged=False,
      NYC_cutoff=10,
  ):
      filter = Filter()
      event_dates = filter.filter_time_series_by_date(
          start, end, event_dates
      )
  
      data_frame = data_frame_in.copy(
          deep=True
      )  # because we change the dates!
  
      timezone = Timezone()
      calendar = Calendar()
  
      bday = CustomBusinessDay(weekmask="Mon Tue Wed Thu Fri")
  
      event_dates_nyc = (
          timezone.convert_index_from_UTC_to_new_york_time(event_dates)
      )
      average_hour_nyc = numpy.average(event_dates_nyc.index.hour)
  
      event_dates = calendar.floor_date(event_dates)
  
      # Realised is traditionally on later day eg. 3rd Jan realised ON is 2nd-3rd Jan realised
      # so if Fed meeting is on 2nd Jan later, then we need realised labelled on 3rd (so minus a day)
      # implied_vol expires on next day eg. 3rd Jan implied_vol ON is 3rd-4th Jan implied_vol
  
      # TODO smarter way of adjusting dates, as sometimes events can be before/after 10am NY cut
      if lagged and average_hour_nyc >= NYC_cutoff:
          data_frame.index = data_frame.index - bday
      elif (
          not lagged and average_hour_nyc < NYC_cutoff
      ):  # ie. implied_vol
          data_frame.index = data_frame.index + bday
  
      # set as New York time and select only those ON vols at the 10am NY cut just before the event
      data_frame_events = data_frame[event_dates.index]
      data_frame_events.columns = (
          data_frame.columns.values + "-" + name + " " + event
      )
  
      return data_frame_events
  
imports: import math
  import numpy
  from pandas.tseries.offsets import CustomBusinessDay
  from findatapy.timeseries import Calculations, Timezone, Filter, Calendar
  import datetime
  from datetime import timedelta
  import numpy
  from finmarketpy.util.marketconstants import MarketConstants
  from findatapy.market import IOEngine
  from findatapy.util import ConfigManager
  from findatapy.market import SpeedCache
  import pandas
  from findatapy.market import MarketDataGenerator, MarketDataRequest
  from findatapy.util import DataConstants, LoggerManager
label_desc: Use image node_id 2 for calling the EventStudy obj's underlying member method code with example usage: obj.get_economic_event_ret_over_custom_event_day(data_frame_in, event_dates, name, event, start, end, lagged, NYC_cutoff) and returns: data_frame_events