Jump to content

Stochastic mathematics in application to finance


Dhamnekar Win,odd

Recommended Posts

Get your friends and family to play this simple little game that illustrates a key aspect of stochastic mathematics in application to finance.

1. Draw on a big sheet of paper a sequence of 30 squares and label them consecutively 0 (bankrupt), 1, 1, 2, 2, 3, 3, 4, . . . , 14, 14, 15 (millionairedom). Each of these squares represents one state in a 30-state Markov chain. Imagine each state represents the value of some asset such as the value of a small business that each player is managing.

2. Give each player a token and a six-sided die.

3. At the start place each token on the second “2”, the fifth state. Imagine this corresponds to the small business having an initial value of $200,000.

4. Each turn in the game corresponds to, say, one year in time. In each year the business may be poor or may grow. Thus in each turn each player rolls his/her die and moves according to the following rules:

• If a player rolls a 1 or 2, then he/she moves down some states;

• if a player rolls a 3, he/she stays in the same state;

• if a player rolls a 4, 5, or 6, he/she moves up some states.

But the number of states (squares) a player moves is given by the number written in each square. Thus in the first move, because the fifth square/state is a “2,” a player moving up moves from the fifth square to the seventh square, and a player moving down moves to the third square.

That the number written in each square is (roughly) proportional to the position of the square in the sequence corresponds to the financial reality that small businesses usually grow/shrink by small amounts, whereas large companies grow/shrink by large amounts. Investors expect returns in proportion to their investments.

5. Each player continues to role his/her die and move until reaching 0 or 15. That is, players continue to operate their businesses until they either go bankrupt or reach millionairedom.

Questions:

1. Why do you expect each business to grow? That is, why do you expect each player to reach the “millionairedom” state?

2. When you play the game, roughly what proportion of players reach millionairedom? What proportion go bankrupt?

3. How do you explain the actual results?


How would you answer all the above three questions?

What are your answers to all of these above three questions?

How can I write a program in R or in Octave to simulate this game?

Edited by Dhamnekar Win,odd
Link to comment
Share on other sites

On 1/17/2023 at 6:59 AM, Dhamnekar Win,odd said:

How can I write a program in R or in Octave to simulate this game?

R? Octave? Never heard of.. ;)

Write it in C/C++/Java/JavaScript or so..

On 1/17/2023 at 6:59 AM, Dhamnekar Win,odd said:

How can I write a program in [...] to simulate this game?

Write in a computer language you know.

Where is the problem?

 

On 1/17/2023 at 6:59 AM, Dhamnekar Win,odd said:

How would you answer all the above three questions?

The homework section of this forum is not for answering questions.. it is meant to help you figure things out on your own..

Link to comment
Share on other sites

My answer:

As each one of the 30 squares represents one state of the 30-stateMarkov chain, I prepared the transition matrix 'x' in octave. Here is matrix 'x'..

>> x
x =

 Columns 1 through 14:

   1.0000        0        0        0        0        0        0        0        0        0        0        0        0        0
   0.3333   0.1667   0.5000        0        0        0        0        0        0        0        0        0        0        0
        0   0.3333   0.1667   0.5000        0        0        0        0        0        0        0        0        0        0
        0   0.3333        0   0.1667        0   0.5000        0        0        0        0        0        0        0        0
        0        0   0.3333        0   0.1667        0   0.5000        0        0        0        0        0        0        0
        0        0   0.3333        0        0   0.1667        0        0   0.5000        0        0        0        0        0
        0        0        0   0.3333        0        0   0.1667        0        0   0.5000        0        0        0        0
        0        0        0   0.3333        0        0        0   0.1667        0        0        0   0.5000        0        0
        0        0        0        0   0.3333        0        0        0   0.1667        0        0        0   0.5000        0
        0        0        0        0   0.3333        0        0        0        0   0.1667        0        0        0        0
        0        0        0        0        0   0.3333        0        0        0        0   0.1667        0        0        0
        0        0        0        0        0   0.3333        0        0        0        0        0   0.1667        0        0
        0        0        0        0        0        0   0.3333        0        0        0        0        0   0.1667        0
        0        0        0        0        0        0   0.3333        0        0        0        0        0        0   0.1667
        0        0        0        0        0        0        0   0.3333        0        0        0        0        0        0
        0        0        0        0        0        0        0   0.3333        0        0        0        0        0        0
        0        0        0        0        0        0        0        0   0.3333        0        0        0        0        0
        0        0        0        0        0        0        0        0   0.3333        0        0        0        0        0
        0        0        0        0        0        0        0        0        0   0.3333        0        0        0        0
        0        0        0        0        0        0        0        0        0   0.3333        0        0        0        0
        0        0        0        0        0        0        0        0        0        0   0.3333        0        0        0
        0        0        0        0        0        0        0        0        0        0   0.3333        0        0        0
        0        0        0        0        0        0        0        0        0        0        0   0.3333        0        0
        0        0        0        0        0        0        0        0        0        0        0   0.3333        0        0
        0        0        0        0        0        0        0        0        0        0        0        0   0.3333        0
        0        0        0        0        0        0        0        0        0        0        0        0   0.3333        0
        0        0        0        0        0        0        0        0        0        0        0        0        0   0.3333
        0        0        0        0        0        0        0        0        0        0        0        0        0   0.3333
        0        0        0        0        0        0        0        0        0        0        0        0        0        0
        0        0        0        0        0        0        0        0        0        0        0        0        0        0

 Columns 15 through 28:
        0        0        0        0        0        0        0        0        0        0        0        0        0        0
        0        0        0        0        0        0        0        0        0        0        0        0        0        0
        0        0        0        0        0        0        0        0        0        0        0        0        0        0
        0        0        0        0        0        0        0        0        0        0        0        0        0        0
        0        0        0        0        0        0        0        0        0        0        0        0        0        0
        0        0        0        0        0        0        0        0        0        0        0        0        0        0
        0        0        0        0        0        0        0        0        0        0        0        0        0        0
        0        0        0        0        0        0        0        0        0        0        0        0        0        0
        0        0        0        0        0        0        0        0        0        0        0        0        0        0
   0.5000        0        0        0        0        0        0        0        0        0        0        0        0        0
        0   0.5000        0        0        0        0        0        0        0        0        0        0        0        0
        0        0        0   0.5000        0        0        0        0        0        0        0        0        0        0
        0        0        0        0   0.5000        0        0        0        0        0        0        0        0        0
        0        0        0        0        0        0   0.5000        0        0        0        0        0        0        0
   0.1667        0        0        0        0        0        0   0.5000        0        0        0        0        0        0
        0   0.1667        0        0        0        0        0        0        0   0.5000        0        0        0        0
        0        0   0.1667        0        0        0        0        0        0        0   0.5000        0        0        0
        0        0        0   0.1667        0        0        0        0        0        0        0        0   0.5000        0
        0        0        0        0   0.1667        0        0        0        0        0        0        0        0   0.5000
        0        0        0        0        0   0.1667        0        0        0        0        0        0        0        0
        0        0        0        0        0        0   0.1667        0        0        0        0        0        0        0
        0        0        0        0        0        0        0   0.1667        0        0        0        0        0        0
        0        0        0        0        0        0        0        0   0.1667        0        0        0        0        0
        0        0        0        0        0        0        0        0        0   0.1667        0        0        0        0
        0        0        0        0        0        0        0        0        0        0   0.1667        0        0        0
        0        0        0        0        0        0        0        0        0        0        0   0.1667        0        0
        0        0        0        0        0        0        0        0        0        0        0        0   0.1667        0
        0        0        0        0        0        0        0        0        0        0        0        0        0   0.1667
   0.3333        0        0        0        0        0        0        0        0        0        0        0        0        0
        0        0        0        0        0        0        0        0        0        0        0        0        0        0
Columns 29 and 30:

        0        0
        0        0
        0        0
        0        0
        0        0
        0        0
        0        0
        0        0
        0        0
        0        0
        0        0
        0        0
        0        0
        0        0
        0        0
        0        0
        0        0
        0        0
        0        0
        0   0.5000
        0   0.5000
        0   0.5000
        0   0.5000
        0   0.5000
        0   0.5000
        0   0.5000
        0   0.5000
        0   0.5000
   0.1667   0.5000
        0   1.0000


        
        
        >> x^1000
ans =

 Columns 1 through 14:

   1.0000        0        0        0        0        0        0        0        0        0        0        0        0        0
   0.8536   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000
   0.7561   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000
   0.6910   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000
   0.6235   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000
   0.5826   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000
   0.5351   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000
   0.5105   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000
   0.4670   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000
   0.4312   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000
   0.4117   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000
   0.3902   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000
   0.3626   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000
   0.3129   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000
   0.3030   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000
   0.2978   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000
   0.2738   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000
   0.2619   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000
   0.2476   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000
   0.1725   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000
   0.1647   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000
   0.1647   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000
   0.1561   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000
   0.1561   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000
   0.1450   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000
   0.1450   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000
   0.1252   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000
   0.1252   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000
   0.1212   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000   0.0000
        0        0        0        0        0        0        0        0        0        0        0        0        0        0
 Columns 15 through 28:

        0        0        0        0        0        0        0        0        0        0        0        0        0        0
   0.0000   0.0000        0   0.0000   0.0000        0   0.0000   0.0000        0   0.0000        0        0   0.0000   0.0000
   0.0000   0.0000        0   0.0000   0.0000        0   0.0000   0.0000        0   0.0000        0        0   0.0000   0.0000
   0.0000   0.0000        0   0.0000   0.0000        0   0.0000   0.0000        0   0.0000        0        0   0.0000   0.0000
   0.0000   0.0000        0   0.0000   0.0000        0   0.0000   0.0000        0   0.0000        0        0   0.0000   0.0000
   0.0000   0.0000        0   0.0000   0.0000        0   0.0000   0.0000        0   0.0000        0        0   0.0000   0.0000
   0.0000   0.0000        0   0.0000   0.0000        0   0.0000   0.0000        0   0.0000        0        0   0.0000   0.0000
   0.0000   0.0000        0   0.0000   0.0000        0   0.0000   0.0000        0   0.0000        0        0   0.0000   0.0000
   0.0000   0.0000        0   0.0000   0.0000        0   0.0000   0.0000        0   0.0000        0        0   0.0000   0.0000
   0.0000   0.0000        0   0.0000   0.0000        0   0.0000   0.0000        0   0.0000        0        0   0.0000   0.0000
   0.0000   0.0000        0   0.0000   0.0000        0   0.0000   0.0000        0   0.0000        0        0   0.0000   0.0000
   0.0000   0.0000        0   0.0000   0.0000        0   0.0000   0.0000        0   0.0000        0        0   0.0000   0.0000
   0.0000   0.0000        0   0.0000   0.0000        0   0.0000   0.0000        0   0.0000        0        0   0.0000   0.0000
   0.0000   0.0000        0   0.0000   0.0000        0   0.0000   0.0000        0   0.0000        0        0   0.0000   0.0000
   0.0000   0.0000        0   0.0000   0.0000        0   0.0000   0.0000        0   0.0000        0        0   0.0000   0.0000
   0.0000   0.0000        0   0.0000   0.0000        0   0.0000   0.0000        0   0.0000        0        0   0.0000   0.0000
   0.0000   0.0000        0   0.0000   0.0000        0   0.0000   0.0000        0   0.0000        0        0   0.0000   0.0000
   0.0000   0.0000        0   0.0000   0.0000        0   0.0000   0.0000        0   0.0000        0        0   0.0000   0.0000
   0.0000   0.0000        0   0.0000   0.0000        0   0.0000   0.0000        0   0.0000        0        0   0.0000   0.0000
   0.0000   0.0000        0   0.0000   0.0000        0   0.0000   0.0000        0   0.0000        0        0   0.0000   0.0000
   0.0000   0.0000        0   0.0000   0.0000        0   0.0000   0.0000        0   0.0000        0        0   0.0000   0.0000
   0.0000   0.0000        0   0.0000   0.0000        0   0.0000   0.0000        0   0.0000        0        0   0.0000   0.0000
   0.0000   0.0000        0   0.0000   0.0000        0   0.0000   0.0000        0   0.0000        0        0   0.0000   0.0000
   0.0000   0.0000        0   0.0000   0.0000        0   0.0000   0.0000        0   0.0000        0        0   0.0000   0.0000
   0.0000   0.0000        0   0.0000   0.0000        0   0.0000   0.0000        0   0.0000        0        0   0.0000   0.0000
   0.0000   0.0000        0   0.0000   0.0000        0   0.0000   0.0000        0   0.0000        0        0   0.0000   0.0000
   0.0000   0.0000        0   0.0000   0.0000        0   0.0000   0.0000        0   0.0000        0        0   0.0000   0.0000
   0.0000   0.0000        0   0.0000   0.0000        0   0.0000   0.0000        0   0.0000        0        0   0.0000   0.0000
   0.0000   0.0000        0   0.0000   0.0000        0   0.0000   0.0000        0   0.0000        0        0   0.0000   0.0000
        0        0        0        0        0        0        0        0        0        0        0        0        0        0
 Columns 29 and 30:

        0        0
        0   0.1464
        0   0.2439
        0   0.3090
        0   0.3765
        0   0.4174
        0   0.4649
        0   0.4895
        0   0.5330
        0   0.5688
        0   0.5883
        0   0.6098
        0   0.6374
        0   0.6871
        0   0.6970
        0   0.7022
        0   0.7262
        0   0.7381
        0   0.7524
        0   0.8275
        0   0.8353
        0   0.8353
        0   0.8439
        0   0.8439
        0   0.8550
        0   0.8550
        0   0.8748
        0   0.8748
        0   0.8788
        0   1.0000
 

x(5,30)=0.3765 imply that if any player starts from the x(5,5)=$200000 state, he/she has only 37.65% chance to get millionairedom status.


I think my answer is correct. Isn't it?

Edited by Dhamnekar Win,odd
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.