Question: 1. Looking on how to approach this problem (specifically for the vector Y) 2. RWapprox(a,mu,sigma,t.n.yrange) that does the following: 3. Generate a vector T
1. Looking on how to approach this problem (specifically for the vector Y) 2. RWapprox(a,mu,sigma,t.n.yrange) that does the following: 3. Generate a vector T oft values to,.... tn with tj = (j/n) xt; 4.. Generate a vector Y of y values yo..... yn with yo = a and yj+1 is randomly either yj + ovh with probability 1/2* (1 + (u/o) *h) or yj - ovh with probability 1/2* (1-(u/o) *Wh) where h is the time step, t/n (and u is mu and o is sigma); 5.. Plot the points (to, y0), .... (tn, yn) joined by lines on axes where the horizontal axis goes from 0 to t; and the vertical axis goes from -yrange to +yrange. 6. Display a sample output of RWapprox(0,0,1,10,10,5) RWapprox(0,0,1,10,100,5), RWapprox(0,0,1,10,1000,5) and RWapprox(0,0,1,10,1000000,5)
Step by Step Solution
3.49 Rating (162 Votes )
There are 3 Steps involved in it
Solution Here is a Python code for the function RWapprox Python def RWapproxa mu sigma t n yrange Generate a vector of random walk approximations Args ... View full answer
Get step-by-step solutions from verified subject matter experts
