I am embarrassed to say, a few means about a dozen. It is a lot of work testing things manually. GBM: Geometric Brownian Motion.
You have a drift term in your code. And probably an impulse somewhere in one of the charts? I assumed zero drift.
Why do you need Kalman Filter here? You are only using GBM to generate a sim stock price and not doing any prediction or forecasting?
That is a nice thread, missed it unfortunately. My own limited study also showed a skewed distribution in a lot of equity prices, ea markets trend more than random. This is a very basic and old anomaly which isn't going to change from one to another (it would have already imo). I once saw an interesting video (Fisher) who talks about this. So my main focus is making the losses - and thus drawd - as small as possible, or even trying to flip them to slightly profitable by trading some of the edge distribution to it (basically scaling out). At some point you say: "You're basically making the assumption that when price is a certain distance away from the whatever reference point you create (in this case the average of 5 minutes), then it's unlikely that price will hit the other side of the range/reverse" this lined a bit up with some thoughts I head about ORB. When the range of ORB is proportionally smaller then the total range of the session(whatever your session) wouldn't it be logical that one can make money by selling this range and buying the larger range. More a bit of a thought excercise and not very concrete yet.