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_intraday_moves_over_custom_event(
      self,
      data_frame_rets,
      ef_time_frame,
      vol=False,
      minute_start=5,
      mins=3 * 60,
      min_offset=0,
      create_index=False,
      resample=False,
      freq="minutes",
      cumsum=True,
      adj_cumsum_zero_point=False,
      adj_zero_point=2,
  ):
      filter = Filter()
  
      ef_time_frame = filter.filter_time_series_by_date(
          data_frame_rets.index[0],
          data_frame_rets.index[-1],
          ef_time_frame,
      )
      ef_time = ef_time_frame.index
  
      if freq == "minutes":
          ef_time_start = ef_time - timedelta(minutes=minute_start)
          ef_time_end = ef_time + timedelta(minutes=mins)
          ann_factor = 252 * 1440
      elif freq == "days":
          ef_time = ef_time_frame.index.normalize()
          ef_time_start = (
              ef_time
              - pandas.tseries.offsets.BusinessDay() * minute_start
          )
          ef_time_end = (
              ef_time + pandas.tseries.offsets.BusinessDay() * mins
          )
          ann_factor = 252
      elif freq == "weeks":
          ef_time = ef_time_frame.index.normalize()
          ef_time_start = (
              ef_time - pandas.tseries.offsets.Week() * minute_start
          )
          ef_time_end = ef_time + pandas.tseries.offsets.Week() * mins
          ann_factor = 52
  
      ords = list(range(-minute_start + min_offset, mins + min_offset))
      lst_ords = list(ords)
  
      # All data needs to be equally spaced
      if resample:
          # Make sure time series is properly sampled at 1 min intervals
          if freq == "minutes":
              data_frame_rets = data_frame_rets.resample("1min").last()
              data_frame_rets = data_frame_rets.fillna(value=0)
              data_frame_rets = filter.remove_out_FX_out_of_hours(
                  data_frame_rets
              )
          elif freq == "daily":
              data_frame_rets = data_frame_rets.resample("B").last()
              data_frame_rets = data_frame_rets.fillna(value=0)
          elif freq == "weekly":
              data_frame_rets = data_frame_rets.resample("W").last()
              data_frame_rets = data_frame_rets.fillna(value=0)
  
      start_index = data_frame_rets.index.searchsorted(ef_time_start)
      finish_index = data_frame_rets.index.searchsorted(ef_time_end)
  
      data_frame = pandas.DataFrame(
          index=ords, columns=ef_time_frame.index
      )
  
      for i in range(0, len(ef_time_frame.index)):
          vals = data_frame_rets.iloc[
              start_index[i] : finish_index[i]
          ].values
  
          st = ef_time_start[i]
          en = ef_time_end[i]
  
          # Add extra "future" history in case we are doing an event study which goes outside our data window
          # (will just be filled with NaN)
          if len(vals) < len(lst_ords):
              extend = np.zeros((len(lst_ords) - len(vals), 1)) * np.nan
  
              # If start window date is before we have data
              if st < data_frame_rets.index[0]:
                  vals = np.append(extend, vals)
  
              # If end date window is after we have data
              else:
                  vals = np.append(vals, extend)
  
          data_frame[ef_time_frame.index[i]] = vals
  
      data_frame.index.names = [None]
  
      if create_index:
          calculations = Calculations()
          data_frame.iloc[-minute_start + min_offset] = numpy.nan
          data_frame = calculations.create_mult_index(data_frame)
      else:
          if vol is True:
              # Annualise (if vol)
              data_frame = data_frame.rolling(
                  center=False, window=5
              ).std() * math.sqrt(ann_factor)
          elif cumsum:
              data_frame = data_frame.cumsum()
  
              # Adjust DataFrame so zero point shows zero returns
              if adj_cumsum_zero_point:
                  ind = abs(minute_start) - adj_zero_point
  
                  for i, c in enumerate(data_frame.columns):
                      data_frame[c] = (
                          data_frame[c] - data_frame[c].values[ind]
                      )
  
      return data_frame
  
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 5 for calling the EventStudy obj's underlying member method code with example usage: obj.get_intraday_moves_over_custom_event(data_frame_rets, ef_time_frame, vol, minute_start, mins, min_offset, create_index, resample, freq, cumsum, adj_cumsum_zero_point, adj_zero_point) and returns: data_frame