Time series analysis of tick data
<p>I'm trying to do some statistical analysis of market data and have managed to get the tick data from my trading platform into a python data frame in the format shown below.  </p>

<p>I need to run a test to see how often does the day session (09:30-16:15) equal or exceed the high or low printed in the rest of the session (16:15 - 09:30).  Can anyone help me with this please?</p>

<pre><code>print (df.iloc[85:95])
                              Price  bidVol  askVol
2015-12-28 08:39:12.000000  2041.00       2       0
2015-12-28 08:39:12.001000  2041.00       1       0
2015-12-28 08:47:19.000000  2041.25       0       2
2015-12-28 09:18:00.999999  2040.25       0       5
2015-12-28 09:33:30.000000  2039.75       0       1
2015-12-28 09:35:58.000000  2039.75       0       5
2015-12-28 09:44:35.000000  2039.75       1       0
2015-12-28 09:58:39.999999  2039.00       0       1
2015-12-28 09:58:55.000000  2039.25       1       0
2015-12-28 10:02:59.000000  2038.50       1       0
</code></pre>

<p>Desired output:</p>

<pre><code>high 2015-12-28  True or False
low  2015-12-28  True or False
</code></pre>

<p>I try:</p>

<pre><code>#Define day and night session and apply to tick data 
daystart = datetime.time(9,30,0) 
dayend = datetime.time(16,14,59) 
day_session = pd.between_time(start,end) 
night_session = pd.between_time(end,start) 
#Resample using daily timeframe 
day_session.resample('D', how='ohlc') 
night_session.resample('D', how='ohlc')
</code></pre>

<p><a href="https://dl.dropboxusercontent.com/u/32282382/tubus.h5" rel="nofollow">All data</a>.</p>