I have some market data (daily time series) for bond prices and CDS indices and I would like to generate synthetic versions of these which are statistically "similar" for testing trading strategies. Is there literature on this subject?

  • $\begingroup$ We had another question about synthetic data a few weeks ago, but it doesn't seem to have gone very far. The correlations in historical data that traders rely on are very difficult to reproduce. $\endgroup$ Commented Sep 5, 2011 at 19:19
  • $\begingroup$ @chrisaycock the previous question was about FX tick data simulation, bonds and CDS at a daily frequency is a completely different question. $\endgroup$ Commented Sep 5, 2011 at 23:50

3 Answers 3


Yes, there is in fact a whole literature on this subject coming from the field of non-linear dynamics-- it is known as the method of surrogates. The idea is essentially to come up with a "scrambled" version of your original data set that preserves many of the basic statistical properties, though perhaps not the serial dependence structure which might be important for your purposes. I think the best way to do this is to apply a Fourier transform to your data to re-express it in the frequency domain, and then randomly shuffle the data in that form, then convert back by applying the inverse transformation. This Matlab code from the FileExchange does exactly that:



The easiest answer which comes to my mind is generating correlated time series.

There is a good description of the process in Part 3 of this document :


If you base your correlation input on the correlation observed in the market data you should obtain "statistically" similar time series.

  • $\begingroup$ Thanks for the answer. I was actually hoping there would be a way of manipulating the market data that I have in a deterministic way (such as, say, taking the first difference between consecutive values and swapping these around) rather than extracting statistical information about the time series e.g. autocorrelation and then generating a new random variables etc. to get a new time series. $\endgroup$
    – mathman
    Commented Sep 6, 2011 at 7:33
  • 1
    $\begingroup$ That would be overfitting, you need to generate new random variables imho $\endgroup$
    – Lliane
    Commented Sep 6, 2011 at 8:09

In response to this question, I posted an answer which in turn links to a post on my blog which uses the Fast Fourier Transform to create synthetic prices, in a similar vein to the code linked to in Doodles' answer above. The example screen shots in my blog post show terminal output which indicate high statistical similarity between the original time series and the synthetic series generated from it.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.