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

#### Rabelais

European call

When solving the PDE for the value $$V$$ of a European call option under the Black-Scholes model using a finite difference scheme, we have that
• Initial/terminal condition. $$V(S_T,T) = \text{payoff}(S_T) = \max(S_T-K,0)$$ (initial since the scheme is solved backward, terminal since it holds at the final time $$T$$)
• Left end boundary condition. If $$S_0=0$$ then $$S_t=0$$ for all $$t$$ and the option will surely be out of the money with payoff $$\max(0-K,0)=0$$ and $$V(0,t)=0$$ for all $$t$$
• Right end boundary condition. If $$S_0$$ is large enough (w.r.t. to $$K$$) then $$S_t>K$$ for all $$t$$ and the option will end up in the money with payoff $$\max(S_t-K,0)=S_t-K$$ and $$V(S_t,t)=S_t-Ke^{-r(T-t)}$$ for all $$t$$
Forward contract

How to deduce the boundary conditions in a similar manner when solving the PDE for the value of a forward contract whose underlying follows the Schwartz mean reverting model? What I understand until now about forwards is
• There is no money exchanged when signing a forward contract so, using the notation below, I think that the value of the forward at time 0 is $$F(S_0,0)=0$$
• The payoff (of the option equivalent to this forward contract) is $$S_T-K$$ since the holder is obliged to buy the underlying at expiry
The Schwartz model is $$dS = \alpha(\mu-\log S)Sdt + \sigma S dW$$ with $$\alpha$$ speed of mean reversion. From this eq it is possible to derive the PDE for the value of the forward
$\tag1 \frac{\partial F}{\partial t} + \alpha\Big(\mu-\lambda -\log S\Big)S\frac{\partial F}{\partial S}+\frac12\sigma^2S^2\frac{\partial^2F}{\partial S^2} = 0, \qquad \text{with }\lambda = \sigma\frac{\mu-r}\alpha$ whose solution is, letting $$\tau=T-t$$
$\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)$
• Initial/terminal condition. Plugging $$\tau=0$$ (ie $$t=T$$) in $$(2)$$ we get $$F(S_T,0) = \exp(\log S_T) = S_T$$. This value appears also in the original paper by Schwartz (at page 5), so it is correct.
• Left end boundary condition. As in the European call case, if $$S_0=0$$ then $$S_t=0$$ for all $$t$$ and from $$(1)$$ we get $$\dfrac{\partial F}{\partial t}=0$$ ie $$F$$ does not change in time, and since as said before $$F(S_0,0)=0$$ (not sure though) it follows $$F(0,t)=0$$ for all $$t$$. But this means that the payoff of the option would be $$0-K$$ that is negative, since prices cannot be negative how to deal with this fact?
• Right end boundary condition. If $$S_0$$ is large enough (w.r.t. to $$K$$) then $$S_t>K$$ for all $$t$$ and the payoff of the option will be $$F(S_t,t)-K$$ and $$V(S_t,t)=(F(S_t,t)-K)e^{-r(T-t)}$$ for all $$t$$, but what can we say about the value of $$F(S_t,t)$$?
At the end of the finite difference scheme, to obtain the value of the option at time 0 we compute $$V(S_0,0) = (F(S_0,0)-K)e^{-rT}$$ which in general is not 0, in contrast with what I said above about $$F$$ being 0 at time 0. What is wrong in the reasoning?

Code

What follows is the Matlab code that computes the exact value of the option at time 0 (V_exact in the code) and the value approximated by the Euler explicit finite difference scheme (V_euler). The initial/terminal condition is applied at line 26 (F = ST), the next two lines are for the left end condition (F(1) = 0) and the right end condition (I don't know what to put here).

Moreover, I'm not sure that V_exact is computed correctly, should be $$(F-K)\exp(-rT)$$ or $$F-K\exp(-rT)$$?

#### Attachments

• boundary_cond.zip
902 bytes · Views: 14

#### Rabelais

This is the plot with spot prices at time T (vector ST in the code) on x-axis and option prices at time 0 ((F-K)*exp(-r*T) in the code) on y-axis. As you can see the there is a problem when the option price approaches the biggest value of the spot price, since the curve goes from linear to exponential, I guess this is due to the fact that the right end condition is missing

#### Daniel Duffy

##### C++ author, trainer
why post the same question on 2 forums (btw I am Cuchulainn).

#### Rabelais

why post the same question on 2 forums (btw I am Cuchulainn).
I did not know that there are the same people on the 2 forums

#### Daniel Duffy

##### C++ author, trainer
I did not know that there are the same people on the 2 forums
Just me!
Anyways, how is it working out?

#### Rabelais

Just me!
Anyways, how is it working out?
I confirm you that when using the exact solution at Smax as BC then the plot is correct, ie it is a straight line.
I'm now trying to implement the BC $$F_{SS}=0$$, I see that you are talking about the tridiagonal matrix, but since I'm using Euler explicit i did not use the matrix form but I just do
Code:
for N = 1:n
F(2:end-1) = a.*F(1:end-2) ...
+ b.*F(2:end-1) ...
+ c.*F(3:end);
end
that is F is a vector, and for example F(1:end-2) is the vector F without the last 2 elements.
Is it possible to implement that BC also in this case? Thank you very much for support

#### Daniel Duffy

##### C++ author, trainer
Taking the exact solution as "fallback" is a good test to see is the full assembled scheme is OK.
I don't use $$F_{SS}=0$$ myself (I use domain transformation or price a put) but I reckon it should work. In general, the matrix will no longer be tridiagonal.

A possibly good option is Neumann BC at boundary: $$F_{S}=1$$ since F is essentially S -K there.

Here's a scheme that uses Neumann BC, might be worth investigating (N.B. they assume convection = 0).

Last edited:

#### JohnLeM

I agree with Daniel : true boundary conditions are good, but just for testing purposes, because you will end having a payoff-dependent pricer.
F_SS = 0 is better, but you will loose some nice properties doing so.
If you are working with schwartz model, try F_S= 0 (Neumann), it might work.

Replies
0
Views
2K
Replies
2
Views
1K
Replies
0
Views
2K
Replies
6
Views
2K
Replies
0
Views
973