Question: Using R, simulate a price process: Pt=u+Pt-1+et, for t = 1,2,...,T where T=100, et=N(0,sigma^2), u=0.00024 and sigma = 0.013. You may initialize the simulation with

Using R, simulate a price process: Pt=u+Pt-1+et, for t = 1,2,...,T where T=100, et=N(0,sigma^2), u=0.00024 and sigma = 0.013. You may initialize the simulation with P0=100. I'm wondering if the code I wrote is correct and how to initialize with P0=100

 Using R, simulate a price process: Pt=u+Pt-1+et, for t = 1,2,...,T

1 #Simulate the price process 2 Ppk-functionCn)1 3 eS rnorm meant sd 0.013 Create the error term 4 P

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!