What is the formula to estimate the probability of a random walk touching or exceeding a particular threshold? The threshold starts and stops at particular times. (Without starting and stopping times for the threshold, the probability would of course be 1). I am thinking of a random walk in a time-series.
Secondly, what is the formula to estimate the total probability that after the random walk has touched or exceeded the first threshold, that it will go on to touch or exceed another different threshold, which has other starting and stopping times?
Ideally I am looking for something I can use in a Linux spreadsheet or programming language.
Edit/update: The type of random walk would be Brownian motion in a time series I suppose. The random walk starts at t=0, with an initial magnitude of M1. The first threshold starts at t1 and ends at t2. The (unchanging, constant) magnitude of the threshold is M2. The second threshold has different values to the first threshold.