SOLUTIONS

CUDALINK SYMBOL
CUDAFinancialDerivative
gives the value of the specified financial instrument.
computes the specified property prop.
DetailsDetails
 The CUDALink application must be loaded using Needs["CUDALink`"].
 Valid values for instrument are:

"European" European option "American" American option "AsianArithmetic" arithmetic mean Asian option "AsianGeometric" geometric mean Asian option "BarrierDownIn" barrier downandin option "BarrierDownOut" barrier downandout option "BarrierUpIn" barrier upandin option "BarrierUpOut" barrier upandout option "LookbackFixed" European fixedstrike lookback option "LookbackFloating" European floatingstrike lookback option  Valid values for param are:

"StrikePrice" strike price "Expiration" expiration date, or time until expiration "Barriers" barrier level  Valid values for ambientparams are:

"CurrentPrice" price of the underlying asset at the reference time "Dividend" dividend paid per time unit "Volatility" current volatility of the underlying asset "InterestRate" riskfree interest rate "ExchangeRate" current price of the foreign currency "ExchangeVolatility" volatility of the foreign exchange "ForeignInterestRate" riskfree interest rate in the foreign currency "Correlation" correlation matrix for underlying assets "Rebate" rebate paid to option holder if the option expires void  Valid values for prop are:

"Charm" derivative of "Delta" with respect to the time until expiration "Color" derivative of "Gamma" with respect to the time until expiration "Delta" derivative of "Value" with respect to the time until expiration "Gamma" derivative of "Delta" with respect to the current price "Rho" derivative of the value with respect to the interest rate "Speed" derivative of "Gamma" with respect to the current price "Theta" derivative of the value with respect to the time until expiration "Value" value on the reference date "Vanna" derivative of "Vega" with respect to the current price "Vega" derivative of the value with respect to the volatility "Zomma" derivative of "Gamma" with respect to volatility  The following options can be given:

"Device" Automatic CUDA device used in computation Method Automatic specify method to be used in calculation; other possible values are , , and "DerivativeMethod" Automatic specify method to be used for calculating mathematical derivatives
ExamplesExamplesopen allclose all
Basic Examples (2)Basic Examples (2)
First, load the CUDALink application:
In[1]:= 
This generates random numbers:
In[2]:= 
This computes the price of Asian arithmetic call options corresponding to the random data:
In[3]:= 
Out[3]= 
Note that Asian arithmetic options require Monte Carlo pricing, so repeated runs will produce slightly differing results:
In[4]:= 
Out[4]= 
This generates random numbers:
In[1]:= 
This computes the firstorder derivative of price with respect to volatility () for American put options specified by the random data:
In[2]:= 
Out[2]= 
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »