4 ms·
Show HN: Stochastic – JavaScript library for simulating stochastic processes
- Chronic29 12y agoThis package has very, very few and mostly useless features.
- rwinn 12y agoI want to see some demos using this!
- dy 12y agoNice work Nathan!
- deleted 12y ago[deleted]
- nepstein 12y agoIt looks like you're referring to the (equivalent) polar form. I'm using the 'Basic Form'. http://en.wikipedia.org/wiki/Box%E2%80%93Muller_transform#Basic_form http://en.wikipedia.org/wiki/Box%E2%80%93Muller_transform#Ba...
- _raoulcousins 12y agoThat was a fast delete! I was trying to reply that the form in your code is detailed in the excellent book Simulation Modeling and Analysis by Law (previous editions by Law and Kelton. I'm sure there's a story there...)
- oznathan 12y agoAwesome, going to use it in my trading bot. Thanks!
- jonpaul 12y agoShameless plug: if you're looking for something similar with a little more practical use cases: https://github.com/jprichardson/stochasm https://github.com/jprichardson/stochasm which is a fork of the great https://github.com/heydenberk/stochator https://github.com/heydenberk/stochator
- mturmon 12y agoAt line 116: if (sum != 1){ return false; where you're checking that the transition matrix sums to one across the rows, I think you can have problems due to finite precision. The sum can be epsilon different than unity. A reasonable check would be that abs(1-sum) < n*eps where eps is the floating-point precision (say, 4e-16). In fact, a strict check like this can sometimes be annoying because you might save or transmit the values in a JSON format with less than full precision.
- graycat 12y agoConsider also continuous time, second order stationary of known power spectra, say, for dimension integer n > 0. For n > 1, consider Brillinger's book on time series. Then, sure, bring along some FFT code.