Previous Topic

Next Topic

oSWPir1_Price( ) - Interest Rate Swap 1 Price Function

Component

Resolution - Swap Pricing

 

 

Function Definition

oSWPir1_Price(SwapType, Dates, FX_Rate, FX_PayFreq, FX_BusDayConv, FX_Accrual, FL_PastRate, FL_Margin, FL_PayFreq, FL_BusDayConv, FL_Accrual, Notional, NotionalPayment, DateGen, InterpMethod, ZeroCurve, Holidays, Output)

Calculates the fair value for a vanilla interest rate swap. Also returns the fair value for the fixed leg, floating leg, accrued interest, the risk statistics, and the par swap rate.

 

 

Swap Types

Vanilla interest rate swaps.

 

 

Function Parameters

 

Parameters

Description

 

Parameter Type

 

Restrictions

.

SwapType

 

Specifies whether the swap holder receives or pays the fixed coupon stream (and visa versa). For a payer swap, the holder pays fixed and receives floating.

 

Enumerated Constant

1 - Payer
2 - Receiver

Dates

 

Four dates entered as an array.

 

Array (of Dates)

 

 

 

 

Valuation Date. The valuation date of the swap.

 

 

 

ValDate < SettleDate

 

 

Settlement Date. The date on which the trade will settle. This is typically 1-3 business days after the trade.

 

 

 

SettleDate < MatDate

 

 

Effective Date. The first date from which interest begins to accrue.

 

 

 

EffDate < MatDate

 

 

Maturity Date. The maturity date of the swap.

 

 

 

As above.

FX_Rate

 

The constant coupon rate for the fixed leg.

 

Double

 

FX_Rate >= 0

FX_PayFreq

 

Frequency of coupon payments for the fixed leg.

 

Enumerated Constant

 

1 - Annual
2 - Semi-Annual
3 - Quarterly
4 - Monthly
5 - Bi-Weekly
6 - Weekly

FX_BusDayConv

 

Business day convention for the fixed leg. Used to determine the start and end date of each coupon payment period.

See Business Day Conventions

 

Enumerated Constant

 

1 - No Adjustment
2 - Previous
3 - Following
4 - Mod Previous
5 - Mod Following
6 - EOM No Adjust
7 - EOM previous
8 - EOM following

FX_Accrual

 

Basis for determining coupon amounts and accrued interest for the fixed leg.

See Day Count Conventions

 

Enumerated Constant

 

1 - Act/Act (actual)
2 - Act/Act (bond)
3 - Act/360
4 - Act/365
5 - Act/365 ISDA
6 - Act/365 JGB (NL)
7 - 30/360 ISDA
8 - 30/360 PSA
9 - 30E/360
10 - 30E+/360
11 - Act/365L

FL_PastRate

 

The rate observed at the previous rate reset date for the floating leg.

 

Double

 

FL_ PastRate >= 0

FL_Margin

 

The margin, in basis points, that is added to each rate reset for the floating leg.

 

Double

 

FL_Margin >= 0

FL_PayFreq

 

Frequency of coupon payments for the floating leg.

 

Enumerated Constant

 

1 - Annual
2 - Semi-Annual
3 - Quarterly
4 - Monthly
5 - Bi-Weekly
6 - Weekly

FL_BusDayConv

 

Business day convention for the floating leg.

See Business Day Conventions

 

Enumerated Constant

 

1 - No Adjustment
2 - Previous
3 - Following
4 - Mod Previous
5 - Mod Following
6 - EOM No Adjust
7 - EOM previous
8 - EOM following

FL_Accrual

 

Basis for determining coupon amounts and accrued interest for the floating leg. Used to determine the start and end date of each coupon payment period.

See Day Count Conventions

 

Enumerated Constant

 

1 - Act/Act (actual)
2 - Act/Act (bond)
3 - Act/360
4 - Act/365
5 - Act/365 ISDA
6 - Act/365 JGB (NL)
7 - 30/360 ISDA
8 - 30/360 PSA
9 - 30E/360
10 - 30E+/360
11 - Act/365L

Notional

 

The notional value of the swap.

Double

 

Notional >= 0

NotionalPayment

Defines the treatment of the notional payment from a valuation point of view.

 

Enumerated Constant

1 - Notional Only
2 - Exchange at Maturity
3 - Exchange at Inception and Maturity

DateGen

 

Determines if the rate reset cycle is computed backwards from the maturity date or forwards from the effective date.

 

Enumerated Constant

 

1 - Maturity Date
2 - Effective Date

InterpMethod

 

Method used to calculate rates and discount factors from the supplied zero curve.

 

Enumerated Constant

 

1 - Discount Factors
2 - Zero Rates

ZeroCurve

 

The zero curve that is used to project cash flows for the floating leg, and to discount all cashflows for both legs.

 

Curve

 

 

Holidays

 

Schedule of non-business days (excluding weekends)

 

Date Range

 

Leave blank if not applicable

Output

 

Indicates which result, or set of results, will be displayed in the worksheet. When returning more than one value, the function must be entered as an array function. Entering a 0 will output: Fair Value, Accrued Interest, Effective Duration, Modified Convexity, PVBP, and Par Swap Rate. Entering 1 or 2 will output Fair Value and Accrued Interest for the Fixed and Floating Legs respectively. Entering a 5 will output: Effective Duration, Modified Convexity, and Price Value of a Basis Point.

 

Enumerated Constant

 

0 - All Swap Values
1 - Swap Fair Value
2 - Fixed Leg Values
3
- Floating Leg Values
4 - Swap Accrued Interest
5 - Risk Statistics
6 - Effective Duration
7 - Modified Convexity
8 - PVBP only
9
- Par Swap Rate

 

 

 

 

 

 

 

See Also

Parameter Types

Swap Function Parameters

oSWPir1_Price_FL( ) - Interest Rate Swap 1 Floating Leg Price Function

oSWPir1_Price_FX( ) - Interest Rate Swap 1 Fixed Leg Price Function

oSWPir1_Dates( ) - Interest Rate Swap 1 Dates Function

oSWPir1_CFM_FL( ) - Interest Rate Swap 1 Floating Leg Cash Flow Map Function

oSWPir1_CFM_FX( ) - Interest Rate Swap 1 Fixed Leg Cash Flow Map Function

Return to www.derivativepricing.com website

Copyright 2013 Hedgebook Ltd.