Getting two seperate price processes to follow the same periodization in R
I am struggling a bit with a coding project in R at the moment. I am to the price process of an arbitrary stock generated by a geometric brownian motion, then find the price for a European call option with arbitrary parameters and create a replicating portfolio for it. This first part has gone well.
The second part is essentially to repeat the process, but simulating the possibility of cracks in the market, which I have tried to do with a compound Poisson process, and generally it seems to have gone somewhat well. The plots for this process seem generally really close to what I want to simulate except for a couple of points.
Firstly, the interval on which the second simulation was done is different from the first one. For the second simulation the interval is (0, N=1460) increasing by increments of 1, whereas on the first one the interval is (0, T=1) increasing by increments of dt=T/N. Secondly the last period in my second process seems to be acting really erratic and producing incredibly strange values.
The second issue can at worst be fixed by ignoring the last period as the simulation of the replicating portfolio should already be close enough at the second to last period, but without the simulations running over the same time interval it is really hard for me to compare the two situations.