Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Experiment on Simple Probabilistic Model

Is the stock market really random? Can we see it as a probabilistic system where the prices rise and fall with certain possibilities in certain times? Should we really trust numbers? (This is important for quants :)

I tried (again) Apple and decided to buy if a random number between 0 and 1 is larger than the probability of price rise within the last 5 days. Note that if we assume uniform distribution, that corresponds to the fact that we buy with exactly the same probability for the price to rise the next day. I used batch transform to make the code more readable. (Thanks to Thomas for the advice)

The result turned out to be pretty nice. I tweaked the window length to 10, and it didn't change much. Seems that the market can at least be roughly treated as a probabilistic model.

1 response

HI,

How do you define the probability of price rise within last 5 days? Just trying to understand your approach to your experiment. Thanks.