Serving the Quantitative Finance Community

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 8
 
User avatar
Cuchulainn
Posts: 22926
Joined: July 16th, 2004, 7:38 am

Re: Bivariate Normal Integral paper

March 2nd, 2017, 3:25 pm

If you do h/4 extrapolation the speed will drop with a factor 16 and at that point the near double precision Genz West method would be both faster and more accurate -even on a grid-.

Prove it. But it is slower as  my example shows; bottleneck is

V(i,j) = bicumnorm(x_i, y_j, rho)
I have

V(i,j) = SomethingReallySimple;

capische

BTW why is double precision needed?? Is it a hard requirement and if so what are the consequences if it it not achieved?
 
User avatar
outrun
Posts: 4573
Joined: January 1st, 1970, 12:00 am

Re: Bivariate Normal Integral paper

March 2nd, 2017, 4:16 pm

1) At a 50x50 grid you showed 2 digit precision and claimed "10x faster".

2) Then you said "we can get 7 digit precision at 50x50" .. however, that would be at a cost, because 50x50 only gives a useless 2 digits!

3) So one thing I see you try it to increase precision via extrapolation. Let's say you'll try that to go from 2 to 7 digits via extrapolation. You should do the math, but I would be very surprised if you can get 7 digits with 50^2,100^2,200^2.. but if you *could* then the cost would be O(200) which is 16 slower than O(50) and hence slower according to you than Genz West.

Genz West showed that 7 digits single precision float causes issues so you should *at least* aim for 7 digits precision. Anything below float is useless.
 
User avatar
outrun
Posts: 4573
Joined: January 1st, 1970, 12:00 am

Re: Bivariate Normal Integral paper

March 2nd, 2017, 4:18 pm

yet another typo..
it's "capisce" ;-)
 
User avatar
Cuchulainn
Posts: 22926
Joined: July 16th, 2004, 7:38 am

Re: Bivariate Normal Integral paper

March 2nd, 2017, 6:04 pm

yet another typo..
it's "capisce" ;-)
I translated it into English for you.
Capiche (ignore spell check) is the standard English spelling of the word, usually followed by a question mark, meaning do you understand? It comes from the Italian capisci. The word occasionally appears in several other spellings, including capeesh and capische, but these are far less common than the standard one.
 
User avatar
Cuchulainn
Posts: 22926
Joined: July 16th, 2004, 7:38 am

Re: Bivariate Normal Integral paper

March 2nd, 2017, 6:09 pm

Genz West showed that 7 digits single precision float causes issues so you should *at least* aim for 7 digits precision. Anything below float is useless.

Please give a source.
Don't suppose you can come up with a concrete example that I can test?
All of Haug's examples work for me.

 You should do the math, but I would be very surprised if you can get 7 digits with 50^2,100^2,200^2.. but if you *could* then the cost would be O(200) which is 16 slower than O(50) and hence slower according to you than Genz West.

I don't think you know what extrapolation is. 
You really should try to take some time and look at the numbers. 

Steps NX, NY: 50, 50
Goursat FDM Classico: 0.2730754912042899
Goursat FDM extrapolate h/2: 0.2731222689944897
Genz/West: 0.2731222219285447
Last edited by Cuchulainn on March 2nd, 2017, 6:34 pm, edited 1 time in total.
 
User avatar
outrun
Posts: 4573
Joined: January 1st, 1970, 12:00 am

Re: Bivariate Normal Integral paper

March 2nd, 2017, 6:30 pm

Lol, here you go!
I am using the 2nd order one-step box scheme for Goursat (it's old as Metusalah) on grids N, 2N, 4N 
4N => 16 times slower!
You're using Richardson extrapolation, right???

How many digits for 50x50 extrapolated N,2N,4N?
 
User avatar
outrun
Posts: 4573
Joined: January 1st, 1970, 12:00 am

Re: Bivariate Normal Integral paper

March 2nd, 2017, 6:38 pm

Is the error estimated based on comparing against Genz West? They claim near double precision accuracy.

What's interesting to note is that the central motive for fast and high precision algorithms in Genz West paper is that conventional lower precision methods are to be avoided in option pricing (see section 4 "Option pricing disasters" in https://lyle.smu.edu/~aleskovs/emis/sqc ... umnorm.pdf )
 
User avatar
Cuchulainn
Posts: 22926
Joined: July 16th, 2004, 7:38 am

Re: Bivariate Normal Integral paper

March 3rd, 2017, 12:25 pm

Use Case: Testing Genz in the Empty Quarters (far away)

Case I: far away in x
Remark: Genz ~ Goursat (Goursat can be considered to be exact here).

** Trial #1
***** SUMMARY OF TRIAL ****
Rectangle: [-16,-12.4041] X [-16,-12.0451]
Correlation: 0.996304
Subdivisions NX, NY: 5069,5031
***** END OF TRIAL **
Goursat  : 3.393002156426829e-35
Goursat Extrap: 1.242166367152009e-35
Genz West: 1.242166366238473e-35
 
** Trial #2
***** SUMMARY OF TRIAL ****
Rectangle: [-16,-14.8389654128486] X [-16,-13.64881811995845]
Correlation: 0.9998617486555453
Subdivisions NX, NY: 5008,5089
***** END OF TRIAL **
Goursat  : 1.027232162959478e-48
Goursat Extrap: 4.100550893707373e-50
Genz West: 4.10055096433081e-50
 
** Trial #3
***** SUMMARY OF TRIAL ****
Rectangle: [-16,-15.4406709828826] X [-16,-11.91039432667434]
Correlation: 0.9976963148321236
Subdivisions NX, NY: 5125,5003
***** END OF TRIAL **
Goursat  : 1.077567363183178e-52
Goursat Extrap: 4.358520573402641e-54
Genz West: 4.359424292952871e-54
 
** Trial #4
***** SUMMARY OF TRIAL ****
Rectangle: [-16,-14.31153917774483] X [-16,-11.96905858824538]
Correlation: 0.998341531984998
Subdivisions NX, NY: 5005,5036
***** END OF TRIAL **
Goursat  : 6.820543452500245e-46
Goursat Extrap: 9.268242259335349e-47
Genz West: 9.268242257063015e-47
Current max error: 1.074558937611744e-32
[1:1.074558937611744e-32] , [2:2.678287802082539e-45] , [3:4.496572606275003e-49] , [4:1.752077190704419e-42] ,
Final max error: 1.074558937611744e-32
 
 
Last edited by Cuchulainn on March 3rd, 2017, 1:15 pm, edited 3 times in total.
 
User avatar
Cuchulainn
Posts: 22926
Joined: July 16th, 2004, 7:38 am

Re: Bivariate Normal Integral paper

March 3rd, 2017, 12:26 pm

Use Case: Testing Genz in the Empty Quarters (far away)

Case II: far away in x and y

Remark: Genz != Goursat (Genz breaks up?)

** Trial #1
***** SUMMARY OF TRIAL ****
Rectangle: [-16,-15.9413] X [-16,-15.9332]
Correlation: 0.99576
Subdivisions NX, NY: 5051,5048
***** END OF TRIAL **
Goursat  : 5.52542972930195e-54
Goursat Extrap: 2.162981177929015e-58
Genz West: 1.743875966371929e-57
Tanh/erf: -1.060663931695825e-57
Current max error: 1.275540071481446e-50
 
** Trial #2
***** SUMMARY OF TRIAL ****
Rectangle: [-16,-15.91146289653015] X [-16,-15.97623230467952]
Correlation: 0.9983172603301517
Subdivisions NX, NY: 5134,5021
***** END OF TRIAL **
Goursat  : 7.793372830065522e-54
Goursat Extrap: 1.632436399405714e-58
Genz West: 1.160371053539916e-57
Tanh/erf: -9.039787138373226e-59
Current max error: 1.823233476045566e-50
 
** Trial #3
***** SUMMARY OF TRIAL ****
Rectangle: [-16,-15.97805340288082] X [-16,-15.98000244737989]
Correlation: 0.9969348936382584
Subdivisions NX, NY: 5010,5075
***** END OF TRIAL **
Goursat  : 5.126082998723802e-54
Goursat Extrap: 2.223754730632146e-59
Genz West: 8.944019889139903e-58
Tanh/erf: -4.068919426477602e-58
Current max error: 1.823233476045566e-50
 
** Trial #4
***** SUMMARY OF TRIAL ****
Rectangle: [-16,-15.90323336089556] X [-16,-15.9911125609046]
Correlation: 0.9969267173929471
Subdivisions NX, NY: 5065,5110
***** END OF TRIAL **
Goursat  : 5.291217817794464e-54
Goursat Extrap: 4.527766650032487e-59
Genz West: 1.034454409893173e-57
Tanh/erf: -1.084073121860447e-58
 
Current max error: 1.823233476045566e-50
[1:1.275540071481446e-50] , [2:1.823233476045566e-50] , [3:1.265046810896081e-50] , [4:1.321164361784434e-50] ,
Final max error: 1.823233476045566e-50
 
 
Last edited by Cuchulainn on March 3rd, 2017, 1:17 pm, edited 4 times in total.
 
User avatar
Cuchulainn
Posts: 22926
Joined: July 16th, 2004, 7:38 am

Re: Bivariate Normal Integral paper

March 3rd, 2017, 12:35 pm

What's interesting to note is that the central motive for fast and high precision algorithms in Genz West paper is that conventional lower precision methods are to be avoided in option pricing (see section 4 "Option pricing disasters" in https://lyle.smu.edu/~aleskovs/emis/sqc ... umnorm.pdf 
Looks benign enough.
Problem 4.3 is crazy, it should not happen. It's solved in Genz, so it is a non-issue. Of course, as mentioned, FDM never has this issue.

I doubt that "disaster" and/or accuracy is caused by floating point precision. The answer is either YES or NO. I will get back on this with hopefully results.
 
User avatar
Cuchulainn
Posts: 22926
Joined: July 16th, 2004, 7:38 am

Re: Bivariate Normal Integral paper

March 3rd, 2017, 1:36 pm

Use Case : is a highly accurate M(a,b,rho) necessary for accurate option price?

Here is an example to show that it not necessary.

To counter this argument, come up with an example of low-order M() and inaccurate option price.

Testing accuracy with low-order approx. to M(a,b,rho)
And can configure the desired accuracy.
 
A.
 
Call best cash-or-nothing Goursat: 2.809879505301949
Steps NX, NY in M(): 10, 10
 
Call best cash-or-nothing Goursat extrapolation: 2.79352971119757
 
Call best cash-or-nothing Genz/West: 2.793935852582142
 
Call best cash-or-nothing Tanh second opinion: 2.793935850289368
 
 
B.
Call best cash-or-nothing Goursat: 2.800610790093465
Steps NX, NY in M(): 15, 15
 
Call best cash-or-nothing Goursat extrapolation: 2.793862604891467
 
Call best cash-or-nothing Genz/West: 2.793935852582142
Call best cash-or-nothing Tanh second opinion: 2.793935850289368
 
 
 
C.
Call best cash-or-nothing Goursat: 2.79451280353896
Steps NX, NY in M(): 50, 50
Call best cash-or-nothing Goursat extrapolation: 2.793935288536937
 
Call best cash-or-nothing Genz/West: 2.793935852582142
 
Call best cash-or-nothing Tanh second opinion: 2.793935850289368
 
 
 
D.
Call best cash-or-nothing Goursat: 2.794079667287443
Steps NX, NY in M(): 100, 100
 
Call best cash-or-nothing Goursat extrapolation: 2.793935811240003
 
Call best cash-or-nothing Genz/West: 2.793935852582142
 
Call best cash-or-nothing Tanh second opinion: 2.793935850289368
 
 
 E. Sanity Check
Call best cash-or-nothing Goursat: 2.793939062404477
Steps NX, NY in M(): 2000, 2000
Call best cash-or-nothing Goursat extrapolation: 2.793935852562837
 
Call best cash-or-nothing Genz/West: 2.793935852582142
 
Call best cash-or-nothing Tanh second opinion: 2.793935850289368
 
User avatar
outrun
Posts: 4573
Joined: January 1st, 1970, 12:00 am

Re: Bivariate Normal Integral paper

March 3rd, 2017, 5:41 pm

I think it's much clearer now how things stand regarding claims about accuracy, speed.

Still want to see your magical extrapolation I don't understand: you need to show how to go from a 50x50 grid and 2 digits precision to a 50x50 grid and 7 digits precision -using extrapolation-, and *not* spend extra computation time. Too funny!
 
User avatar
Cuchulainn
Posts: 22926
Joined: July 16th, 2004, 7:38 am

Re: Bivariate Normal Integral paper

March 4th, 2017, 11:24 am

Use Case: Using M(a,b,rho) for American options (Bjerksund and Stensland 2002).

It works for both Genz and Goursat and they give the same results. In this case however, it may be better to use Genz if you want 3-4 digits accuracy.
 
User avatar
Cuchulainn
Posts: 22926
Joined: July 16th, 2004, 7:38 am

Re: Bivariate Normal Integral paper

March 4th, 2017, 11:36 am

Quiz (Use Case): Compute the quantiles of the bivariate cumulative normal.


{ (x,y):  such that Cdf(x,y) = given confidence level}

How would you do this?
 
User avatar
Billy7
Posts: 262
Joined: March 30th, 2016, 2:12 pm

Re: Bivariate Normal Integral paper

March 4th, 2017, 12:34 pm

Use Case: Using M(a,b,rho) for American options (Bjerksund and Stensland 2002).

It works for both Genz and Goursat and they give the same results. In this case however, it may be better to use Genz if you want 3-4 digits accuracy.
The Bjerksund and Stensland 2002 approximations don't achieve 3-4 digits of option price accuracy in any case, so here you're talking about how accurately one can reproduce a quite inaccurate result:)