 Rabelais
Topic Author
Posts: 9
Joined: September 22nd, 2020, 6:33 pm

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

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 A trick that I was using for this kind of problem: try using the boundary conditions $u^{N} = 2 u^{N-1} - u^{N-2}$,  $u^{0} = 2 u^{1} - u^{2}$ modelling $\partial_{xx}u=0$ (linear behavior at infinity). AFAIR, this saved me to compute complex, payoff dependent, Dirichlet or Neuman boundary conditions. Obviously it only works for linear at infinity type payoff.
Could you explain more about $u^{N} = 2 u^{N-1} - u^{N-2}$,  $u^{0} = 2 u^{1} - u^{2}$? Do they are the right and left BC or something else? Thanks for support Rabelais
Topic Author
Posts: 9
Joined: September 22nd, 2020, 6:33 pm

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

I was trying to answer to your point above : "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  which in general is not 0, in contrast with what I said above about FF being 0 at time 0. What is wrong in the reasoning?"[/ltr]
[ltr]I was just saying that the value computed is the fair price of the forward contract, not its payoff. Thus there is no reason that this quantity nullifies.[/ltr]
What's the difference between the fair price and the payoff? Moreover, you said that I'm computing the fair price (is this bad?), but so what is the payoff in this case? Thank you for help JohnLeM
Posts: 469
Joined: September 16th, 2008, 7:15 pm

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

I was trying to answer to your point above : "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  which in general is not 0, in contrast with what I said above about FF being 0 at time 0. What is wrong in the reasoning?"[/ltr]

[ltr]I was just saying that the value computed is the fair price of the forward contract, not its payoff. Thus there is no reason that this quantity nullifies.[/ltr]

What's the difference between the fair price and the payoff? Moreover, you said that I'm computing the fair price (is this bad?), but so what is the payoff in this case? Thank you for help
mm...I will try to do my best to make the definition understandable (if a purist read this answer: I don't want to speak about filtration here)

I would say that a payoff is a precisely a measure $d P(t,x)$, but think about it as being a function $P(T,x)$, where T is called the maturity, it is easier to understand. For instance $P(T,x) = max(x-K,0)$ is the payoff of an option, that is the amount of money paid at maturity T.

To define a fair price, you need first a stochastic process $t \mapsto x_t$ (modeling a market, as the price of a share). The fair price of P, at time $t \le T$, hypothesizing that the stochastic process is at state y,  that I denote $\bar{P}(t,y)$, is precisely the expectation of the payoff  : $\bar{P}(t,y) = \mathbb{E}^{x_T}(P(T,.) | x_t = y)$. This is exactly what is computing the Black and Scholes PDE equation, or any Monte-Carlo based method.

Without mathematic: the payoff describes the amount of money that a contract gives, since the fair price is the price at which one should buy or sell this contract to be risk free. Another more simple phrasing: when a bank buy or sell any financial contract, they usually first compute the fair, risk free price of this contract, then add a commission depending on his client. The commission depends on obviously the bank appetite, but more subtly on the risk beard by this particular client. Cuchulainn
Posts: 63379
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

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

Has OP's question been resolved yet?
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?

Has OP's question been resolved yet?
You mean constructing monotone conservative dissipative schemes ?
For the simple FD heat equation yes, but it is really a straightforward, very simple idea.
The difficulty is to generalize the proof to the schemes I really use, that is more challenging. It seems that it could lead to general monotone schemes conservative / dissipative schemes for hyperbolic/parabolic equations. From a discrete point of view, the central concept is M-Matrix I think. You want to work with me on this topic ?
Last edited by JohnLeM on October 3rd, 2020, 12:25 pm, edited 1 time in total. Cuchulainn
Posts: 63379
Joined: July 16th, 2004, 7:38 am
Location: Amsterdam
Contact:

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

See OP's question of Fri Oct 02, 2020 9:56 pm
Last edited by Cuchulainn on October 3rd, 2020, 12:25 pm, edited 1 time in total.
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?

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

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

This thread is so confused that it reminds me of list (or list1 in a slightly later incarnation). First observation, the “forward price” is not a price, in the way we usually define it. A forward contract will have as one of its contractual features a forward price, which acts in a manner very similar to the strike price of an options contract. When we solve for “the forward price” in a given context, it would be the contractual forward price that makes the initial value of the contract zero. Very much like a market quoted swap rate for a given maturity and other (usually standard) terms and conditions. For an underlying asset that can be costlessly stored and doesn’t generate any intermediate value (like paying a dividend or a coupon), the forward price is simply the spot price divided by the discount factor to the contract maturity date. For the general case, you need a valuation operator. You (or Schwartz as it may be) obtain that by assuming a constant risk premium and taking a risk neutral expectation, given by (2) that completely solves the problem. Any desire to further screw around with PDEs would presumably just be for educational purposes, which is fine. The confusion arises from the (important) distinction between the forward price, F, and the value of the forward contract, say V. F is given by (2), and V has the property that for an “on market” forward contract its time zero value equals zero. DavidJN
Posts: 1767
Joined: July 14th, 2002, 3:00 am

### 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? DavidJN
Posts: 1767
Joined: July 14th, 2002, 3:00 am

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

I'll try to be less cryptic. Why price a simple forward contract in such a complicated fashion when no-arbitrage considerations relative to the underlying prices make delta 1 product valuation nearly trivial. JohnLeM
Posts: 469
Joined: September 16th, 2008, 7:15 pm

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

I'll try to be less cryptic. Why price a simple forward contract in such a complicated fashion when no-arbitrage considerations relative to the underlying prices make delta 1 product valuation nearly trivial.
For code quality, it is desirable to test trivial input to show that any algorithm (here a PDE solver) is coherent. JohnLeM
Posts: 469
Joined: September 16th, 2008, 7:15 pm

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

Very much like a market quoted swap rate for a given maturity and other (usually standard) terms and conditions. For an underlying asset that can be costlessly stored and doesn’t generate any intermediate value (like paying a dividend or a coupon), the forward price is simply the spot price divided by the discount factor to the contract maturity date.
This is a contract seller viewpoint, but discount factors are not universal data. For a third party, the discount factor might not be the same, and the price not null at origination of a swap: my discount factor might be 2% as a individual. A major bank has negative discount rates today (for short terms).
Last edited by JohnLeM on October 4th, 2020, 7:47 am, edited 2 times in total. JohnLeM
Posts: 469
Joined: September 16th, 2008, 7:15 pm

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

A trick that I was using for this kind of problem: try using the boundary conditions $u^{N} = 2 u^{N-1} - u^{N-2}$,  $u^{0} = 2 u^{1} - u^{2}$ modelling $\partial_{xx}u=0$ (linear behavior at infinity). AFAIR, this saved me to compute complex, payoff dependent, Dirichlet or Neuman boundary conditions. Obviously it only works for linear at infinity type payoff.
Could you explain more about $u^{N} = 2 u^{N-1} - u^{N-2}$,  $u^{0} = 2 u^{1} - u^{2}$? Do they are the right and left BC or something else? Thanks for support
Yes these are possible boundary conditions at right and left side. JohnLeM
Posts: 469
Joined: September 16th, 2008, 7:15 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. 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'll try to be less cryptic. Why price a simple forward contract in such a complicated fashion when no-arbitrage considerations relative to the underlying prices make delta 1 product valuation nearly trivial.
I don't think this is the real question. I find it a bit surprising as the underlying rationale is clear even though it is only implicit.
// The OP question is how to find the boundary conditions,  no more, no less. What's happening here in this thread is an example of we call requirements drift in software projects.

My answer/guess would be that OP is learning PDE/FDM by taking a problem with a known solution and using the exact solution. Things to pay attention to are 1) mean reversion, 2) boundary conditions.

Then once this PDE has bee solve you solve more complex problems w/o analytical solution.

Anyways, that's my viewpoint.

//
“The heart of mathematics consists of concrete examples and concrete problems. Big general theories are usually afterthoughts based on small but profound insights; the insights themselves come from concrete special cases.”

— Paul Halmos
My C++ Boost code gives
262537412640768743.999999999999250072597198185688879353856337336990862707537410378210647910118607313

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