def sz_margins(start=None, end=None, retry_count=3, pause=0.001):
 data = pd.DataFrame()
 if ((start is None) and (end is None)):
  end = du.today()
  start = du.day_last_week()
 if ((start is None) or (end is None)):
  ct._write_msg(rv.MAR_SZ_HZ_MSG2)
  return None
 try:
  date_range = pd.date_range(start=start, end=end, freq='B')
  if (len(date_range) > 261):
   ct._write_msg(rv.MAR_SZ_HZ_MSG)
  else:
   ct._write_head()
   for date in date_range:
    data = data.append(_sz_hz(str(date.date()), retry_count, pause))
 except:
  ct._write_msg(ct.DATA_INPUT_ERROR_MSG)
 else:
  return data

def sz_margins ( start = None , end = None , retry_count = 3 , pause = 0.001 ) : data = pd . DataFrame ( ) if ( ( start is None ) and ( end is None ) ) : end = du . today ( ) start = du . day_last_week ( ) if ( ( start is None ) or ( end is None ) ) : ct . _write_msg ( rv . MAR_SZ_HZ_MSG2 ) return None try : date_range = pd . date_range ( start = start , end = end , freq = 'B' ) if ( len ( date_range ) > 261 ) : ct . _write_msg ( rv . MAR_SZ_HZ_MSG ) else : ct . _write_head ( ) for date in date_range : data = data . append ( _sz_hz ( str ( date . date ( ) ) , retry_count , pause ) ) except : ct . _write_msg ( ct . DATA_INPUT_ERROR_MSG ) else : return data
parameters start:string 开始日期 format：yyyy-mm-dd 默认为上一周的今天 end:string 结束日期 format：yyyy-mm-dd 默认为今日 retry_count : int .