To roll, I use the past year's history of rolls as general guidelines. So, if an instrument rolled on March 15th 2017, on March 1st 2018, I will start looking at the volume and the ba spread of the logical next contract. Once the ba spread and volume of the next contract are fairly close to the one I'm holding, which would probably be close to March 15th 2018, I elect to roll. I have a separate python program that gathers prices each day from the quadl api. So, I can tell it to roll, and I specify the new contract I will be holding, as well as the next carry contract, with which I'll measure carry. The program then starts collecting the prices on the new contracts, each day. For the continuous price csv file, the program takes the prior day's price of the new contract minus the prior day's price of the old contract and adds the result to every historical price (before the date of the roll) in the continuous price series. I believe this is the correct implementation of the Panama method, which GAT recommends.