code: def _test_asset_IPOed_same_day(self):
      # gotta get some minute data up in here.
      # add sid 4 for a couple of days
      minutes = self.trading_calendar.minutes_for_sessions_in_range(
          self.sim_params.sessions[0], self.sim_params.sessions[5]
      )
  
      tmp_reader = tmp_bcolz_equity_minute_bar_reader(
          self.trading_calendar,
          self.trading_calendar.all_sessions,
          create_minute_bar_data(minutes, [2]),
      )
      with tmp_reader as reader:
          data_portal = DataPortal(
              self.env.asset_finder,
              self.trading_calendar,
              first_trading_day=reader.first_trading_day,
              equity_minute_reader=reader,
              equity_daily_reader=self.bcolz_equity_daily_bar_reader,
              adjustment_reader=self.adjustment_reader,
          )
  
          source = BenchmarkSource(
              self.env.asset_finder.retrieve_asset(2),
              self.trading_calendar,
              self.sim_params.sessions,
              data_portal,
          )
  
          days_to_use = self.sim_params.sessions
  
          # first value should be 0.0, coming from daily data
          self.assertAlmostEquals(0.0, source.get_value(days_to_use[0]))
  
          manually_calculated = data_portal.get_history_window(
              [2],
              days_to_use[-1],
              len(days_to_use),
              "1d",
              "close",
              "daily",
          )[2].pct_change()
  
          for idx, day in enumerate(days_to_use[1:]):
              self.assertEqual(
                  source.get_value(day), manually_calculated[idx + 1]
              )
  
file_path: catalyst/tests/test_benchmark.py
imports: import numpy
  import pandas
  from pandas.util.testing import assert_series_equal
  from catalyst.data.data_portal import DataPortal
  from catalyst.errors import BenchmarkAssetNotAvailableTooEarly, BenchmarkAssetNotAvailableTooLate, InvalidBenchmarkAsset
  from catalyst.sources.benchmark_source import BenchmarkSource
  from catalyst.testing import MockDailyBarReader, create_minute_bar_data, tmp_bcolz_equity_minute_bar_reader
  from catalyst.testing.fixtures import WithDataPortal, WithSimParams, WithTradingCalendars, CatalystTestCase
label_desc: Use image node_id 6 for calling the TestBenchmark obj's underlying member method code with example usage: obj._test_asset_IPOed_same_day() without return types