Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

instswaption

Construct swaption instrument

Syntax

InstSet = instswaption(OptSpec,Strike,ExerciseDates,Spread,Settle,Maturity)
InstSet = instswaption(___,AmericanOpt,SwapReset,Basis,Principal)
InstSet = instswaption(InstSetOld,___)
[FieldList,ClassList,TypeString] = instswaption

Description

example

InstSet = instswaption(OptSpec,Strike,ExerciseDates,Spread,Settle,Maturity) to specify a European swaption.

Fill in unspecified entries vectors with the value NaN. Only one data argument is required to create the instruments; the others may be omitted or passed as empty matrices [].

example

InstSet = instswaption(___,AmericanOpt,SwapReset,Basis,Principal) to specify an American swaption.

example

InstSet = instswaption(InstSetOld,___) to add swaption instruments to an instrument variable.

example

[FieldList,ClassList,TypeString] = instswaption to list field metadata for the swaption instrument.

Examples

collapse all

This example shows how to create two European swaption instruments using the following data.

OptSpec = {'Call'; 'Put'};
Strike = .05;
ExerciseDates = 'jan-1-2011';
Spread=0;
Settle = 'jan-1-2007';
Maturity = 'jan-1-2012';
AmericanOpt = 0;

InstSet = instswaption(OptSpec, Strike, ExerciseDates, Spread, Settle, Maturity, ...
 AmericanOpt);

% view the European swaption instruments using instdisp
instdisp(InstSet)
Index Type     OptSpec Strike ExerciseDates  Spread Settle         Maturity       AmericanOpt SwapReset Basis Principal FloatBasis FixedBasis FloatReset FixedReset
1     Swaption Call    0.05   01-Jan-2011    0      01-Jan-2007    01-Jan-2012    0           1         0     100       NaN        NaN        NaN        NaN       
2     Swaption Put     0.05   01-Jan-2011    0      01-Jan-2007    01-Jan-2012    0           1         0     100       NaN        NaN        NaN        NaN       
 

This example shows how to create two European swaption instruments with receiving and paying legs using the following data.

OptSpec = {'Call'; 'Put'};
Strike = .05;
ExerciseDates = 'jan-1-2011';
Spread=0;
Settle = 'jan-1-2007';
Maturity = 'jan-1-2012';
AmericanOpt = 0;
SwapReset = [2 4]; % 1st column represents receiving leg, 2nd column represents paying leg
Basis = [1 3];     % 1st column represents receiving leg, 2nd column represents paying leg

InstSet = instswaption(OptSpec,Strike,ExerciseDates,AmericanOpt,Spread,Settle,Maturity, ...
SwapReset,Basis);

View the European swaption instruments using instdisp.

instdisp(InstSet)
Index Type     OptSpec Strike ExerciseDates  Spread Settle Maturity       AmericanOpt SwapReset Basis Principal FloatBasis FixedBasis FloatReset FixedReset
1     Swaption Call    0.05   01-Jan-2011    0      0      01-Jan-2007    NaN         2  4      1  3  100       NaN        NaN        NaN        NaN       
2     Swaption Put     0.05   01-Jan-2011    0      0      01-Jan-2007    NaN         2  4      1  3  100       NaN        NaN        NaN        NaN       
 

Input Arguments

collapse all

Definition of the option as 'call' or 'put', specified as a NINST-by-1 cell array of character vectors with values 'call' or 'put'. A 'call' swaption entitles the buyer to pay the fixed rate. A 'put' swaption entitles the buyer to receive the fixed rate.

Data Types: char | cell

Strike swap rate values, specified as a NINST-by-1 vector.

Data Types: double

Option exercise dates, specified as a vector of date character vectors or serial date numbers. where each row is the schedule for one option and the last element of each row must be the same as the maturity of the tree.

  • For a European option, use a NINST-by-1 vector of exercise dates. Each row is the schedule for one option. For a European option, there is only one ExerciseDate on the option expiry date.

  • For an American option, use a NINST-by-2 vector of exercise dates. For each instrument, the option can be exercised on any coupon date between or including the pair of dates on that row. If only one non-NaN date is listed, or if ExerciseDates is NINST-by-1, the option can be exercised between the underlying swap Settle and the single listed ExerciseDate.

Data Types: double | char

Number of basis points over the reference rate, specified as a vector of nonnegative integers for the number of instruments (NINST)-by-1).

Data Types: single | double

Settle date for each swap, specified as a NINST-by-1 vector of date character vectors or serial date numbers.

Data Types: char | double

Maturity date for each swap, specified as a NINST-by-1 vector of date character vectors or serial date numbers.

Data Types: char | double

(Optional) Option type, specified as NINST-by-1 integer flags with values:

  • 0 — European

  • 1 — American

The AmericanOpt argument is required to invoke American exercise rules.

Data Types: double

(Optional) Reset frequency per year for each leg, specified as a NINST-by-1 vector or NINST-by-2 matrix. If SwapReset is NINST-by-2, the first column represents the receiving leg, while the second column represents the paying leg.

Data Types: double

(Optional) Day-count basis of the instrument, specified as a NINST-by-1 vector or NINST-by-2 matrix representing the basis for each leg. If Basis is NINST-by-2, the first column represents the receiving leg, while the second column represents the paying leg.

  • 0 = actual/actual

  • 1 = 30/360 (SIA)

  • 2 = actual/360

  • 3 = actual/365

  • 4 = 30/360 (PSA)

  • 5 = 30/360 (ISDA)

  • 6 = 30/360 (European)

  • 7 = actual/365 (Japanese)

  • 8 = actual/actual (ICMA)

  • 9 = actual/360 (ICMA)

  • 10 = actual/365 (ICMA)

  • 11 = 30/360E (ICMA)

  • 12 = actual/365 (ISDA)

  • 13 = BUS/252

For more information, see basis.

Data Types: double

(Optional) Notional principal amount, specified as a NINST-by-1 vector.

Data Types: double

Variable containing an existing collection of instruments, specified as a struct. Instruments are classified by type; each type can have different data fields. The stored data field is a row vector or character vector for each instrument. The InstSetOld argument is specified only when adding swaption instruments to an existing instrument set. For more information on the InstSet variable, see instget.

Data Types: struct

Output Arguments

collapse all

(Optional) Variable containing a collection of instruments. Instruments are broken down by type and each type can have different data fields. Each stored data field has a row vector or character vector for each instrument. For more information on the InstSet variable, see instget.

Data Types: double

Name of each data field for this instrument type, returned as a NFIELDS-by-1 cell array of character vectors.

Data Types: char | cell

Data class of each field, returned as a NFIELDS-by-1 cell array of character vectors. Valid character vectors are 'dble', 'date', and 'char'.

Data Types: char | cell

Type of instrument added, returned as a character vector (for a swaption, TypeString = 'Swaption').

Data Types: char

Introduced before R2006a

Was this topic helpful?