確定它是否在季度末以及其週三以來的7天內。
fortnight = pd.Timedelta(14, unit='D')
week = pd.Timedelta(7, unit='D')
since_qe = index_dates - (index_dates - pd.offsets.QuarterEnd())
wed = index_dates.weekday == 2
index_dates[(week < since_qe) & (since_qe < fortnight) & wed]
DatetimeIndex(['2001-01-10', '2001-04-11', '2001-07-11', '2001-10-10',
'2002-01-09', '2002-04-10', '2002-07-10', '2002-10-09',
'2003-01-08', '2003-04-09', '2003-07-09', '2003-10-08',
'2004-10-13', '2005-01-12', '2005-04-13', '2005-07-13',
'2005-10-12', '2006-01-11', '2006-04-12', '2006-07-12',
'2006-10-11', '2007-01-10', '2007-04-11', '2007-07-11',
'2007-10-10', '2008-01-09', '2008-04-09', '2008-07-09',
'2008-10-08', '2009-04-08', '2009-07-08', '2010-01-13',
'2010-10-13', '2011-01-12', '2011-04-13', '2011-07-13',
'2011-10-12', '2012-01-11', '2012-04-11', '2012-07-11',
'2012-10-10', '2013-01-09', '2013-04-10', '2013-07-10',
'2013-10-09', '2014-01-08', '2014-04-09', '2014-07-09',
'2014-10-08', '2015-04-08', '2015-07-08', '2016-01-13',
'2016-04-13', '2016-07-13', '2016-10-12', '2017-01-11',
'2017-04-12', '2017-07-12'],
dtype='datetime64[ns]', freq=None)