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_surprise_against_intraday_moves_over_custom_event(
      self,
      data_frame_cross_orig,
      ef_time_frame,
      cross,
      event_fx,
      event_name,
      start,
      end,
      offset_list=[1, 5, 30, 60],
      add_surprise=False,
      surprise_field="survey-average",
      freq="minutes",
  ):
      ticker = event_fx + "-" + event_name + ".release-date-time-full"
  
      data_frame_agg = None
      data_frame_cross_orig = data_frame_cross_orig.resample(
          "T"
      ).mean()  # resample to minute freq - in case there are missing values
  
      ef_time_start = ef_time_frame[ticker] - timedelta(
          minutes=1
      )  # start time
      indices_start = data_frame_cross_orig.index.isin(ef_time_start)
  
      for offset in offset_list:
          data_frame_cross = data_frame_cross_orig
  
          ef_time = ef_time_frame[ticker] + timedelta(
              minutes=offset - 1
          )  # end time
  
          # calculate returns over the x min event
          indices = data_frame_cross.index.isin(ef_time)
          col_dates = data_frame_cross.index[indices]
  
          col_rets = (data_frame_cross.iloc[indices].values) / (
              data_frame_cross.iloc[indices_start].values
          ) - 1
  
          mkt_moves = pandas.DataFrame(index=col_dates)
          mkt_moves[cross + " " + str(offset) + "m move"] = col_rets
          mkt_moves.index.name = ticker
          mkt_moves.index = col_dates - timedelta(minutes=offset - 1)
  
          data_frame = ef_time_frame.join(
              mkt_moves, on=ticker, how="inner"
          )
          temp_index = data_frame[ticker]
  
          spot_moves_list = []
  
          if data_frame_agg is None:
              data_frame_agg = data_frame
          else:
              label = cross + " " + str(offset) + "m move"
              spot_moves_list.append(label)
              data_frame = data_frame[label]
              data_frame.index = temp_index
              data_frame_agg = data_frame_agg.join(
                  data_frame, on=ticker, how="inner"
              )
  
      if add_surprise == True:
          data_frame_agg[event_fx + "-" + event_name + ".surprise"] = (
              data_frame_agg[
                  event_fx + "-" + event_name + ".actual-release"
              ]
              - data_frame_agg[
                  event_fx + "-" + event_name + "." + surprise_field
              ]
          )
  
      return data_frame_agg
  
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 6 for calling the EventStudy obj's underlying member method code with example usage: obj.get_surprise_against_intraday_moves_over_custom_event(data_frame_cross_orig, ef_time_frame, cross, event_fx, event_name, start, end, offset_list, add_surprise, surprise_field, freq) and returns: data_frame_agg