Main Content

derivget

Get derivatives pricing options

Description

Value = derivget(Options,ParameterName) extracts the value of the specified ParameterName argument values from the derivative Options structure.

example

Examples

collapse all

Enable the display of additional diagnostic information that appears when executing pricing functions

Options = derivset('Diagnostics','on')
Options = struct with fields:
      Diagnostics: 'on'
         Warnings: 'on'
        ConstRate: 'on'
    BarrierMethod: 'unenhanced'

Use derivget to extract the value of Diagnostics from the Options structure.

Value = derivget(Options, 'Diagnostics')
Value = 
'on'

Use derivget to extract the value of ConstRate.

Value   = derivget(Options, 'ConstRate')
Value = 
'on'

If the value of 'ConstRate' is not previously set with derivset, the answer represents the default setting for 'ConstRate'.

Find the value of 'BarrierMethod' in this Options structure.

derivget(Options ,'BarrierMethod')
ans = 
'unenhanced'

Input Arguments

collapse all

Existing options specification, specified as a structure obtained from a previous call to derivset.

Data Types: struct

Parameter name to be accessed in Options structure, specified as a character vector for one of the following:

  • 'Diagnostics' — Print diagnostic information with a returned value of 'on' or 'off'. This option applies only for HJM, BDT, HW and BK pricing.

  • 'Warnings' — Display warnings with a returned value of 'on' or 'off'. This option applies only for HJM, BDT, HW and BK pricing.

  • 'ConstRate' — Assume constant rates between tree nodes with a returned value of 'on' or 'off'. This option applies only for HJM, BDT, HW and BK pricing.

  • BarrierMethod — Method for pricing Barrier option. The returned values are either 'unenhanced' that uses no correction calculation or 'interp' that uses an enhanced valuation interpolating between nodes on barrier boundaries.

Data Types: char

Output Arguments

collapse all

Value, returned as a character vector depending on the specified ParameterName.

Version History

Introduced before R2006a