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 down-and-in option
    "BarrierDownOut"barrier down-and-out option
    "BarrierUpIn"barrier up-and-in option
    "BarrierUpOut"barrier up-and-out option
    "LookbackFixed"European fixed-strike lookback option
    "LookbackFloating"European floating-strike 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"risk-free interest rate
    "ExchangeRate"current price of the foreign currency
    "ExchangeVolatility"volatility of the foreign exchange
    "ForeignInterestRate"risk-free 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"AutomaticCUDA device used in computation
    MethodAutomaticspecify method to be used in calculation; other possible values are , , and
    "DerivativeMethod"Automaticspecify method to be used for calculating mathematical derivatives

ExamplesExamplesopen allclose all

Basic Examples (2)Basic Examples (2)

First, load the CUDALink application:

In[1]:=
Click for copyable input

This generates random numbers:

In[2]:=
Click for copyable input

This computes the price of Asian arithmetic call options corresponding to the random data:

In[3]:=
Click for copyable input
Out[3]=

Note that Asian arithmetic options require Monte Carlo pricing, so repeated runs will produce slightly differing results:

In[4]:=
Click for copyable input
Out[4]=

This generates random numbers:

In[1]:=
Click for copyable input

This computes the first-order derivative of price with respect to volatility () for American put options specified by the random data:

In[2]:=
Click for copyable input
Out[2]=
New to Mathematica? Find your learning path »
Have a question? Ask support »