I am developing a mean reversion pairs trading strategy using tick data for each asset.
The tick data does not come in fixed intervals. For example it looks something like the below:
The timestamp is the UNIX timestamp.
To calculate the spread between my assets, I first check that the two timestamps match, and then subtract the bid on one asset from the ask on the other.
I am having to ignore a lot of the data as a lot of the time the timestamps between my two assets do not match.
One way around this would be to plot a time-series with one second intervals and interpolate the missing data.
The strategy I want to use is to open a position when the price spread between the two assets reaches x standard deviations from the mean.
Is there anything wrong with my current method of matching timestamps and not treating the data as a time-series but as a series of time-synchronised data?