Hello Seong,
Thanks for the above code - I'm using it for diffferent purposes in one of my algos. I made a change to get the early closing days from the start of the backtest rather than the security start date but that's really cosmetic.
I'm interested in the daily closing price so I check the early closing day for hour == 13 which gave me some odd results i.e.
2008-07-03endofday_check:43DEBUG2008-07-03 17:00:00+00:00
2008-07-03endofday_check:43DEBUG2008-07-03 17:01:00+00:00
2008-11-28endofday_check:43DEBUG2008-11-28 18:00:00+00:00
2008-11-28endofday_check:43DEBUG2008-11-28 18:01:00+00:00
2008-11-28endofday_check:43DEBUG2008-11-28 18:36:00+00:00
2008-11-28endofday_check:43DEBUG2008-11-28 18:38:00+00:00
2008-12-24endofday_check:43DEBUG2008-12-24 18:00:00+00:00
2008-12-24endofday_check:43DEBUG2008-12-24 18:01:00+00:00
2009-11-27endofday_check:43DEBUG2009-11-27 18:00:00+00:00
2009-11-27endofday_check:43DEBUG2009-11-27 18:01:00+00:00
2009-12-24endofday_check:43DEBUG2009-12-24 18:00:00+00:00
2009-12-24endofday_check:43DEBUG2009-12-24 18:01:00+00:00
2009-12-24endofday_check:43DEBUG2009-12-24 18:17:00+00:00
2010-11-26endofday_check:43DEBUG2010-11-26 18:00:00+00:00
2010-11-26endofday_check:43DEBUG2010-11-26 18:01:00+00:00
2010-11-26endofday_check:43DEBUG2010-11-26 18:05:00+00:00
2010-11-26endofday_check:43DEBUG2010-11-26 18:06:00+00:00
2011-11-25endofday_check:43DEBUG2011-11-25 18:00:00+00:00
2011-11-25endofday_check:43DEBUG2011-11-25 18:01:00+00:00
2011-11-25endofday_check:43DEBUG2011-11-25 18:16:00+00:00
2012-07-03endofday_check:43DEBUG2012-07-03 17:00:00+00:00
2012-07-03endofday_check:43DEBUG2012-07-03 17:01:00+00:00
2012-11-23endofday_check:43DEBUG2012-11-23 18:00:00+00:00
2012-11-23endofday_check:43DEBUG2012-11-23 18:01:00+00:00
2012-12-24endofday_check:43DEBUG2012-12-24 18:00:00+00:00
2012-12-24endofday_check:43DEBUG2012-12-24 18:01:00+00:00
2013-07-03endofday_check:43DEBUG2013-07-03 17:00:00+00:00
2013-07-03endofday_check:43DEBUG2013-07-03 17:01:00+00:00
End of logs.
This suggests there is data on these days after the official close. (The timestamps are GMT as I am in the UK.)
P.