Serving the Quantitative Finance Community

Alan
Posts: 10610
Joined: December 19th, 2001, 4:01 am
Location: California
Contact:

### Re: One-liner questions of a numerical kind

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]

Alan
Posts: 10610
Joined: December 19th, 2001, 4:01 am
Location: California
Contact:

### Re: One-liner questions of a numerical kind

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!

Cuchulainn
Topic Author
Posts: 64433
Joined: July 16th, 2004, 7:38 am
Location: Drosophila melanogaster
Contact:

### Re: One-liner questions of a numerical kind

Yes, a good case. In the past, the BC (or lack thereof) for $B$ is well-known and as supervisor I demand ( )) 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
"Compatibility means deliberately repeating other people's mistakes."
David Wheeler

http://www.datasimfinancial.com
http://www.datasim.nl

Cuchulainn
Topic Author
Posts: 64433
Joined: July 16th, 2004, 7:38 am
Location: Drosophila melanogaster
Contact:

### Re: One-liner questions of a numerical kind

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?
"Compatibility means deliberately repeating other people's mistakes."
David Wheeler

http://www.datasimfinancial.com
http://www.datasim.nl

Alan
Posts: 10610
Joined: December 19th, 2001, 4:01 am
Location: California
Contact:

### Re: One-liner questions of a numerical kind

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.

Alan
Posts: 10610
Joined: December 19th, 2001, 4:01 am
Location: California
Contact:

### Re: One-liner questions of a numerical kind

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.

Cuchulainn
Topic Author
Posts: 64433
Joined: July 16th, 2004, 7:38 am
Location: Drosophila melanogaster
Contact:

### Re: One-liner questions of a numerical kind

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.
"Compatibility means deliberately repeating other people's mistakes."
David Wheeler

http://www.datasimfinancial.com
http://www.datasim.nl

Cuchulainn
Topic Author
Posts: 64433
Joined: July 16th, 2004, 7:38 am
Location: Drosophila melanogaster
Contact:

### Re: One-liner questions of a numerical kind

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
"Compatibility means deliberately repeating other people's mistakes."
David Wheeler

http://www.datasimfinancial.com
http://www.datasim.nl

Cuchulainn
Topic Author
Posts: 64433
Joined: July 16th, 2004, 7:38 am
Location: Drosophila melanogaster
Contact:

### Re: One-liner questions of a numerical kind

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
"Compatibility means deliberately repeating other people's mistakes."
David Wheeler

http://www.datasimfinancial.com
http://www.datasim.nl

Alan
Posts: 10610
Joined: December 19th, 2001, 4:01 am
Location: California
Contact:

### Re: One-liner questions of a numerical kind

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.

Cuchulainn
Topic Author
Posts: 64433
Joined: July 16th, 2004, 7:38 am
Location: Drosophila melanogaster
Contact:

### Re: One-liner questions of a numerical kind

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.
"Compatibility means deliberately repeating other people's mistakes."
David Wheeler

http://www.datasimfinancial.com
http://www.datasim.nl

Cuchulainn
Topic Author
Posts: 64433
Joined: July 16th, 2004, 7:38 am
Location: Drosophila melanogaster
Contact:

### Re: One-liner questions of a numerical kind

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.
Update: for the CIR ZCB PDE I use a priori energy estimates from 1st principles to "generate" Fichera and Feller. I don't need them.
But if $\sigma >= \sqrt{2 a}$ then the energy inequality has a term in $B$ at $r =0$, so we give a Dirichlet BC?

The PDE for the duration $B_r$ has $B$ on RHS as driving term. But the Fichera for the former is $a > 0$. Looks like non-uniqueness.

I am trying to relate your p. 349 to my models..

Conjecture: if $a > 0$ and $\sigma < \sqrt{2 a}$ then $B_r$ satisfies a priori estimate?
"Compatibility means deliberately repeating other people's mistakes."
David Wheeler

http://www.datasimfinancial.com
http://www.datasim.nl

Alan
Posts: 10610
Joined: December 19th, 2001, 4:01 am
Location: California
Contact:

### Re: One-liner questions of a numerical kind

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.
Update: for the CIR ZCB PDE I use a priori energy estimates from 1st principles to "generate" Fichera and Feller. I don't need them.
But if $\sigma >= \sqrt{2 a}$ then the energy inequality has a term in $B$ at $r =0$, so we give a Dirichlet BC?

The PDE for the duration $B_r$ has $B$ on RHS as driving term. But the Fichera for the former is $a > 0$. Looks like non-uniqueness.

I am trying to relate your p. 349 to my models..

>> For $0 < a < \sigma^2/2$, the most general solution is given by my 2nd line of (7.35). There $f(s)$ is the flux at the origin, defined at (7.5), and is an arbitrary function. If f=0, you get a reflecting solution; for another choice of f, you get an absorbing solution. I think you have to read the whole chapter 7 pretty carefully through pg. 362 for it to make sense.