SERVING THE QUANTITATIVE FINANCE COMMUNITY

Cuchulainn
Posts: 63379
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### Re: What are the boundary conditions for the Forward contract PDE?

My C++ Boost code gives
262537412640768743.999999999999250072597198185688879353856337336990862707537410378210647910118607313

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

bearish
Posts: 5995
Joined: February 3rd, 2011, 2:19 pm

### Re: What are the boundary conditions for the Forward contract PDE?

Um… forwards are delta 1 products, right? They move more or less dollar for dollar with the underlying. They can have positive or negative market values. Is this triggering any insight?
He is dealing with a situation of a non-storable commodity, or something in that spirit, with a mean-reverting spot price process. So delta hedging (or cash and carry, as it would be referred to in old commodities text books) isn’t really part of the argument here.

Cuchulainn
Posts: 63379
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### Re: What are the boundary conditions for the Forward contract PDE?

Any desire to further screw around with PDEs would presumably just be for educational purposes, which is fine.
I think that the owner of this thread is asking for educational advises here. We are trying to do our best to help him.
"Screwing around with PDEs" is an interesting turn of phrase.
My C++ Boost code gives
262537412640768743.999999999999250072597198185688879353856337336990862707537410378210647910118607313

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

JohnLeM
Posts: 469
Joined: September 16th, 2008, 7:15 pm

### Re: What are the boundary conditions for the Forward contract PDE?

This one made me laugh a lot

bearish
Posts: 5995
Joined: February 3rd, 2011, 2:19 pm

### Re: What are the boundary conditions for the Forward contract PDE?

Any desire to further screw around with PDEs would presumably just be for educational purposes, which is fine.
I think that the owner of this thread is asking for educational advises here. We are trying to do our best to help him.
"Screwing around with PDEs" is an interesting turn of phrase.
Given that the exact solution to the valuation problem is given by equation (2), I think any further efforts at numerical solution falls into the screwing around category. Not that there is anything wrong with that! Some of my favorite memories are from screwing around.
Strictly speaking, the value function for a long position in a forward contract with maturity date T and contractual forward price K is given by $V(S_t,t) = e^{-r (T-t)} ( F(S_t,T-t) - K )$, where F() is given by 2. Inspecting its behavior should be helpful in determining boundary conditions.

Cuchulainn
Posts: 63379
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### Re: What are the boundary conditions for the Forward contract PDE?

I think that the owner of this thread is asking for educational advises here. We are trying to do our best to help him.
"Screwing around with PDEs" is an interesting turn of phrase.
Given that the exact solution to the valuation problem is given by equation (2), I think any further efforts at numerical solution falls into the screwing around category. Not that there is anything wrong with that! Some of my favorite memories are from screwing around.
Strictly speaking, the value function for a long position in a forward contract with maturity date T and contractual forward price K is given by $V(S_t,t) = e^{-r (T-t)} ( F(S_t,T-t) - K )$, where F() is given by 2. Inspecting its behavior should be helpful in determining boundary conditions.
Sure, the more ways the better. But it is possible as well to find BCs based on precise mathematical analysis.

And in many cases a range of "numerical BCs" can be used. Caveat BCs can be influenced by mean reversion.
My C++ Boost code gives
262537412640768743.999999999999250072597198185688879353856337336990862707537410378210647910118607313

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

JohnLeM
Posts: 469
Joined: September 16th, 2008, 7:15 pm

### Re: What are the boundary conditions for the Forward contract PDE?

I think that the owner of this thread is asking for educational advises here. We are trying to do our best to help him.
"Screwing around with PDEs" is an interesting turn of phrase.
Given that the exact solution to the valuation problem is given by equation (2), I think any further efforts at numerical solution falls into the screwing around category. Not that there is anything wrong with that! Some of my favorite memories are from screwing around.
Strictly speaking, the value function for a long position in a forward contract with maturity date T and contractual forward price K is given by $V(S_t,t) = e^{-r (T-t)} ( F(S_t,T-t) - K )$, where F() is given by 2. Inspecting its behavior should be helpful in determining boundary conditions.
oh, you are right, the behavior at infinity is not linear !
$V(S_t,t) = e^{-r (T-t)} ( F(S_t,T-t) - K )$, with
$\tag2 F(S_t,\tau) = \mathbb E[S_t] = \exp\bigg(e^{-\alpha\tau}\log S_t +\Big(\mu-\frac{\sigma^2}{2\alpha}-\lambda\Big)(1-e^{-\alpha\tau})+\frac{\sigma^2}{4\alpha}(1-e^{-2\alpha\tau})\bigg)$
Thus either a Dirichlet boundary condition at infinity should work
$V(S_t,t) = C(t) \big( (S_t)^{\exp^{-\alpha (T-t)}} - K(t) \big)$
with C(t) is a exponential with a lot of terms, or a Neumann one
$\partial_S V(S_t,t)=\exp(-\alpha(T-t))C(t)(S_t)^{\exp(-\alpha(T-t))-1}$
Note that if the boundary of the PDE grid is far enough, $\partial_S V(S_t,t)=0$ could be a simple choice that works.
Another idea: rewriting the whole PDE considering $(S_t)^{\exp(-\alpha(T-t))}$ as the underlying might help to simplify all this.

DavidJN
Posts: 1767
Joined: July 14th, 2002, 3:00 am

### Re: What are the boundary conditions for the Forward contract PDE?

The intent of pointing out the delta 1 thing was to suggest that the boundary conditions for the forward should be quite similar to the that of the spot. BTW are there any embedded deliver options?

bearish
Posts: 5995
Joined: February 3rd, 2011, 2:19 pm

### Re: What are the boundary conditions for the Forward contract PDE?

The intent of pointing out the delta 1 thing was to suggest that the boundary conditions for the forward should be quite similar to the that of the spot. BTW are there any embedded deliver options?

Fair enough. And I think this was (is?) mostly an educational and hypothetical exercise, so certain real world considerations like delivery options, margins, etc. were ignored. Probably reasonably so. After all, he was just looking for boundary conditions, as some people have repeatedly (and correctly) pointed out.

DavidJN
Posts: 1767
Joined: July 14th, 2002, 3:00 am

### Re: What are the boundary conditions for the Forward contract PDE?

Maturity date boundary condition: Suppose you are long a forward contract obliging you to buy the underlying at price $X at some specified maturity T. If the underlying price, S, is strictly non-negative, then the payoff at T is Max[S – X, -X]. Since by assumption the underlying has a minimum price of zero, the obligation to pay$X to buy something worthless means you lose \$X. You can’t have a worse outcome than that. Presumably the price is not bounded on the upside, so the forward payoff is not bounded on the upside.

Is this the kind of thing you are looking for?

JohnLeM
Posts: 469
Joined: September 16th, 2008, 7:15 pm

### Re: What are the boundary conditions for the Forward contract PDE?

The intent of pointing out the delta 1 thing was to suggest that the boundary conditions for the forward should be quite similar to the that of the spot. BTW are there any embedded deliver options?
The pit might be here: it seems that this is true only at maturity for people using Schwartz modeling. For intermediate time, it seems to behave like $S^{\exp(-\alpha(T-t))}$. This behavior is a game changer if one want to compute forward prices or sensitivities. I guess that Schwartz modeling is used to get fatter probability tails than log-normal ones.

Cuchulainn
Posts: 63379
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### Re: What are the boundary conditions for the Forward contract PDE?

JohnLeM,
Your latex notation needs some seeing to.
My C++ Boost code gives
262537412640768743.999999999999250072597198185688879353856337336990862707537410378210647910118607313

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

JohnLeM
Posts: 469
Joined: September 16th, 2008, 7:15 pm

### Re: What are the boundary conditions for the Forward contract PDE?

JohnLeM,
Your latex notation needs some seeing to.
Google translated seeing to as "the act of hitting someone repeatedly and hard".
Wow, do I really deserve a spank ? Which notation is awful ?

Cuchulainn
Posts: 63379
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

### Re: What are the boundary conditions for the Forward contract PDE?

Don't take it personally. Just improve.

Do this in latex.

ltr]V(S0,0)=(F(S0,0)K)erTV(S0,0)=(F(S0,0)−K)e−rT

What the hell is it?
My C++ Boost code gives
262537412640768743.999999999999250072597198185688879353856337336990862707537410378210647910118607313

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

JohnLeM
Posts: 469
Joined: September 16th, 2008, 7:15 pm

### Re: What are the boundary conditions for the Forward contract PDE?

Don't take it personally. Just improve.

Do this in latex.

ltr]V(S0,0)=(F(S0,0)K)erTV(S0,0)=(F(S0,0)−K)e−rT

What the hell is it?
I think this is bad copy / paste from the OP (Owner of Post) : "At the end of the finite difference scheme, to obtain the value of the option at time 0 we compute
[ltr]V(S0,0)=(F(S0,0)K)erTV(S0,0)=(F(S0,0)−K)e−rT"[/ltr]