Hi, this may be a classical or a rather simple problem. I am looking to build a pairs trade using futures contracts that have monthly expiries. An obvious question is how to deal with expiration aside from the fact that I need to roll any expiring positions. My question is basically around setting up the backtest and an efficient execution. One idea could be to make sure that my out of sample period never straddles my expiration point. In other words, since I need to liquidate my positions at the end of out of sample period and also at the end of expiration, I can take care of both of these by building a strategy from expiry to expiry. I am not sure if I was clear, but please let me know if I wasn't and if yes, please offer any advice or suggestions.