Group Abstract Group Abstract

Message Boards Message Boards

0
|
12.3K Views
|
7 Replies
|
5 Total Likes
View groups...
Share
Share this post:

Avoid problems with a triple integration? (Pricing of exotic options)

Posted 9 years ago

Hi,

I'm a new user of Mathematica and I'm writing a thesis on financial models to price options. I'm currently trying to calculate a triple integral in order to price an exotic call european option (basket option) on a basket of 3 financial assets (S1,S2 and S3) with weights of w1, w2 and w3. So my basket is w1.S1+w2.S2+w3.S3. Here is the formula :enter image description here

And this is the code that I tried (attached), but it finds a price that makes no sense... (with Rf the risk free rate, dt the maturity, n the number of assets, Sigma1 the volatility of the 1st asset, K the strike of my option, ?T.? = VCV the variance-covariance 3x3 matrix of the assets)

Thank you for your help ! Best regards, Nicolas

Attachments:
POSTED BY: Nicolas BADUEL
7 Replies
Posted 9 years ago

Thanks a lot Emerson, it works just fine !

POSTED BY: Nicolas BADUEL
Attachments:
POSTED BY: Emerson Willard
Posted 9 years ago

I double checked the formula, doesn't seem the problem come from it. This could be due to the function NIntegrate? Problem is if I use Integrate, the calculation lasts forever...

POSTED BY: Nicolas BADUEL

As best I can tell this reduces to the computation below.

NIntegrate[(671.1784345137916*E^(-2.*(0.00183562 + Log[0.00128038*x2])*
      (-162.12*(-0.00198044 + Log[0.000588107*x1]) + 
       82.7225*(0.00183562 + Log[0.00128038*x2]) - 
       37.947*(0.000608031 + Log[0.000161702*x3])) + 
     (-0.00198044 + Log[0.000588107*x1])*
      (808.576*(-0.00198044 + Log[0.000588107*x1]) - 
       162.12*(0.00183562 + Log[0.00128038*x2]) + 
       0.752924*(0.000608031 + Log[0.000161702*x3])) + 
     (0.000608031 + Log[0.000161702*x3])*
      (0.752924*(-0.00198044 + Log[0.000588107*x1]) - 
       37.947*(0.00183562 + Log[0.00128038*x2]) + 
       71.447*(0.000608031 + Log[0.000161702*x3])))*Max[0, -8665.59 + x1 + x2 + x3])/
  (x1*x2*x3), {x1, 0, Infinity}, {x2, 0, Infinity}, {x3, 0, Infinity}]

Creating a table of values in the ranges of 0 to 10000 in steps of 2000 for each variable will show that the result is not implausible. So either there are bad evaluations e.g. from cancellation error in machine arithmetic, or else the underlying integral is not what was wanted. Changing the values from machine numbers to exact nearby rationals, and evaluating at high precision, I get results consistent with the machine precision results. This makes me suspect numeric error is not the issue.

POSTED BY: Daniel Lichtblau
Posted 9 years ago
Attachments:
POSTED BY: Nicolas BADUEL

@Nicolas BADUEL please follow the forum rules http://wolfr.am/READ-1ST edit your post and attach all files necessary to run your code.

POSTED BY: EDITORIAL BOARD

I'm not able to run that notebook (n access to the xlsx files).

POSTED BY: Daniel Lichtblau
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard