SERVING THE QUANTITATIVE FINANCE COMMUNITY

mutley
Topic Author
Posts: 745
Joined: February 9th, 2005, 3:51 pm

### Finite difference and control variates

one example of this would be the half-plane used when pricing lookbacks with the change of variable X := S/SMin basically most Neumann boundary conditions would be like this, no?

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

### Finite difference and control variates

QuoteOriginally posted by: mutleyone example of this would be the half-plane used when pricing lookbacks with the change of variable X := S/SMin basically most Neumann boundary conditions would be like this, no?It depends Alan and myself had a few triathlons on this topic(it is still x% open generic research topic)1. Transformed pde to (0,1), e.g. y = S/(S+1)2. Examine BC at y = 1, e.g. Fichera, Feller3. We might even get a 1st-order hyperbolic pde on boundary for some cases, e.g. CIR, but BS pde is probably easier.A possible sparring partner for ADE is odeint in C++
Last edited by Cuchulainn on June 28th, 2015, 10:00 pm, edited 1 time in total.
Chips chips chips Du du du du du Ci bum ci bum bum Du du du du du Ci bum ci bum bum Du du du du du
http://www.datasimfinancial.com
http://www.datasim.nl

mutley
Topic Author
Posts: 745
Joined: February 9th, 2005, 3:51 pm

### Finite difference and control variates

I tried your y=S/(S+1) transformation once - I found it a bit explosive y-->1 on a call. Remember you said something about using put-call parity (i.e. price using the bounded property of a put then PCP) but unfortunately there is no PCP for my option.Even tried it for y=exp(z)/(exp(z)+1) so to get into logS transformed. but that didnt really fly. In fairness, i think i messed up my first attempt on this then gave up / got distracted.not hugely dissimilar with my efforts into radial basis functions - these work great, until i realised that the majority of the products i am working on have lots of jump conditions and monotonicity of solution is paramount (RBF has no such restrictions as to enforce this)

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

### Finite difference and control variates

You are correct; we usually offset 1 -> 1 - epsilon at the new far field boundary. But in general is very good.http://papers.ssrn.com/sol3/papers.cfm? ... id=1552926 Quotei think i messed up my first attempt on this then gave up / got distractedPossible
Last edited by Cuchulainn on June 29th, 2015, 10:00 pm, edited 1 time in total.
Chips chips chips Du du du du du Ci bum ci bum bum Du du du du du Ci bum ci bum bum Du du du du du
http://www.datasimfinancial.com
http://www.datasim.nl

emac
Posts: 89
Joined: July 7th, 2009, 7:15 pm

### Finite difference and control variates

QuoteOriginally posted by: CuchulainnWe've been through this before in an earlier thread. How do you get (deterministic) penny accuracy with MC? You can't IMO.Let $X_M$ be the standard monte carlo estimator of the mean $\mu$ of a random variable $X$, with $M$ samples . Pick an accuracy threshold, say $\epsilon = 10^{-3}$, then by Chebyshev's inequality$P \left(|X_M-\mu| > \epsilon \right) \leq \frac{E|X_M-\mu|^2}{\epsilon^2}$ The standard L^2 error for MC gives $E|X_M-\mu|^2 \leq Var(X)/M$, so that $P \left(|X_M-\mu| > \epsilon \right) \leq \frac{Var(X)}{M \,\epsilon^2}$ Now, you can pick $M$ large enough to get the given error with whatever probability you like.
Last edited by emac on June 29th, 2015, 10:00 pm, edited 1 time in total.

mutley
Topic Author
Posts: 745
Joined: February 9th, 2005, 3:51 pm

### Finite difference and control variates

I might be misreading you but doesn't that require you to know the variance of the payoff i.e. we want to know the price of the derivative has converged and you are telling me that M is a function of Var(X) - X being the price of the derivative on a given sample?

emac
Posts: 89
Joined: July 7th, 2009, 7:15 pm

### Finite difference and control variates

QuoteOriginally posted by: mutleyI might be misreading you but doesn't that require you to know the variance of the payoff i.e. we want to know the price of the derivative has converged and you are telling me that M is a function of Var(X) - X being the price of the derivative on a given sample?Yes. Although, an upper bound will do. In practice, an estimate of the variance would also suffice.I think this is the part Cuch takes issue with as well. Not sure why, though.

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

### Finite difference and control variates

QuoteOriginally posted by: emacQuoteOriginally posted by: mutleyI might be misreading you but doesn't that require you to know the variance of the payoff i.e. we want to know the price of the derivative has converged and you are telling me that M is a function of Var(X) - X being the price of the derivative on a given sample?Yes. Although, an upper bound will do. In practice, an estimate of the variance would also suffice.I think this is the part Cuch takes issue with as well. Not sure why, though.So, I am not alone:) I would like to see the implementation of this approach. How does it work, really?Not all maths is constructive.
Last edited by Cuchulainn on June 30th, 2015, 10:00 pm, edited 1 time in total.
Chips chips chips Du du du du du Ci bum ci bum bum Du du du du du Ci bum ci bum bum Du du du du du
http://www.datasimfinancial.com
http://www.datasim.nl

emac
Posts: 89
Joined: July 7th, 2009, 7:15 pm

### Finite difference and control variates

QuoteOriginally posted by: CuchulainnQuoteOriginally posted by: emacQuoteOriginally posted by: mutleyI might be misreading you but doesn't that require you to know the variance of the payoff i.e. we want to know the price of the derivative has converged and you are telling me that M is a function of Var(X) - X being the price of the derivative on a given sample?Yes. Although, an upper bound will do. In practice, an estimate of the variance would also suffice.I think this is the part Cuch takes issue with as well. Not sure why, though.So, I am not alone:) I would like to see the implementation of this approach. How does it work, really?Not all maths is constructive.This is just a way to pick the number of MC paths you need to get a given error with a given probability. It is connstructive in the sense that you pick M based on your inputs ($\epsilon$ and the probability you pick) and things you can bound, or estimate (the variance).
Last edited by emac on June 30th, 2015, 10:00 pm, edited 1 time in total.

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

### Finite difference and control variates

(double)
Last edited by Cuchulainn on June 30th, 2015, 10:00 pm, edited 1 time in total.
Chips chips chips Du du du du du Ci bum ci bum bum Du du du du du Ci bum ci bum bum Du du du du du
http://www.datasimfinancial.com
http://www.datasim.nl

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

### Finite difference and control variates

QuoteOriginally posted by: emacQuoteOriginally posted by: CuchulainnQuoteOriginally posted by: emacQuoteOriginally posted by: mutleyI might be misreading you but doesn't that require you to know the variance of the payoff i.e. we want to know the price of the derivative has converged and you are telling me that M is a function of Var(X) - X being the price of the derivative on a given sample?Yes. Although, an upper bound will do. In practice, an estimate of the variance would also suffice.I think this is the part Cuch takes issue with as well. Not sure why, though.So, I am not alone:) I would like to see the implementation of this approach. How does it work, really?Not all maths is constructive.This is just a way to pick the number of MC paths you need to get a given error with a given probability. It is connstructive in the sense that you pick M based on your inputs ($\epsilon$ and the probability you pick) and things you can bound, or estimate (the variance).That's clear. As I have never used this approach I do not see how to compute M.Has anyone written an article on this? I am open to ideas + a bit of healthy scepticism.
Chips chips chips Du du du du du Ci bum ci bum bum Du du du du du Ci bum ci bum bum Du du du du du
http://www.datasimfinancial.com
http://www.datasim.nl

emac
Posts: 89
Joined: July 7th, 2009, 7:15 pm

### Finite difference and control variates

QuoteOriginally posted by: CuchulainnQuoteOriginally posted by: emacQuoteOriginally posted by: CuchulainnQuoteOriginally posted by: emacQuoteOriginally posted by: mutleyI might be misreading you but doesn't that require you to know the variance of the payoff i.e. we want to know the price of the derivative has converged and you are telling me that M is a function of Var(X) - X being the price of the derivative on a given sample?Yes. Although, an upper bound will do. In practice, an estimate of the variance would also suffice.I think this is the part Cuch takes issue with as well. Not sure why, though.So, I am not alone:) I would like to see the implementation of this approach. How does it work, really?Not all maths is constructive.This is just a way to pick the number of MC paths you need to get a given error with a given probability. It is connstructive in the sense that you pick M based on your inputs ($\epsilon$ and the probability you pick) and things you can bound, or estimate (the variance).That's clear. As I have never used this approach I do not see how to compute M.Has anyone written an article on this? I am open to ideas + a bit of healthy scepticism.Pick an error threshold $\epsilon$ and a probability $p$. Set $M = \frac{Var(X)}{p \, \epsilon^2}$ then, by my previous calculation, $P(|X_M-\mu|>\epsilon)<p$. If you do not know $Var(X)$, you can use an upper bound.For example supposed $B$ is a Brownian motion and $X=|B_T|$. Then, $Var(X) \leq E(B_T^2)=T$, so choose say $\epsilon=10^{-2}$ and $p=10^{-2}$ then choosing$M = 10^6 \, T$ guarantees that with probability 0.99 your MC estimate is within $10^{-2}$ of the true value.Chebyshev is possibly a bit crude and sharper inequalities might allow you to choose lower $M$. Of course, in practice you also may be able to take $M$ much smaller.

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

### Finite difference and control variates

QuoteOriginally posted by: emacQuoteOriginally posted by: CuchulainnQuoteOriginally posted by: emacQuoteOriginally posted by: CuchulainnQuoteOriginally posted by: emacQuoteOriginally posted by: mutleyI might be misreading you but doesn't that require you to know the variance of the payoff i.e. we want to know the price of the derivative has converged and you are telling me that M is a function of Var(X) - X being the price of the derivative on a given sample?Yes. Although, an upper bound will do. In practice, an estimate of the variance would also suffice.I think this is the part Cuch takes issue with as well. Not sure why, though.So, I am not alone:) I would like to see the implementation of this approach. How does it work, really?Not all maths is constructive.This is just a way to pick the number of MC paths you need to get a given error with a given probability. It is connstructive in the sense that you pick M based on your inputs ($\epsilon$ and the probability you pick) and things you can bound, or estimate (the variance).That's clear. As I have never used this approach I do not see how to compute M.Has anyone written an article on this? I am open to ideas + a bit of healthy scepticism.Pick an error threshold $\epsilon$ and a probability $p$. Set $M = \frac{Var(X)}{p \, \epsilon^2}$ then, by my previous calculation, $P(|X_M-\mu|>\epsilon)<p$. If you do not know $Var(X)$, you can use an upper bound.For example supposed $B$ is a Brownian motion and $X=|B_T|$. Then, $Var(X) \leq E(B_T^2)=T$, so choose say $\epsilon=10^{-2}$ and $p=10^{-2}$ then choosing$M = 10^6 \, T$ guarantees that with probability 0.99 your MC estimate is within $10^{-2}$ of the true value.Chebyshev is possibly a bit crude and sharper inequalities might allow you to choose lower $M$. Of course, in practice you also may be able to take $M$ much smaller.That looks nice. We had dv = -1/2 sig^2 dt + sig dW before where ad-hoc guess for M was used.http://www.wilmott.com/messageview.cfm? ... SGDBTABLE=
Last edited by Cuchulainn on June 30th, 2015, 10:00 pm, edited 1 time in total.
Chips chips chips Du du du du du Ci bum ci bum bum Du du du du du Ci bum ci bum bum Du du du du du
http://www.datasimfinancial.com
http://www.datasim.nl

emac
Posts: 89
Joined: July 7th, 2009, 7:15 pm

### Finite difference and control variates

QuoteOriginally posted by: CuchulainnThat looks nice. We had dv = -1/2 sig^2 dt + sig dW before where ad-hoc guess for M was used.http://www.wilmott.com/messageview.cfm? ... DBTABLE=In this case, $Var(V_T) = \sigma^2 T$, but the rest is the same.
Last edited by emac on June 30th, 2015, 10:00 pm, edited 1 time in total.

mutley
Topic Author
Posts: 745
Joined: February 9th, 2005, 3:51 pm

### Finite difference and control variates

what does this method tell you that standard error does not? I must admit am rather skeptical of "option prices that are *guaranteed* to be within specific tolerance of the *true* value", when everything is based on spurious input at some stage

Wilmott.com has been "Serving the Quantitative Finance Community" since 2001. Continued...

 JOBS BOARD

Looking for a quant job, risk, algo trading,...? Browse jobs here...

GZIP: On