Brownian Motion
xt- 1. (20 pta) 1. Generate three sample paths for each, a standard BM and BM with a drift, and include figures 2. Briefly describe your observations of the two proces 3. Briefly explain why this algorithm generates an approadmation of a Brownian motion (and EM with drift) 4. Generate three sample paths for a geometric BM with drift wr-/2. 5. Modify the algorithm to simulate a 2-dimensional standard EM. Use it to generate three sample paths in a 2 dimensional XY EX The code below simulates a standard BM. To simulate a BM with a drift you need to fill in the missing code * Simulate Ironias motion with drift code by Jeffrey Mei Standard EM - Hoq( fronoto-100, by 0.01 ) - moral length(t)) cums) sample path for standard BX # BM with drift sig - 0.1 Du = 0.08 drift.xt- # fill in code for sample path of l with a drift #vith the above parameters r-.04 goon.at fill in code for maple path of geometrie B evith parameters described # Plot Results BM and BM with drift plot(t, xt, type='1', ylis - el sin drift.xt, xt), maxi drittxt, x)). xlab-"Time". ylab-"Value". i-Sample Path of Brownian Motion with Drift) lineat, drift.xt, col - red) ablise (( drift.xt't), col-red) abiine (int x't), col "black") grid legend("topleft. B with Dritt", "Standard D). col-e("red","black). 1ty (1,1) Plot Results for geometrio M in a smaller interval plot (t.goon.xt.type='1',la c(0,20).118-eco, max(geonat [1120011>). main-Geometric BM) NOTE put all the plota in one page. Plny with par (ntroue(1,2)) to plot up to 2 plots in one graphing window
xt- 1. (20 pta) 1. Generate three sample paths for each, a standard BM and BM with a drift, and include figures 2. Brief
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
xt- 1. (20 pta) 1. Generate three sample paths for each, a standard BM and BM with a drift, and include figures 2. Brief
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!