Vanilla Swap

Overview

functions to construct and use VanillaSwap objects.

Function List

qlMakeIMMSwap ()
qlMakeVanillaSwap ()
qlVanillaSwap ()
qlVanillaSwapFairRate ()
qlVanillaSwapFairSpread ()
qlVanillaSwapFixedDayCount ()
qlVanillaSwapFixedLegAnalysis ()
qlVanillaSwapFixedLegBPS ()
qlVanillaSwapFixedLegNPV ()
qlVanillaSwapFixedRate ()
qlVanillaSwapFloatingDayCount ()
qlVanillaSwapFloatingLegAnalysis ()
qlVanillaSwapFloatingLegBPS ()
qlVanillaSwapFloatingLegNPV ()
qlVanillaSwapFromSwapIndex ()
qlVanillaSwapFromSwapRateHelper ()
qlVanillaSwapNominal ()
qlVanillaSwapPaymentConvention ()
qlVanillaSwapSpread ()
qlVanillaSwapType ()

Function Documentation

qlMakeIMMSwap

string returnValue
qlMakeIMMSwap(
string ObjectId
string SwapTenor
string IborIndex
double FixedRate
long FirstImmDate
string FixDayCounter
double Spread
string PricingEngineID
bool Permanent
any Trigger
bool Overwrite)
Description:

Construct an object of class VanillaSwap and return its id

Supported Platforms:

Excel, Calc, C++

Parameters
ObjectIdid of object to be created
SwapTenorswap tenor period (e.g. 2Y).
IborIndexfloating IborIndex object ID.
FixedRatethe fixed leg rate. If missing atm rate is used. Default value = QuantLib::Null<QuantLib::Rate>().
FirstImmDateFirst (IMM) date. Default value = QuantLib::Date().
FixDayCounterfixed leg day counter. Default value = 30/360 (Bond Basis).
Spreadfloating leg spread. Default value = 0.0.
PricingEngineIDDiscountSwapEngine object ID.
Permanentobject permanent/nonpermanent
Triggerdependency tracking trigger
Overwriteoverwrite flag

qlMakeVanillaSwap

string returnValue
qlMakeVanillaSwap(
string ObjectId
long SettlDays
string SwapTenor
string IborIndex
double FixedRate
string ForwardStart
string FixDayCounter
double Spread
string PricingEngineID
bool Permanent
any Trigger
bool Overwrite)
Description:

Construct an object of class VanillaSwap and return its id

Supported Platforms:

Excel, Calc, C++

Parameters
ObjectIdid of object to be created
SettlDaysNumber of days to spot date. Default value = 2.
SwapTenorswap tenor period (e.g. 5Y).
IborIndexfloating IborIndex object ID.
FixedRatethe fixed leg rate. If missing atm rate is used. Default value = QuantLib::Null<QuantLib::Rate>().
ForwardStartforward start period (from spot date).
FixDayCounterfixed leg day counter. Default value = DayCounter.
Spreadfloating leg spread. Default value = 0.0.
PricingEngineIDDiscountSwapEngine object ID.
Permanentobject permanent/nonpermanent
Triggerdependency tracking trigger
Overwriteoverwrite flag

qlVanillaSwap

string returnValue
qlVanillaSwap(
string ObjectId
string PayerReceiver
double Nominal
string FixSchedule
double FixedRate
string FixDayCounter
string FloatingLegSchedule
string IborIndex
double Spread
string FloatingLegDayCounter
string PaymentConvention
bool Permanent
any Trigger
bool Overwrite)
Description:

Construct an object of class VanillaSwap and return its id

Supported Platforms:

Excel, Calc, C++

Parameters
ObjectIdid of object to be created
PayerReceiverPAYER to pay the fixed rate, RECEIVER to receive it. Default value = Payer.
NominalNotional Amount. Default value = 100.
FixSchedulefixed leg Schedule object ID.
FixedRatethe fixed leg rate. Default value = 0.0.
FixDayCounterfixed leg day counter (e.g. Actual/360).
FloatingLegSchedulefloating leg Schedule object ID.
IborIndexfloating leg IborIndex object ID.
Spreadfloating leg spread. Default value = 0.0.
FloatingLegDayCounterfloating day counter (e.g. Actual/360).
PaymentConventionPayment dates' business day convention. Default value = Following.
Permanentobject permanent/nonpermanent
Triggerdependency tracking trigger
Overwriteoverwrite flag

qlVanillaSwapFairRate

double returnValue
qlVanillaSwapFairRate(
string ObjectId
any Trigger)
Description:

returns the fair fixed leg rate which would zero the swap NPV for the given VanillaSwap object.

Supported Platforms:

Excel, Calc

Parameters
ObjectIdid of existing QuantLib::VanillaSwap object
Triggerdependency tracking trigger

qlVanillaSwapFairSpread

double returnValue
qlVanillaSwapFairSpread(
string ObjectId
any Trigger)
Description:

returns the fair spread over the floating rate which would zero the swap NPV for the given VanillaSwap object.

Supported Platforms:

Excel, Calc

Parameters
ObjectIdid of existing QuantLib::VanillaSwap object
Triggerdependency tracking trigger

qlVanillaSwapFixedDayCount

string returnValue
qlVanillaSwapFixedDayCount(
string ObjectId
any Trigger)
Description:

returns the fixed rate day count convention for the given VanillaSwap object.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::VanillaSwap object
Triggerdependency tracking trigger

qlVanillaSwapFixedLegAnalysis

vector<vector<any> > returnValue
qlVanillaSwapFixedLegAnalysis(
string ObjectId
long AfterDate
any Trigger)
Description:

returns the fixed rate leg cash flow analysis of the given VanillaSwap object.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLibAddin::VanillaSwap object
AfterDateShows only cashflows after given date Default value = QuantLib::Date().
Triggerdependency tracking trigger

qlVanillaSwapFixedLegBPS

double returnValue
qlVanillaSwapFixedLegBPS(
string ObjectId
any Trigger)
Description:

returns the BPS of the fixed rate leg for the given VanillaSwap object.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::VanillaSwap object
Triggerdependency tracking trigger

qlVanillaSwapFixedLegNPV

double returnValue
qlVanillaSwapFixedLegNPV(
string ObjectId
any Trigger)
Description:

returns the NPV of the fixed rate leg for the given VanillaSwap object.

Supported Platforms:

Excel, Calc

Parameters
ObjectIdid of existing QuantLib::VanillaSwap object
Triggerdependency tracking trigger

qlVanillaSwapFixedRate

double returnValue
qlVanillaSwapFixedRate(
string ObjectId
any Trigger)
Description:

returns the fixed leg rate for the given VanillaSwap object.

Supported Platforms:

Excel, Calc

Parameters
ObjectIdid of existing QuantLib::VanillaSwap object
Triggerdependency tracking trigger

qlVanillaSwapFloatingDayCount

string returnValue
qlVanillaSwapFloatingDayCount(
string ObjectId
any Trigger)
Description:

returns the floating leg day count convention for the given VanillaSwap object.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::VanillaSwap object
Triggerdependency tracking trigger

qlVanillaSwapFloatingLegAnalysis

vector<vector<any> > returnValue
qlVanillaSwapFloatingLegAnalysis(
string ObjectId
long AfterDate
any Trigger)
Description:

returns the floating rate leg cash flow analysis.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLibAddin::VanillaSwap object
AfterDateShows only cashflows after given date Default value = QuantLib::Date().
Triggerdependency tracking trigger

qlVanillaSwapFloatingLegBPS

double returnValue
qlVanillaSwapFloatingLegBPS(
string ObjectId
any Trigger)
Description:

returns the BPS of the floating rate leg for the given VanillaSwap object.

Supported Platforms:

Excel, Calc

Parameters
ObjectIdid of existing QuantLib::VanillaSwap object
Triggerdependency tracking trigger

qlVanillaSwapFloatingLegNPV

double returnValue
qlVanillaSwapFloatingLegNPV(
string ObjectId
any Trigger)
Description:

returns the NPV of the floating rate leg for the given VanillaSwap object.

Supported Platforms:

Excel, Calc

Parameters
ObjectIdid of existing QuantLib::VanillaSwap object
Triggerdependency tracking trigger

qlVanillaSwapFromSwapIndex

string returnValue
qlVanillaSwapFromSwapIndex(
string ObjectId
string SwapIndex
long FixingDate
bool Permanent
any Trigger
bool Overwrite)
Description:

Construct an object of class VanillaSwap and return its id

Supported Platforms:

Excel, C++

Parameters
ObjectIdid of object to be created
SwapIndexSwapIndex object ID.
FixingDatefixing date.
Permanentobject permanent/nonpermanent
Triggerdependency tracking trigger
Overwriteoverwrite flag

qlVanillaSwapFromSwapRateHelper

string returnValue
qlVanillaSwapFromSwapRateHelper(
string ObjectId
string SwapRateHelper
bool Permanent
any Trigger
bool Overwrite)
Description:

Construct an object of class VanillaSwap and return its id

Supported Platforms:

Excel, C++

Parameters
ObjectIdid of object to be created
SwapRateHelperSwapRateHelper object ID.
Permanentobject permanent/nonpermanent
Triggerdependency tracking trigger
Overwriteoverwrite flag

qlVanillaSwapNominal

double returnValue
qlVanillaSwapNominal(
string ObjectId
any Trigger)
Description:

returns the swap nominal for the given VanillaSwap object.

Supported Platforms:

Excel, Calc

Parameters
ObjectIdid of existing QuantLib::VanillaSwap object
Triggerdependency tracking trigger

qlVanillaSwapPaymentConvention

string returnValue
qlVanillaSwapPaymentConvention(
string ObjectId
any Trigger)
Description:

returns the payment business day convention for the given VanillaSwap object.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::VanillaSwap object
Triggerdependency tracking trigger

qlVanillaSwapSpread

double returnValue
qlVanillaSwapSpread(
string ObjectId
any Trigger)
Description:

returns the spread over floating rate for the given VanillaSwap object.

Supported Platforms:

Excel, Calc

Parameters
ObjectIdid of existing QuantLib::VanillaSwap object
Triggerdependency tracking trigger

qlVanillaSwapType

string returnValue
qlVanillaSwapType(
string ObjectId
any Trigger)
Description:

returns the swap type (Payer or Receiver) of the given VanillaSwap object.

Supported Platforms:

Excel

Parameters
ObjectIdid of existing QuantLib::VanillaSwap object
Triggerdependency tracking trigger