crflynn / stochastic

Generate realizations of stochastic processes in python.
http://stochastic.readthedocs.io/en/stable/
MIT License
451 stars 80 forks source link

Generating many samples #51

Open hagerpa opened 3 years ago

hagerpa commented 3 years ago

Hi all, and thank you for the great package!

When one is interested in generating samples of stochastic processes for Monte Carlo methods and Machine Learning tasks it is essential to create many samples of the underlying process. The way the package is designed, this is very inefficient and doesn't exploit the power of numpy. (Using the package, you have to essentially iterate in a python loop for something like 1M+ times). These are the tasks I am working on the most (they are particularly important in mathematical finance applications) and I was thinking about publishing some of the code that I have collected so far. But before doing so, I was wondering if there is interest in updating this project to be more efficient for generating many samples. In that case a would be happy to help (e.g. I have a Cython implementation of Hosking's method).

crflynn commented 3 years ago

Hi @hagerpa. That sounds like a great idea and one that I agree would be worth pursuing/supporting here.

CommonClimate commented 1 year ago

+1 for a way to vectorize the generation of samples