Scenario
In quantitative trading and quantitative research, candidates are frequently evaluated on probability modeling, specifically regarding Markov Chains / Stationary Distributions.
Your Task
Consider a discrete-time random walk on the finite state space S={0,1,…,N}. From state i∈{1,…,N−1}, the walk moves to i+1 with probability p and to i−1 with probability q=1−p. The boundaries are reflecting:
- From state 0, the walk moves to state 1 with probability 1.
- From state N, the walk moves to state N−1 with probability 1.
Derive the stationary distribution π=(π0,π1,…,πN).
Constraints
- Transitions and increments satisfy the Markov or martingale property with respect to natural filtration.
- Stopping times are almost surely finite.