Serving the Quantitative Finance Community

 
User avatar
Cuchulainn
Posts: 20254
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

Re: Looking for hardware recommendations

November 26th, 2017, 9:15 pm

Re a C/C++ version, I thought a little about that several days ago. The main bottleneck there is I need two special functions with all complex arguments: the Bessel I(nu,z) and the confluent hypergeometric M(a,b,z). Googling, I could only locate one library supporting those and it was not really set up for Windows, my current environment. If anybody knows such a library that can easily be hooked in to Visual Studio on Windows, I'd appreciate a link. (Some usual suspects, Boost and GSL, don't have the complex argument support, as far as I could tell).
Yeah, typically a Fortran era function that has not (yet) been ported to C++.
So, given these functions should be available in Fortran, perhaps I should try this:
https://en.wikipedia.org/wiki/Intel_Fortran_Compiler
Alan,
I am looking for option pricing (numerical) data to test [$]M(a,b,z)[$] against option prices for  [$]a,b \in \mathbb R, z \in \mathbb C [$].

Your section 1.6 seems to be related to this question.
 
User avatar
Alan
Topic Author
Posts: 2958
Joined: December 19th, 2001, 4:01 am
Location: California
Contact:

Re: Looking for hardware recommendations

November 28th, 2017, 2:24 am

Not quite sure what you are looking for. If you just want to test M(a,b,z), you might try coding/testing the Hille-Hardy relation: (1.59) on my book Vol II, pg 32. On the r.h.s. there is a Bessel function. On the l.h.s is a series with [$]L^{(\alpha)}_n(x)[$]. But since

[$]L^{(\alpha)}_n(x) = \frac{(\alpha+1)_n}{n!} M(-n, 1 + \alpha, x)[$],

(See Abramowitz and Stegun, Table 13.6), that would be a test of sorts -- albeit one where the M series terminate. 

The are *lots* of option models using confluent hypergeometric solutions in my Vol II (Ch. 13 for example), but typically they are spectral representations using complex (a,b). If you wanted to test that, there are option prices in Table 13.1.
 
User avatar
drmwc1
Posts: 7
Joined: November 23rd, 2015, 5:28 pm

Re: Looking for hardware recommendations

November 28th, 2017, 10:09 am


Am i spamming already? :-D
My simulations run like freaking 5 x faster, not to mention the 10 cores. And I thought nothing can move me anymore (the last invention that gave me butterflies was electronic paper), but Oculus Rift experience is amazing. The immersion is so deep that when my husband approached and embraced me when I was configuring something in VR, I turned my head to him and panicked that I couldn't see him :-D
A colleague has just bought an I9 box. It's overclocked, water cooled, with 128G of RAM. Its speed is amazing.
 
User avatar
Cuchulainn
Posts: 20254
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

Re: Looking for hardware recommendations

November 28th, 2017, 6:47 pm

Not quite sure what you are looking for. If you just want to test M(a,b,z), you might try coding/testing the Hille-Hardy relation: (1.59) on my book Vol II, pg 32. On the r.h.s. there is a Bessel function. On the l.h.s is a series with [$]L^{(\alpha)}_n(x)[$]. But since

[$]L^{(\alpha)}_n(x) = \frac{(\alpha+1)_n}{n!} M(-n, 1 + \alpha, x)[$],

(See Abramowitz and Stegun, Table 13.6), that would be a test of sorts -- albeit one where the M series terminate. 

The are *lots* of option models using confluent hypergeometric solutions in my Vol II (Ch. 13 for example), but typically they are spectral representations using complex (a,b). If you wanted to test that, there are option prices in Table 13.1.
Some good tests are also in Linetsky 2004 to compute Hermite and Tricomi. However, in the most general case we need [$]\Gamma(z)[$] for [$] z \in  \mathbb C[$]. And this is not supported in C++.

Is there a way to decompose [$]\Gamma(z) = a + ib[$] ?

What about this formula  from Cornelius Lanczos at the spritely age of 71

https://en.wikipedia.org/wiki/Lanczos_approximation
 
User avatar
Alan
Topic Author
Posts: 2958
Joined: December 19th, 2001, 4:01 am
Location: California
Contact:

Re: Looking for hardware recommendations

November 29th, 2017, 2:24 am

Yeah, looks good. This implementation of Lanczos by Godfrey looks frequently cited (NR, wikipedia).  Combined with the reflection formula, apparently good for the whole complex plane to O(10^(-13))
 
User avatar
Cuchulainn
Posts: 20254
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

Re: Looking for hardware recommendations

November 29th, 2017, 7:29 am

CL was a lovely man and very humble, Eamon de Valera offered him a position at DIAS in the 70s.

I suppose a good test is to compute first time hitting for CIR compared to doing the same exercise by solving the corresponding PDE?

It now looks feasible CHF in C++.
 
User avatar
katastrofa
Posts: 7440
Joined: August 16th, 2007, 5:36 am
Location: Alpha Centauri

Re: Looking for hardware recommendations

November 29th, 2017, 9:51 am


Am i spamming already? :-D
My simulations run like freaking 5 x faster, not to mention the 10 cores. And I thought nothing can move me anymore (the last invention that gave me butterflies was electronic paper), but Oculus Rift experience is amazing. The immersion is so deep that when my husband approached and embraced me when I was configuring something in VR, I turned my head to him and panicked that I couldn't see him :-D
A colleague has just bought an I9 box. It's overclocked, water cooled, with 128G of RAM. Its speed is amazing.
I bought RAM 3200 MHz and had to underclock it to 2600, though, because it was unstable. I will try to increase the frequency after some BIOS upgrade.
 
User avatar
Traden4Alpha
Posts: 3300
Joined: September 20th, 2002, 8:30 pm

Re: Looking for hardware recommendations

November 29th, 2017, 2:11 pm


Am i spamming already? :-D
My simulations run like freaking 5 x faster, not to mention the 10 cores. And I thought nothing can move me anymore (the last invention that gave me butterflies was electronic paper), but Oculus Rift experience is amazing. The immersion is so deep that when my husband approached and embraced me when I was configuring something in VR, I turned my head to him and panicked that I couldn't see him :-D
A colleague has just bought an I9 box. It's overclocked, water cooled, with 128G of RAM. Its speed is amazing.
I bought RAM 3200 MHz and had to underclock it to 2600, though, because it was unstable. I will try to increase the frequency after some BIOS upgrade.
You might also see if you can improve the cooling in the system either through software (changing the fan RPM settings) or changing the internal or external airflow.
 
User avatar
Alan
Topic Author
Posts: 2958
Joined: December 19th, 2001, 4:01 am
Location: California
Contact:

Re: Looking for hardware recommendations

November 29th, 2017, 9:37 pm

CL was a lovely man and very humble, Eamon de Valera offered him a position at DIAS in the 70s.

I suppose a good test is to compute first time hitting for CIR compared to doing the same exercise by solving the corresponding PDE?

It now looks feasible CHF in C++.
You know everybody!  

Re your "good test", is that hitting time density something I have derived? (Can't remember). I recall I do have the bond value formula for the CIR process with absorption at Vol. II, eqn. (10.4), which would test both [$]\Gamma(x)[$] and [$]M(a,b,x)[$].  
 
User avatar
Alan
Topic Author
Posts: 2958
Joined: December 19th, 2001, 4:01 am
Location: California
Contact:

Re: Looking for hardware recommendations

November 29th, 2017, 9:48 pm

A colleague has just bought an I9 box. It's overclocked, water cooled, with 128G of RAM. Its speed is amazing.
I bought RAM 3200 MHz and had to underclock it to 2600, though, because it was unstable. I will try to increase the frequency after some BIOS upgrade.
You might also see if you can improve the cooling in the system either through software (changing the fan RPM settings) or changing the internal or external airflow.
Yes -- in my i9 system, I have learned to pin all the fans at 100% before starting computations that run all 20 virtual CPUs at 100% utilization. (The system came with a utility from the motherboard vendor to do that). Still runs hot (87-91C) under full load, but seems stable. I haven't seen any CPU throttling (I do not overclock) -- which AFAIK isn't supposed to happen until 95C anyway for my chip. 
 
User avatar
Traden4Alpha
Posts: 3300
Joined: September 20th, 2002, 8:30 pm

Re: Looking for hardware recommendations

November 30th, 2017, 1:17 am

I bought RAM 3200 MHz and had to underclock it to 2600, though, because it was unstable. I will try to increase the frequency after some BIOS upgrade.
You might also see if you can improve the cooling in the system either through software (changing the fan RPM settings) or changing the internal or external airflow.
Yes -- in my i9 system, I have learned to pin all the fans at 100% before starting computations that run all 20 virtual CPUs at 100% utilization. (The system came with a utility from the motherboard vendor to do that). Still runs hot (87-91C) under full load, but seems stable. I haven't seen any CPU throttling (I do not overclock) -- which AFAIK isn't supposed to happen until 95C anyway for my chip. 
Sounds toasty!

A small 5000 BTU/hr window-unit air conditioner and a bit'o clever ducting could probably lower the temp by 10-20C.
 
User avatar
katastrofa
Posts: 7440
Joined: August 16th, 2007, 5:36 am
Location: Alpha Centauri

Re: Looking for hardware recommendations

November 30th, 2017, 11:16 am

A colleague has just bought an I9 box. It's overclocked, water cooled, with 128G of RAM. Its speed is amazing.
I bought RAM 3200 MHz and had to underclock it to 2600, though, because it was unstable. I will try to increase the frequency after some BIOS upgrade.
You might also see if you can improve the cooling in the system either through software (changing the fan RPM settings) or changing the internal or external airflow.
The sticks are packed quite closely so they might overheat (I don't have any sensor there), but they felt just nicely warm. Besides, the computer didn't freeze specifically during computations, but at random moments. My friend told me that it sometimes happens on new Intel architectures (she's an overclocking maniac). I will see how it goes.
 
User avatar
Traden4Alpha
Posts: 3300
Joined: September 20th, 2002, 8:30 pm

Re: Looking for hardware recommendations

November 30th, 2017, 2:42 pm

I bought RAM 3200 MHz and had to underclock it to 2600, though, because it was unstable. I will try to increase the frequency after some BIOS upgrade.
You might also see if you can improve the cooling in the system either through software (changing the fan RPM settings) or changing the internal or external airflow.
The sticks are packed quite closely so they might overheat (I don't have any sensor there), but they felt just nicely warm. Besides, the computer didn't freeze specifically during computations, but at random moments. My friend told me that it sometimes happens on new Intel architectures (she's an overclocking maniac). I will see how it goes.
On Macs you can get the temperature of each stick of RAM so there's probably a way to do that on a PC, too.

I vaguely remember (from 10 years ago when I paid attention to this stuff) that RAM ran hot even under light loads but I may be wrong.
 
User avatar
outrun
Posts: 4573
Joined: January 1st, 1970, 12:00 am

Re: Looking for hardware recommendations

November 30th, 2017, 6:23 pm

Is it an Atari computer?
 
User avatar
Cuchulainn
Posts: 20254
Joined: July 16th, 2004, 7:38 am
Location: 20, 000

Re: Looking for hardware recommendations

November 30th, 2017, 8:04 pm

CL was a lovely man and very humble, Eamon de Valera offered him a position at DIAS in the 70s.

I suppose a good test is to compute first time hitting for CIR compared to doing the same exercise by solving the corresponding PDE?

It now looks feasible CHF in C++.
You know everybody!  

Re your "good test", is that hitting time density something I have derived? (Can't remember). I recall I do have the bond value formula for the CIR process with absorption at Vol. II, eqn. (10.4), which would test both [$]\Gamma(x)[$] and [$]M(a,b,x)[$].  
My superviser used to organise numerical analysis conferences around the world. At one stage he let his PhD students give a 30 minute talk. I stepped up to the plate to 200-300 attendees. It was a few years later I realised who was listening to me (Douglas, Lax, Wendroff, Lions, Yanenko, Samarki, Kathleen Morawetz  Synge, Dahlquist), Yikes  :oops: I once saw Jim Douglas and N.N. Yanenko having an awful argument ADI vs Soviet Splitting at a cocktail party in the Eiffel Tower. LOL

Equation (10.4) looks like a very good example indeed. I have enough to write M(a,b,z) in the most general case (a,b,z are complex). Next, I transform 10.4 to an ODE that I solve using Boost, which can handle complex coefficients. BTW do you solve 10.4 using numerical quadrature.

Another one might be Fong-Vasicek, CEV., Asian(?).

BTW would M(a,b,z) be a good addition to Boost Math Toolkit?

is that hitting time density something I have derived? 
I found it in Linetsky 2004 JCF vol 7, #4, Summer