# Counting random paths

Assume the path of a certain stock can be modeled using a binomial tree. The initial price of the stock at time $t=0$ is 1024. The upstage factor of the stock price is $x=1.25$ and downstage factor of the stock price is $y=0.8$. Assume that risk is simply compounded with $r=3\%$. Determine the price of the binary option that pays \$1 if the stock price after 50 steps is \$2500 and it never touches the barrier of \$3125. Using the random path approach, please explain why the number of paths is${50\choose24}-{50\choose28}$• How far have you gotten on your own? – user59 Apr 5 '16 at 2:34 • Pretty far. This is the only part I'm unsure of. – foshizzle Apr 5 '16 at 4:34 • Could you explain what you mean by "risk is simply compounded with$r=3\%$"? – Borun Chowdhury Apr 5 '16 at 8:34 • Risk over one time period is compounded simply at 3% – foshizzle Apr 5 '16 at 13:12 • Each path can be represented as a 50 character "word" where the only possible letters are U and D (up or down): UUDUU.....DU – noob2 Apr 5 '16 at 16:03 ## 2 Answers As I mentioned above, I am not sure what the variable$r$is. If we ignore that, or assume the questioner wanted to say its the risk free interest rate, then it has no effect on the number of paths. Then it is clear that after 50 steps going from \$1024 to \$2500 requires a net of 4 up movements with the given$x=y^{-1}=1.25$. Thus the number of steps without the barrier constraint is$\phantom{a}^{50} C_{23}$. We need to subtract from this the number of paths that cross \$3125 and yet end up on \$2500. For each such path, there is one that passes through \$3125 at the same place but then is reflected across the line \$3125 to end up on \$3906.25. In other words the reflected path has a net 6 up movements. An example of this method is shown below. The numbers used are for a different problem.

So the number of such paths is $\phantom{a}^{50} C_{28}$. However, recall these are the paths we need to exclude as they crossed the barrier.

Thus the number of paths consistent with ending up on \$2500 having never crossed \$3125 is

$$\phantom{a}^{50} C_{23}- \phantom{a}^{50} C_{28}$$

This is not the same as that asked in the question because of the difference in the first term but I suspect that is a typo.

Two hints :

The number of paths never going up to $3125$ when starting from $1024$ and stepping up by a multiplicative factor of $5/4$ and down by a multiplicative factor $4/5$

is

the same as the number of paths starting from $0$ and and stepping up by an additive factor $+1$ and stepping down by an additive factor of $-1$ and never going up to $5$

Let $E(n,m)$ be the number of paths of length $n$ such that starting from $0$ and stepping up $+1$ and stepping down $-1$, then :

$E(n,m) = E(n-1,m-1) + E(n-1,m+1)$

it is then easy to think about Pascal triangle and to look for a solution like $E(n,m)=C(n,a \times n + b \times m)$

you can verify that $E(n,m) = C(n,\frac{n+m}{2})$ will satisfy the relation ship