Previous Topic

Next Topic

oSWPcmd1_Price( ) - Commodity Swap 1 Price Function

Component

Resolution - Swap Pricing

 

 

Function Definition

oSWPcmd1_Price(SwapType, Dates, FX_Price, FX_PayFreq, FX_BusDayConv, FL_ForwardPrices, FL_PayFreq, FL_BusDayConv, Quantity, DateGen, InterpMethod, ZeroCurve, Holidays, Output)

Calculates the fair value for a vanilla commodity swap. Also returns the fair value for the fixed leg, floating leg, and the par swap rate.

 

 

Swap Types

Commodity swaps.

 

 

Function Parameters

 

Parameters

Description

 

Parameter Type

 

Restrictions

.

SwapType

 

Specifies whether the swap holder receives or pays the fixed leg (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)

 

 

 

 

Value 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 start date of the swap.

 

 

 

EffDate < MatDate

 

 

Maturity Date. The maturity date of the swap.

 

 

 

As above.

FX_Price

 

The price per unit for the fixed leg.

 

Double

 

FX_Price >= 0

FX_PayFreq

 

Frequency of 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 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

FL_ForwardPrices

 

The current forward price curve.

 

Curve

 

 

FL_ PayFreq

 

Frequency of payments for the floating leg.

 

Enumerated Constant

 

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

FL_BusDay Conv

 

Business day convention for the floating leg. Used to determine the start and end date of each 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

Quantity

 

The number of units of the commodity traded at each payment date.

Double

 

Quantity >= 0

DateGen

 

Determines if the 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 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, Fixed Leg Fair Value, Floating Leg Fair Value, and Par Swap Price.

 

Enumerated Constant

 

0 - All Swap Values
1 - Fair Value Only
2 - Fixed Leg Value Only
3 - Floating Leg Value
4 - Par Swap Price Only

 

 

 

 

 

 

 

See Also

Parameter Types

Swap Function Parameters

oSWPir1_Price( ) - Interest Rate Swap 1 Price Function

oSWPccy_Price( ) - Currency Swap Price Function

Return to www.derivativepricing.com website

Copyright 2013 Hedgebook Ltd.