SERVING THE QUANTITATIVE FINANCE COMMUNITY

 
User avatar
Alan
Posts: 9787
Joined: December 19th, 2001, 4:01 am
Location: California
Contact:

Re: One-liner questions of a numerical kind

August 22nd, 2019, 2:17 pm

The nice thing about NDSolve (in Mathematica) is that it automatically adopts a high order inward pointing derivative at boundaries, which then couples the system smoothly to the behavior of the solution at the interior points.

[Erroneous second comment deleted] 
 
User avatar
Alan
Posts: 9787
Joined: December 19th, 2001, 4:01 am
Location: California
Contact:

Re: One-liner questions of a numerical kind

August 22nd, 2019, 7:29 pm

The PDE for this greek does indeed contain terms in the bond price. The far-field BC sounds reasonable. At the near field the Feller condition for the 'greek PDE' is always satisfied which means we have a drift PDE at that boundary. It must be solved numerically (upwinding) in the worst case.
I get at r = 0:

dD/dt = (1/2 sig^2 + a) dD/dr - b D - B

where B = bond price, D = dB/dr  and a,b,sig are the pararmeters of CIR model.

(the question is from my MSc student who is rounding off this part of his thesis).


There might be an interesting issue here for the student to explore. Although the so-called Feller condition (or Fichera condition if you like) is satisfied for the [$]B_r[$] PDE, I don't think it implies solution uniqueness here. That's because, for [$]0 < a < \sigma^2/2[$], the bond solutions [$]B[$] are NOT unique. Since the bond solution appears as a non-homogeneous driving term in the [$]B_r[$] PDE, two different bond solutions will lead to two different [$]B_r[$] solutions!   

A second bond solution (the "absorbing" solution) is given at eqn (10.4) in my book.

From the point of view of a PDE system with two components [$](f,g) = (B,B_r)[$] (and assuming the interesting case [$]0 < a < \sigma^2/2[$]), consider the boundary conditions. Even if you are not free to specify a boundary condition at r=0 for g, you can or cannot for f. For example, you could specify (A) the "no boundary condition" condition or (B) the absorbing condition [$]B(r=0,t)=1[$]. Again, these two choices should lead to two different solutions for both components -- for the reason given in my first paragraph. Very interesting, I think!
 
User avatar
Cuchulainn
Topic Author
Posts: 59713
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Re: One-liner questions of a numerical kind

August 25th, 2019, 10:51 am

Yes, a good case. In the past, the BC (or lack thereof) for [$]B[$] is well-known and as supervisor I demand ( :roll: )) that each student can work the schemes out from first principles. And stitch it up in C++. In fairness, this is a 3-month MSc projects so the students are working flat out to get results.

For your new great insight, we need indeed to know if a solution is unique or not and under which circumstances:

1. When Feller is satisfied 
2. And when 1 in not satisfied

I suppose that numerical experimentation will give insights. Then PDE theory and energy estimates for well-posed PDE will give sufficient conditions for uniqueness. This has been done for bond price when Feller is satisfied by Fei Lu.

This is interesting also because the PDE is based on the Continuous Sensitivity Equation (CSE) approach.
BTW is it not so that CIR has a unique analytical solution for all values of the parameter regime?
Attachments
thesis.pdf
(323.25 KiB) Downloaded 20 times
 
User avatar
Cuchulainn
Topic Author
Posts: 59713
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Re: One-liner questions of a numerical kind

August 25th, 2019, 11:04 am

Alan,
Regarding eq. 10.4 of your book, how can it be differentiated WRT r and the other parameters?

AFAIR, we are applying CSE to find a PDE for [$]B_\sigma[$].

BTW for [$]B_r[$] the Feller condition is always satisfied at [$]r = 0[$]. Correct?
 
User avatar
Alan
Posts: 9787
Joined: December 19th, 2001, 4:01 am
Location: California
Contact:

Re: One-liner questions of a numerical kind

August 25th, 2019, 1:51 pm

BTW is it not so that CIR has a unique analytical solution for all values of the parameter regime?
No. As explained on pg. 456 and also on pg 349 of my Vol. II, the CIR pde does *not* have a unique solution when (to use your notation) [$]0 < a < \sigma^2/2[$]. This is where the boundary is classified "regular".
Last edited by Alan on August 25th, 2019, 2:07 pm, edited 1 time in total.
 
User avatar
Alan
Posts: 9787
Joined: December 19th, 2001, 4:01 am
Location: California
Contact:

Re: One-liner questions of a numerical kind

August 25th, 2019, 2:01 pm

Alan,
Regarding eq. 10.4 of your book, how can it be differentiated WRT r and the other parameters?
>> Standard differentiation: "r" appears in 3 places.

BTW for [$]B_r[$] the Feller condition is always satisfied at [$]r = 0[$]. Correct?
>> The Feller condition, applied to the [$]B_r[$] pde, and using your notation, would say that [$]1 + 2 a/\sigma^2 > 1[$]. This would NOT be true if [$]a <0[$]. But, because of the driving  "B" term in that pde, there are *still* the same three parameter regimes as per Table 7.1 (pg 349) for the [$]B_r[$] pde. There is uniqueness (for those pde solutions) only when [$]a \le 0[$] or [$]a \ge \sigma^2/2[$].  As I suggested earlier, the solutions when [$]0 < a <\sigma^2/2[$] are not unique because the driving B solutions are not unique for that parameter range. To say it another way, if a function [$]f(r)[$] is not unique in a parameter range, then (apart from trivial exceptions that don't apply here), [$]f'(r)[$] will not be unique either.
 
User avatar
Cuchulainn
Topic Author
Posts: 59713
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Re: One-liner questions of a numerical kind

August 25th, 2019, 4:05 pm

BTW is it not so that CIR has a unique analytical solution for all values of the parameter regime?
No. As explained on pg. 456 and also on pg 349 of my Vol. II, the CIR pde does *not* have a unique solution when (to use your notation) [$]0 < a < \sigma^2/2[$]. This is where the boundary is classified "regular".
In my energy estimates (Gronwall's inequality) it was not possible to prove is well-posed because we need to specify [$]B(r =0)[$]. I suspect there is an infinite number of solutions in this 'regular' case?

I think there is not enough information to specify a unique solution.
 
User avatar
Cuchulainn
Topic Author
Posts: 59713
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Re: One-liner questions of a numerical kind

August 25th, 2019, 4:22 pm

Alan,
Regarding eq. 10.4 of your book, how can it be differentiated WRT r and the other parameters?
>> Standard differentiation: "r" appears in 3 places.

BTW for [$]B_r[$] the Feller condition is always satisfied at [$]r = 0[$]. Correct?
>> The Feller condition, applied to the [$]B_r[$] pde, and using your notation, would say that [$]1 + 2 a/\sigma^2 > 1[$]. This would NOT be true if [$]a <0[$]. But, because of the driving  "B" term in that pde, there are *still* the same three parameter regimes as per Table 7.1 (pg 349) for the [$]B_r[$] pde. There is uniqueness (for those pde solutions) only when [$]a \le 0[$] or [$]a \ge \sigma^2/2[$].  As I suggested earlier, the solutions when [$]0 < a <\sigma^2/2[$] are not unique because the driving B solutions are not unique for that parameter range. To say it another way, if a function [$]f(r)[$] is not unique in a parameter range, then (apart from trivial exceptions that don't apply here), [$]f'(r)[$] will not be unique either.
The Fichera function for  [$]B_r[$] is a constant, namely [$]a[$]. 

1. a >= 0 no BC (the Feller case)
2. a < 0 we need to provide some BC
 
User avatar
Cuchulainn
Topic Author
Posts: 59713
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Re: One-liner questions of a numerical kind

August 25th, 2019, 4:31 pm

Alan,
Regarding eq. 10.4 of your book, how can it be differentiated WRT r and the other parameters?
>> Standard differentiation: "r" appears in 3 places.

BTW for [$]B_r[$] the Feller condition is always satisfied at [$]r = 0[$]. Correct?
>> The Feller condition, applied to the [$]B_r[$] pde, and using your notation, would say that [$]1 + 2 a/\sigma^2 > 1[$]. This would NOT be true if [$]a <0[$]. But, because of the driving  "B" term in that pde, there are *still* the same three parameter regimes as per Table 7.1 (pg 349) for the [$]B_r[$] pde. There is uniqueness (for those pde solutions) only when [$]a \le 0[$] or [$]a \ge \sigma^2/2[$].  As I suggested earlier, the solutions when [$]0 < a <\sigma^2/2[$] are not unique because the driving B solutions are not unique for that parameter range. To say it another way, if a function [$]f(r)[$] is not unique in a parameter range, then (apart from trivial exceptions that don't apply here), [$]f'(r)[$] will not be unique either.
The Fichera function for  [$]B_r[$] is a constant, namely [$]a[$]. 

1. a >= 0 no BC (the Feller case), we then get a coupled PDE involving  [$]{{(B, B_r)}}[$] at [$]r=0[$].
2. a < 0 we need to provide some BC
 
User avatar
Alan
Posts: 9787
Joined: December 19th, 2001, 4:01 am
Location: California
Contact:

Re: One-liner questions of a numerical kind

August 25th, 2019, 6:17 pm

Since I give  a (quasi)-analytic "absorbing" solution, all the various cases are checkable. BTW, when differentiating the latter w.r.t. r (which you asked about before), the identity

[$] M'(a,b,z) = \frac{a}{b} M(a+1,b+1,z)[$]  might be helpful (from Abramowitz & Stegun).  

Using that will keep the [$]r[$]-derivative quasi-analytic.
 
User avatar
Cuchulainn
Topic Author
Posts: 59713
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

Re: One-liner questions of a numerical kind

August 25th, 2019, 6:36 pm

Since I give  a (quasi)-analytic "absorbing" solution, all the various cases are checkable. BTW, when differentiating the latter w.r.t. r (which you asked about before), the identity

[$] M'(a,b,z) = \frac{a}{b} M(a+1,b+1,z)[$]  might be helpful (from Abramowitz & Stegun).  

Using that will keep the [$]r[$]-derivative quasi-analytic.
Ah yeah, it's all coming back now. We had a discussion on this a few years ago and I have C++ code for it somewhere.
ABOUT WILMOTT

PW by JB

Wilmott.com has been "Serving the Quantitative Finance Community" since 2001. Continued...


Twitter LinkedIn Instagram

JOBS BOARD

JOBS BOARD

Looking for a quant job, risk, algo trading,...? Browse jobs here...


GZIP: On