I'm using monte carlo simulation to model stock paths and measure risk, but I was wondering if there is a way to simulate the full bar/candle chart with open, high, low and close prices , as I'm only simulating the stock path with close prices.

  • 1
    $\begingroup$ easy, just simulate the intraday movements and calculate the charts from there. $\endgroup$ – MD-Tech Jul 24 '18 at 15:30
  • $\begingroup$ Why not doing one simulation for each ohlc? Other option would be to convert ohlc back into an ordered one column data series.. $\endgroup$ – trbck Jul 24 '18 at 16:09
  • $\begingroup$ It might be nice to generate the bars directly, potentially saves computation. I would think very carefully before using that as an input to something else though. $\endgroup$ – Bob Jansen Jul 24 '18 at 16:51
  • $\begingroup$ Are you just trying to synthesize pricing data? If so why not just use real data? $\endgroup$ – Brian O'Donnell Jul 24 '18 at 23:54

Some time ago I wrote an Octave C++ function to do just what you want and blogged about it on my blog. The link to the relevant post is https://dekalogblog.blogspot.com/2011/08/creation-of-synthetic-data.html where the code is freely available.

This might give you some ideas about how you might code a similar function for yourself.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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