Trinomial tree swaption pricing
% This function generates the Swaption price, from a portfolio
% of underlying swaps' cash-flow. The Bermudian type swaptions are
% can be exercised at the underlying cash-flow dates. The cash-flow
% structure allows varying notionals, but only the first and last coupon
% might be irregular.
% Reminder: this swap pricing function includes the fraction
% of the current coupon if the settlement is the start date
% the floating leg is determined by the current fwd rate.
% The function cannot determine fwd rates back in the past
% (i.e. before the settlement). If the running coupon
% is to be excluded, just set the start date fwd. The cash-flow
% stream is basically determined by the Maturity time.
% The option exposure is assumed to be long (option buyer) with the convention that
% a negative fixed leg cash-flow (fix payer) entails call option exposure.
% On the other side, a positive fixed leg cash-flow (fix reciever) is associated
% to a long put swaption exposure.
%
% input
% U : code, date, principal, coupon, basis, period.
% Curve : interest rate curve object
% opt_type :
% 'vanilla'
% 'bermudan'
% 'swap' (no option)
% model :
% 'EV' (extended Vasicek)
% 'BK' (Black-Karasinski)
% a : parameter vector (3 dim vector)
Cite As
fpexp2 (2026). Trinomial tree swaption pricing (https://uk.mathworks.com/matlabcentral/fileexchange/41567-trinomial-tree-swaption-pricing), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- Computational Finance > Financial Toolbox > Financial Data Analytics >
- Computational Finance > Financial Instruments Toolbox > Price Instruments Using Functions > Yield Curves >
- Computational Finance > Financial Instruments Toolbox > Price Instruments Using Functions > Equity Derivatives >
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 |
