Serving the Quantitative Finance Community

 
MAYbe
Topic Author
Posts: 30
Joined: July 8th, 2016, 2:37 pm

Finite difference method for early exercise boundary specifically

May 29th, 2017, 6:10 pm

Hi i been looking around the net for a Finite difference script/routine (For Matlab, c++, python) which specifically can depict the early exercise boundary for an American put with the following inputs:

S = 100
K = 100
r = 0.08
volatility = 0.2
dividend = 0.04
T = 3.0
dt = 0.03

I want the routine to yield a Boundary value for every dt from 0 up to T. ? Can someone suggest a working finite difference routine/script (For Matlab,c++,python) which is able to do that ?
 
User avatar
outrun
Posts: 4573
Joined: January 1st, 1970, 12:00 am

Re: Finite difference method for early exercise boundary specifically

May 29th, 2017, 7:28 pm

Is the put price around 8.94397963647 ?


If so then I have these values below..,.. the grid is however *not* uniform with dt=0.03
Image
3.00000000 75.83420349
2.99649770 75.83829630
2.98601125 75.85059095
2.96860179 75.87113348
2.94437068 75.90000384
2.91345874 75.93730906
2.87604505 75.98319517
2.83234560 76.03783201
2.78261158 76.10142290
2.72712737 76.17420557
2.66620832 76.25644382
2.60019828 76.34843581
2.52946693 76.45051093
2.45440686 76.56302706
2.37543060 76.68637102
2.29296738 76.82095895
2.20745985 76.96723868
2.11936074 77.12568080
2.02912943 77.29678194
1.93722849 77.48106271
1.84412029 77.67906963
1.75026354 77.89136273
1.65611003 78.11852084
1.56210138 78.36113563
1.46866593 78.61981241
1.37621580 78.89515583
1.28514412 79.18777397
1.19582244 79.49826684
1.10859841 79.82722720
1.02379363 80.17522406
0.94170184 80.54280410
0.86258730 80.93047414
0.78668353 81.33870104
0.71419230 81.76789098
0.64528290 82.21838862
0.58009180 82.69045356
0.51872251 83.18425860
0.46124582 83.69986286
0.40770031 84.23720937
0.35809314 84.79609472
0.31240114 85.37616622
0.27057218 85.97688777
0.23252674 86.59753731
0.19815979 87.23716860
0.16734280 87.89460979
0.13992605 88.56842087
0.11574097 89.25689472
0.09460279 89.95800963
0.07631316 90.66943495
0.06066296 91.38847755
0.04743513 92.11209473
0.03640754 92.83683293
0.02735588 93.55885116
0.02005651 94.27384826
0.01428928 94.97710124
0.00984024 95.66337295
0.00650429 96.32697105
0.00408764 96.96161777
0.00241016 97.56053667
0.00130756 98.11624007
0.00063328 98.62065032
0.00026030 99.06467929
0.00008259 99.43836506
0.00001635 99.72976162
0.00000102 99.92462588
0.00000000 100.00000000
 
MAYbe
Topic Author
Posts: 30
Joined: July 8th, 2016, 2:37 pm

Re: Finite difference method for early exercise boundary specifically

May 29th, 2017, 7:44 pm

My value is very close "  8.94366" 
Did you attain those values using FDM ? 
Also, I maybe asking for a lot here but,  your plot is exactly what I want but I would like the dots to be more connected (a line between them maybe? ) so the boundary the depicted would be almost like a continuous function , is that possible?

I think I figured it out in mathematica!!
Last edited by MAYbe on May 29th, 2017, 8:08 pm, edited 1 time in total.
 
User avatar
Cuchulainn
Posts: 22929
Joined: July 16th, 2004, 7:38 am

Re: Finite difference method for early exercise boundary specifically

May 29th, 2017, 8:07 pm

Most FDM don't model the boundary B(t) directly as such (at least, the common-or-garden ones). You can use the Landau y = S/B(t) and then compute both V and B(t) as a nonlinear FDM.

In the easiest FDM you check the early exercise at each time level up to T. May something can be gotten out of it. Haven't tried it myself. But FDM is not handy IMO. It's derivative and your really need integrals

B(t) satisfies an integral equation directly It's mentioned in section 9.7 of Alan's book and Andersen et al has done it. 
AFAIR outrun posted but I think they gone to the big postmortem in the sky ;)


https://papers.ssrn.com/sol3/papers.cfm ... id=2547027
Last edited by Cuchulainn on May 29th, 2017, 8:24 pm, edited 1 time in total.
 
User avatar
outrun
Posts: 4573
Joined: January 1st, 1970, 12:00 am

Re: Finite difference method for early exercise boundary specifically

May 29th, 2017, 8:23 pm

My value is very close "  8.94366" 
Did you attain those values using FDM ? 
Great, then it looks we have used the same parameter definitions!
No, I didn't use FDM, it's code I had lying round.
As you notice the dots get spaced closer together near T=0 which is the region that needs more attention. Cuch has had some good results with transforming the T axis in the context of FDM as well, (right cuch?)
 
MAYbe
Topic Author
Posts: 30
Joined: July 8th, 2016, 2:37 pm

Re: Finite difference method for early exercise boundary specifically

May 29th, 2017, 8:28 pm

would it look different if You had used FDM to create it?
 
User avatar
outrun
Posts: 4573
Joined: January 1st, 1970, 12:00 am

Re: Finite difference method for early exercise boundary specifically

May 29th, 2017, 8:35 pm

would it look different if You had used FDM to create it?
I think it will look the same although I have no ideas what the precision would be with dt=0.03. I would expect anything between a 1E-5 and 2 deviation at some point on the curve.
 
MAYbe
Topic Author
Posts: 30
Joined: July 8th, 2016, 2:37 pm

Re: Finite difference method for early exercise boundary specifically

May 29th, 2017, 8:44 pm

is your method extremely accurate?. Just want to get a feel for your boundary compared to FDM or any other numerical method.
 
User avatar
outrun
Posts: 4573
Joined: January 1st, 1970, 12:00 am

Re: Finite difference method for early exercise boundary specifically

May 29th, 2017, 9:22 pm

It's highly accurate for most cases (I expect 6 digits here), but there are exstreme-ish parameter configurations where it blows up. I would still need to quantify that region before I would use it in production.

It's the method described in this paper "High Performance American Option Pricing, Andersen et al, 2015". It references a lot of papers on various boundary estimate done in the past.

The main novelties of this paper seem to result in a numerical algorithm that converged exponential-ish in time instead of e.g. square root (tree) or linear.
 
MAYbe
Topic Author
Posts: 30
Joined: July 8th, 2016, 2:37 pm

Re: Finite difference method for early exercise boundary specifically

May 29th, 2017, 9:26 pm

It's highly accurate for most cases (I expect 6 digits here), but there are exstreme-ish parameter configurations where it blows up. I would still need to quantify that region before I would use it in production.

It's the method described in this paper "High Performance American Option Pricing, Andersen et al, 2015". It references a lot of papers on various boundary estimate done in the past.

The main novelties of this paper seem to result in a numerical algorithm that converged exponential-ish in time instead of e.g. square root (tree) or linear.
Ah I see! So would you then argue that it is more accurate than the standard FDM?
 
User avatar
outrun
Posts: 4573
Joined: January 1st, 1970, 12:00 am

Re: Finite difference method for early exercise boundary specifically

May 29th, 2017, 9:43 pm

It's highly accurate for most cases (I expect 6 digits here), but there are exstreme-ish parameter configurations where it blows up. I would still need to quantify that region before I would use it in production.

It's the method described in this paper "High Performance American Option Pricing, Andersen et al, 2015". It references a lot of papers on various boundary estimate done in the past.

The main novelties of this paper seem to result in a numerical algorithm that converged exponential-ish in time instead of e.g. square root (tree) or linear.
Ah I see! So would you then argue that it is more accurate than the standard FDM?
I think so -for this case- but all methods have strengths and weaknesses. E.g. FDM is more flexible and easier. 
I tried to study and plot error vs computation time against some *tree* methods and convergence was very fast for parameters similar to yours. In this plot the methods of the paper is "And" (the blue dots), and I only have two blue dots before it hit machine precision. It's still on my (low priority) todo list to run it with high precision math engine and see how  error vs computation time relate if we have more digits.
Image
 
MAYbe
Topic Author
Posts: 30
Joined: July 8th, 2016, 2:37 pm

Re: Finite difference method for early exercise boundary specifically

May 29th, 2017, 10:05 pm

It's highly accurate for most cases (I expect 6 digits here), but there are exstreme-ish parameter configurations where it blows up. I would still need to quantify that region before I would use it in production.

It's the method described in this paper "High Performance American Option Pricing, Andersen et al, 2015". It references a lot of papers on various boundary estimate done in the past.

The main novelties of this paper seem to result in a numerical algorithm that converged exponential-ish in time instead of e.g. square root (tree) or linear.
Ah I see! So would you then argue that it is more accurate than the standard FDM?
I think so -for this case- but all methods have strengths and weaknesses. E.g. FDM is more flexible and easier. 
I tried to study and plot error vs computation time against some *tree* methods and convergence was very fast for parameters similar to yours. In this plot the methods of the paper is "And" (the blue dots), and I only have two blue dots before it hit machine precision. It's still on my (low priority) todo list to run it with high precision math engine and see how  error vs computation time relate if we have more digits.
Image
I agree all have strengths and weaknesses , but just on the info you gave me it looks extremely accurate! I JUST WISH you could have produced the same values with a simple FDM  so could compare both :D 
 
User avatar
outrun
Posts: 4573
Joined: January 1st, 1970, 12:00 am

Re: Finite difference method for early exercise boundary specifically

May 30th, 2017, 5:58 am

Ah I see! So would you then argue that it is more accurate than the standard FDM?
I think so -for this case- but all methods have strengths and weaknesses. E.g. FDM is more flexible and easier. 
I tried to study and plot error vs computation time against some *tree* methods and convergence was very fast for parameters similar to yours. In this plot the methods of the paper is "And" (the blue dots), and I only have two blue dots before it hit machine precision. It's still on my (low priority) todo list to run it with high precision math engine and see how  error vs computation time relate if we have more digits.
Image
I agree all have strengths and weaknesses , but just on the info you gave me it looks extremely accurate! I JUST WISH you could have produced the same values with a simple FDM  so could compare both :D 
It'll be a good thing to try yourself?
 
User avatar
Cuchulainn
Posts: 22929
Joined: July 16th, 2004, 7:38 am

Re: Finite difference method for early exercise boundary specifically

May 30th, 2017, 9:38 am

As mentioned, there is no 'simple' FDM for this IMO. And since this is a nonlinear problem then accuracy is first-order, all things being equal. Or use front-tracking. LIke this

http://docs.lib.purdue.edu/cgi/viewcont ... ext=cstech

It's trickier than usual FDM but is doable.  Especially with MOL and ODE solvers.
 
MAYbe
Topic Author
Posts: 30
Joined: July 8th, 2016, 2:37 pm

Re: Finite difference method for early exercise boundary specifically

May 30th, 2017, 11:25 am

As mentioned, there is no 'simple' FDM for this IMO. And since this is a nonlinear problem then accuracy is first-order, all things being equal. Or use front-tracking. LIke this

http://docs.lib.purdue.edu/cgi/viewcont ... ext=cstech

It's trickier than usual FDM but is doable.  Especially with MOL and ODE solvers.
I wish I had their code so I could try myself, ..