Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2 Download matlab Brownian motion model from the courseworks. Modify it to Geometric Brownian motion with starting value Xo=80, growth rate 14 = 0.09, volatility

image text in transcribedimage text in transcribed
2 Download matlab Brownian motion model from the courseworks. Modify it to Geometric Brownian motion with starting value Xo=80, growth rate 14 = 0.09, volatility 0 = 0.22 and 5000 trajectories. Check that the code works. Try out 50,000 trajectories. Try out 100,000 trajectories. Submit the code printout and the graph printout for 5000 trajectories. % X = cumsum ( dw) ; % plot (x) ; However we resort to a slow c style code with loops for educational purposes M=5000; %number of trajectories of Brownian motion N=250; Number of steps in one trajectory X0=80; %initial point T=1; Final Time in years in trajectory dt=T/N; Stime step Sqrtdt=sqrt(dt) ; X(j , : ) j-th trajectory of Brownian Motion X(1:M, 1)=X0; % Initial value of Brownian Motion X(j, 1)=X0 for all j=1:M There index starts with 1 and not 0 as in Matlab array index should be "positive for j=1:M %generate M trajectories for i = 2:N+1 %generate j-th trajectory X(j, i)=X(j, i-1)+Sqrtdt*randn; end end t=0:dt : T; plot ( t, X ( : , : ) )

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Elements Of Chemical Reaction Engineering

Authors: H. Fogler

6th Edition

013548622X, 978-0135486221

More Books

Students also viewed these Finance questions

Question

Always show respect for the other person or persons.

Answered: 1 week ago