I am using some leveraged ETFs for backtesting but they are fairly recent creations.  I would love to include tests like the tech bubble and the great recession.  It seems fairly straightforward to simulate the data of SPXL by simply following the performance of something like SPY.  I imagine there are 2 approaches:

  1. Precompute. Create my own custom data files which import minute data from SPY, but modified to simulate the daily leveraged results.  But where can I get this data? 
  2. Compute at runtime.  Somehow create a ‘dynamic’ equity, which would take in the minute data from SPY and do the calculations on the fly.  

 

Has anyone tried this, or is there a different way I'm not aware of?