# how to simulate a markov chain?

3 views (last 30 days)
Hilde on 16 Oct 2013
Answered: Jonathan LeSage on 16 Oct 2013
we have a geometric random walk for modeling the behavior of the price of a stock over time. state space is 1,02^j with j from -100 to 100. initial price is p(0) = 1. if p(t) = 1,02^100 then p(t+1) = 1,02^99. if p(t) = 1,02^-100, then p(t+1) = 1,02^-99 with probability 0,99, and the price remains unchanged with probability 0,01- our question is: how do we write a code to simulate the process?
##### 0 CommentsShow -2 older commentsHide -2 older comments

Sign in to comment.

### Answers (1)

Jonathan LeSage on 16 Oct 2013
From what I gather from you description, this question has already been answered:
##### 0 CommentsShow -2 older commentsHide -2 older comments

Sign in to comment.

### Categories

Find more on Stochastic Differential Equation (SDE) Models in Help Center and File Exchange

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!