For beta to spy you need spy history which you can get on the download page, then open a spy position directly after lookback and close it in the EXITRUN. The beta to spy is then the total profit minus the spy profit, divided by the spy profit.