Previous Topic

Next Topic

oSWPccy_Price( ) - Currency Swap Price Function

Component

Resolution - Swap Pricing

 

 

Function Definition

oSWPccy_Price(PricingFlags, Dates, PaymentFreq, CoupMarginPay, CoupMarginRcv, Notional, SpotRate, RatePay, RateRcv, ZeroCurvePay, ZeroCurveRcv, InterpMethod, AccrualBasis, BusinessDayConv, HolidaysPay, HolidaysRcv)

Calculates the fair value for a currency swap. Also returns the accrued interest and the risk statistics.

 

 

Swap Types

Currency Swaps

 

 

Function Parameters

 

Parameters

Description

Parameter Type

 

Restrictions

.

PricingFlags

 

Array of six Enumerated Constants:

 

Array (of Enumerated Constants)

 

 

 

ValueCurrency: Specifies whether the returned values are expressed in units of the pay leg currency or the receive leg currency.

 

 

 

1 - Pay
2 - Receive

 

 

PayLegType: Specifies whether the pay leg of the swap is fixed or floating.

 

 

 

1 - Fixed
2 - Floating

 

 

RecieveLegType: Specifies whether the receive leg of the swap is fixed or floating.

 

 

 

1 - Fixed
2 - Floating

 

 

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

 

 

 

1 - Maturity Date
2 - Effective Date

 

 

NotionalPayment: Defines the treatment of the notional payments from a valuation point of view.

 

 

 

1 - Notional Only
2 - At Maturity
3 - Inception & Maturity

 

 

OutputFlag: 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 Pay and Receive Legs respectively. Entering a 5 will output: Effective Duration, Modified Convexity, and Price Value of a Basis Point.

 

 

 

0 - All Swap Values
1 - Pay Leg Values
2 - Receive Leg Values
3 - Swap Fair Value
4 - Swap Accrued Int.
5 - Risk Statistics
6 - Effective Duration
7 - Modified Convexity
8 - PVBP only

Dates

 

Four dates entered as an array.

 

Array (of Dates)

 

 

 

 

ValuationDate: The valuation date of the swap.

 

 

 

ValDate < SettleDate

 

 

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

 

 

 

SettleDate < MatDate

 

 

EffectiveDate: The start date of the swap.

 

 

 

EffDate < MatDate

 

 

MaturityDate: The maturity date of the swap.

 

 

 

As above.

PaymentFreq

 

Array of two Enumerated Constants:

PaymentFreq_Pay: The frequency of the pay leg interest payments.

PaymentFreq_Receive: The frequency of the receive leg interest payments.

 

Enumerated Constant, or an Array of Enumerated Constants

 

If both frequencies are identical then enter a single Enumerated Constant.

CoupMarginPay

 

The margin, in basis points, that is added to each pay leg rate reset. If the pay leg is fixed then then set the margin to zero.

 

Double

 

CpnMarginDom >= 0

CoupMarginRcv

 

The margin, in basis points, that is added to each receive leg rate reset. If the receive leg is fixed then then set the margin to zero.

 

Double

 

CpnMarginFrn >= 0

Notional

 

Array of two doubles:

Notional_Pay: The notional value of the pay leg.

Notional_Receive: The notional value of the receive leg.

If the legs have the same notional value then just enter a single double.

Double, or an Array of Doubles

 

Notional >= 0

SpotRate

The current exchange rate quoted directly (domestic/foreign).

 

Double

SpotRate >= 0

RatePay

 

The coupon rate if the pay leg is fixed, or the past reset rate if the pay leg is floating.

 

Double

 

RateDom >= 0

RateRcv

 

The coupon rate if the receive leg is fixed, or the past reset rate if the receive leg is floating.

 

Double

 

RateFrn >= 0

ZeroCurvePay

 

The zero curve that is used to discount and project cash flows for the pay leg.

 

Curve

 

Curve must be three columns.

ZeroCurveRcv

 

The zero curve that is used to discount and project cash flows for the receive leg.

 

Curve

 

Curve must be three columns.

InterpMethod

 

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

 

Enumerated Constant

 

1 - Discount Factors
2 - Zero Rates

AccrualBasis

 

Array of two Enumerated Constants:

AccrualBasis_Pay: Used to determine the length (in years) of each pay leg coupon period, which is used in turn to calculate the coupon amount and accrued interest for that period.

AccrualBasis_Receive: Used to determine the length (in years) of each receive leg coupon period, which is used in turn to calculate the coupon amount and accrued interest for that period.

If both conventions are identical then just enter a single Enumerated Constant.

see Day Count Conventions

 

 

Enumerated Constant, or an Array of Enumerated Constants

 

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

BusinessDayConv

 

Array of two Enumerated Constants:

BusinessDayCon_Pay: Used to determine the start and end date of each pay leg coupon payment period.

BusinessDayCon_Receive: Used to determine the start and end date of each receive leg coupon payment period.

If both conventions are identical then just enter a single Enumerated Constant.

see Business Day Conventions

 

Enumerated Constant, or an Array of Enumerated Constants

 

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

HolidaysPay

 

Schedule of non-business days in the pay leg (excluding weekends).

 

Curve

 

Leave blank if not applicable

HolidaysRcv

 

Schedule of non-business days in the receive leg (excluding weekends).

 

Curve

 

Leave blank if not applicable

See Also

Parameter Types

Swap Function Parameters

oSWPir1_Price( ) - Interest Rate Swap 1 Price Function

oSWPcmd1_Price( ) - Commodity Swap 1 Price Function

Return to www.derivativepricing.com website

Copyright 2013 Hedgebook Ltd.