- Cuchulainn
**Posts:**62376**Joined:****Location:**Amsterdam-
**Contact:**

QuoteAdding one more term that comes from further expansion will take the order to [$]\text{$\Delta $t}[$]^1.5. The new better scheme would be[$]x(t+\text{$\Delta $t})=x(t)+(r-d)*x(t) \text{$\Delta $t}+(r-d)(r-d)x(t)\frac{\text{$\Delta $t}^2}{2}+\text{sig}* x(t)\text{nor}(0,1)\sqrt{\text{$\Delta $t}}+2*\text{sig}* (r-d)x(t)\text{nor}(0,1)\frac{\text{$\Delta $t}^{1.5}}{\sqrt{3}}[$][$]+\text{sig}^2*x(t)\left(\text{nor}(0,1)^2-1\right)\frac{\text{$\Delta $t} }{2}+\text{sig}^3*x(t)\left(\text{nor}(0,1)^3-3\text{nor}(0,1)\right)\frac{\text{$\Delta $t}^{1.5}}{6}[$]OK, I have put this this into MC code. Looking at it I see that it is Euler plus extra terms of order O(dt) and O(dt^3/2). Intuitively, accuracy will be similar to Euler, which is borne out on the example (put). If anything, Euler is very very slightly more accurate.K = 10, S=5, r = 0.12, sig = 0.5, T = 1.I can try other use cases but at this stage I am curious on how to proceed. // One thing I do miss is that all of a sudden the schemes no longer explicitly use Hermite polynomials.

Last edited by Cuchulainn on May 5th, 2016, 10:00 pm, edited 1 time in total.

QuoteI can try other use cases but at this stage I am curious on how to proceed. One thing to check for will be how long can your step get when you use a higher order scheme while you keep accuracy the same as that of scheme of order(dt^.5), the benchmark accuracy. If your step is already small enough and accuracy is very good there may be very small advantage of higher order scheme. However you can increase step size with higher order scheme so one thing to investigate would be how long can the step get with higher order scheme as compared to the small step naiive dt^.5 order scheme while accuracy could remain the same. Quote One thing I do miss is that all of a sudden the schemes no longer explicitly use Hermite polynomials.nor(0,1)= x =H1(x)=H1(nor(0,1))nor(0,1)^2-1=x^2 - 1 = H2(x)=H2(nor(0,1))nor(0,1)^3-3nor(0,1)= x^3 - 3 x = H3(x) =H3(nor(0,1))If you wanted to be totally analytic, You could have replaced nor(0,1) with x and integrated over a unit normal density f(x) to get the same one step monte carlo density analytically. We have replaced x with a unit normal random draw in hermite polynomials as it is a numerical integration over unit normal density in monte carlo sense since we are drawing random numbers from unit normal density.

- Cuchulainn
**Posts:**62376**Joined:****Location:**Amsterdam-
**Contact:**

Let's try a 2-factor model e.g. basket, Heston.And a mean-reverting SDE.

Ok, I will write a scheme for 2D correlated heston with mean reverting volatility. Please give me a few hours so I could work out the mathematics as Heston was not my favorite in research till now so I will have to do some new work alongwith some other things. Might have to take a few hours before I could get back.

- Cuchulainn
**Posts:**62376**Joined:****Location:**Amsterdam-
**Contact:**

QuoteOriginally posted by: AminOk, I will write a scheme for 2D correlated heston with mean reverting volatility. Please give me a few hours so I could work out the mathematics as Heston was not my favorite in research till now so I will have to do some new work alongwith some other things. Might have to take a few hours before I could get back.No problem and no hurry. I won't be able to look until early next week anyways.You can see Heston/CIR as a test of your new approach and the ability to reproduce and improve the results.

- Cuchulainn
**Posts:**62376**Joined:****Location:**Amsterdam-
**Contact:**

Feedback on GBM:I ran MC for low/zero/high values of r,d and sig. The results are almost identical to those produced by Euler. In any case, convergence O(dt^3/2) does not seem to hold, based on inspecting the output. And it is more computationally intensive.The first few terms of your scheme is Euler so my feeling is all the extra terms cannot bump up the accuracy.

Last edited by Cuchulainn on May 7th, 2016, 10:00 pm, edited 1 time in total.

Daniel, you have to alter the step size. At a very small step size, if the equation is not very non-linear, there are little gains from better scheme since it is the sqrt(dt) term that dominates everything. Please increase the step size by for example by ten times the step size you are using for Euler monte carlo and you will see that larger step size will give you one step dynamics quite different from normal density and very close to original distribution in a way traditional Euler monte carlo can never capture. If you used matlab, I would have posted a program for you that could do it in matlab and you could visually compare the graphs of densities from Euler and using this new method with 10X step, 20X step or 50X step in time as compares to Euler monte carlo step of 1X with same final time.I will be posting a two dimensional correlated CEV diffusion monte carlo today but that program would be in matlab. Friends would be able to view the resulting densities as overlaid graphs to make a comparison of the accuracy of the method for themselves. I will give a pseudo code and equations in Latex as well.

- Cuchulainn
**Posts:**62376**Joined:****Location:**Amsterdam-
**Contact:**

I took NT = 100, 1000, 500 and I could see no difference. This is at odds with the previous post. Can you give parameter values for r, d, ... and dt?One exampleK = 10S = 5r = 0.12sig = 0.5T = 1With NT, NSIM100,10001000,100000500, 5000001000, 100000What prices do you get? // For me personally, Matlab code is not insightful at the moment.

Last edited by Cuchulainn on May 7th, 2016, 10:00 pm, edited 1 time in total.

I will be able to give the numbers later today but there is something I would like to mention before that.Compare these two.New method with NT=10.Euler with NT=100. Keep NSIM the same for both.Better calculate a precise benchmark with Euler NT=1000, NSIM=large.Then see what is new method with NT=8, NT=16, NT=10, NT=20. and compare with Euler.For several non-linear equations if you take a step as small as dt=.0001, you still do not get one step density right in Euler monte carlo. The density simply does not match the analytic density. But this new method has the ability to give precise density even when steps are increased by a multiple of 10 to 20 or sometimes even more for such equations. I wish you could clone my matlab monte carlo density graphing program in python or some other language you like to use, and then you could see how the density changes with step instead of relying only on the option pricing numbers.

Last edited by Amin on May 8th, 2016, 10:00 pm, edited 1 time in total.

- Cuchulainn
**Posts:**62376**Joined:****Location:**Amsterdam-
**Contact:**

I think it is better if you post these results to see if I can reproduce them . In this way I can see my code is running properly because I don't see a lot of difference between the two methods at this stage.Your numbers are more interesting than mine:) QuoteI wish you could clone my matlab monte carlo density graphing program in python or some other language you like to use, and then you could see how the density changes with step instead of relying only on the option pricing numbers. This is not a show-stopper. We can use the language of numerical analysis. I avoid Matlab and Python (Even tho' it was invented in Amsterdam) like the plague.[

Last edited by Cuchulainn on May 8th, 2016, 10:00 pm, edited 1 time in total.

- Cuchulainn
**Posts:**62376**Joined:****Location:**Amsterdam-
**Contact:**

Last edited by Cuchulainn on May 9th, 2016, 10:00 pm, edited 1 time in total.

- Cuchulainn
**Posts:**62376**Joined:****Location:**Amsterdam-
**Contact:**

Same example.NT,NSIM, Euler classic, A. Amin method========================2000, 1000000, 4.07306, 4.073062000, 2000000, 4.07426, 4.07426

Last edited by Cuchulainn on May 10th, 2016, 10:00 pm, edited 1 time in total.

Daniel, thank you for your effort. It is much appreciated. I guess, you used the second supposedly more accurate scheme. I would request you to compare the Euler with smaller order scheme I had derived. When I wrote the supposedly more accurate scheme I added one term on the fly from higher level. However I realize that when we go from lower level to higher level of derivatives, all the terms have to be taken to higher level unless you have done some special analysis particular to SDE. I added one term and missed many others something which might be causing biases. I would request you to do your numerical accuracy analysis on scheme I mentioned as order(dt) or order delta_t. Once this scheme is proven better, I will write detailed order(dt)^1.5 scheme with all terms included. Let us see what your results are?

Last edited by Amin on May 9th, 2016, 10:00 pm, edited 1 time in total.

- Cuchulainn
**Posts:**62376**Joined:****Location:**Amsterdam-
**Contact:**

QuoteOriginally posted by: AminDaniel, thank you for your effort. It is much appreciated. I guess, you used the second supposedly more accurate scheme. I would request you to compare the Euler with less accurate scheme I had derived. When I wrote the supposedly more accurate scheme I added one term on the fly from higher level. However I realize that when we go from lower level to higher level of derivatives, all the terms have to be taken to higher level unless you have done some special analysis particular to SDE. I added one term and missed many others something which might be causing biases. I would request you to do your numerical accuracy analysis on scheme I mentioned as order(dt) or order delta_t. Once this scheme is proven better, I will write detailed order(dt)^1.5 scheme with all terms included. Let us see what your results are?I am counting on a bug-free formula. Your formula was wrong, thus? I'm wasting my time like this. Meshuggah.==Anyways, let's look ahead :)The first scheme does not put any 'sods on the dyke" (Dutch phrase) i.e. it makes no difference. Results is the same. Unfortunately, I think it's back to the drawing board???Even looking at the schemes gut feeling says it is no better than Euler. It' Euler with terms tagged on.Did you do MC pricing at all with these schemes? Unless I have made a huge computing error??

Last edited by Cuchulainn on May 9th, 2016, 10:00 pm, edited 1 time in total.

Daniel, as I said, I added a higher order term quickly thinking it might add to accuracy. I will appreciate if you could quickly give us a table of values from O(dt) scheme just like you gave for supposedly higher order scheme. You already have the program and it will take you 5-10 minutes. Hope you would be willing to do this considering I spent hours writing latex formulas here.

GZIP: On