code: def build_trading_timeline(start, end):
      ''' Build the daily-based index we will trade on '''
      EMPTY_DATES = pd.date_range('2000/01/01', periods=0, tz=pytz.utc)
      now = dt.datetime.now(tz=pytz.utc)
      if not start:
          if not end:
              bt_dates = EMPTY_DATES
              live_dates = pd.date_range(
                  start=now,
                  end=normalize_date_format('23h59'))
          else:
              end = normalize_date_format(end)
              if end < now:
                  bt_dates = pd.date_range(
                      start=end - 360 * pd.datetools.day,
                      end=end)
                  live_dates = EMPTY_DATES
              elif end > now:
                  bt_dates = EMPTY_DATES
                  live_dates = pd.date_range(start=now, end=end)
      else:
          start = normalize_date_format(start)
          if start < now:
              if not end:
                  end = start + 360 * pd.datetools.day
                  if end > now:
                      end = now - pd.datetools.day
                  live_dates = EMPTY_DATES
                  bt_dates = pd.date_range(
                      start=start, end=end)
              else:
                  end = normalize_date_format(end)
                  if end < now:
                      live_dates = EMPTY_DATES
                      bt_dates = pd.date_range(start=start, end=end)
                  elif end > now:
                      bt_dates = pd.date_range(
                          start=start, end=now - pd.datetools.day)
                      live_dates = pd.date_range(start=now, end=end)
          elif start > now:
              if not end:
                  bt_dates = EMPTY_DATES
                  live_dates = pd.date_range(
                      start=start,
                      end=normalize_date_format('23h59'))
              else:
                  end = normalize_date_format(end)
                  bt_dates = EMPTY_DATES
                  live_dates = pd.date_range(start=start, end=end)
      return bt_dates + live_dates