Package org.drip.service.template
Class OTCInstrumentBuilder
java.lang.Object
org.drip.service.template.OTCInstrumentBuilder
public class OTCInstrumentBuilder
extends java.lang.Object
OTCInstrumentBuilder contains static Helper API to facilitate Construction of OTC Instruments.
- Module = Computational Core Module
- Library = Computation Support
- Project = Environment, Product/Definition Containers, and Scenario/State Manipulation APIs
- Package = Curve Construction Product Builder Templates
- Author:
- Lakshmi Krishnamurthy
-
Constructor Summary
Constructors Constructor Description OTCInstrumentBuilder()
-
Method Summary
Modifier and Type Method Description static FRAStandardCapFloor[]
CapFloor(JulianDate dtSpot, ForwardLabel forwardLabel, java.lang.String[] astrMaturityTenor, double[] adblStrike, boolean bIsCap)
Construct an Instance of the Standard OTC FRA Cap/Floorstatic FRAStandardCapFloor
CapFloor(JulianDate dtSpot, ForwardLabel forwardLabel, java.lang.String strMaturityTenor, double dblStrike, boolean bIsCap)
Construct an Instance of the Standard OTC FRA Cap/Floorstatic CreditDefaultSwap[]
CDS(JulianDate dtSpot, java.lang.String[] astrMaturityTenor, double[] adblCoupon, java.lang.String strCurrency, java.lang.String strCredit)
Create an Array of the OTC CDS Instance.static CreditDefaultSwap
CDS(JulianDate dtSpot, java.lang.String strMaturityTenor, double dblCoupon, java.lang.String strCurrency, java.lang.String strCredit)
Create an Instance of the OTC CDS.static FixFloatComponent
FixFloatCustom(JulianDate dtSpot, ForwardLabel forwardLabel, java.lang.String strMaturityTenor)
Construct a Standard Fix Float Swap Instancesstatic FixFloatComponent[]
FixFloatCustom(JulianDate dtSpot, ForwardLabel forwardLabel, java.lang.String[] astrMaturityTenor)
Construct an Array of Custom Fix Float Swap Instancesstatic FixFloatComponent[]
FixFloatStandard(JulianDate dtSpot, java.lang.String strCurrency, java.lang.String strLocation, java.lang.String[] astrMaturityTenor, java.lang.String strIndex, double dblCoupon)
Construct an Array of OTC Fix Float Swaps using the specified Input Parametersstatic FixFloatComponent
FixFloatStandard(JulianDate dtSpot, java.lang.String strCurrency, java.lang.String strLocation, java.lang.String strMaturityTenor, java.lang.String strIndex, double dblCoupon)
Construct an OTC Standard Fix Float Swap using the specified Input Parametersstatic FloatFloatComponent[]
FloatFloat(JulianDate dtSpot, java.lang.String strCurrency, java.lang.String strDerivedTenor, java.lang.String[] astrMaturityTenor, double dblBasis)
Construct an Array of OTC Float-Float Swap Instancesstatic FloatFloatComponent
FloatFloat(JulianDate dtSpot, java.lang.String strCurrency, java.lang.String strDerivedTenor, java.lang.String strMaturityTenor, double dblBasis)
Construct an OTC Float-Float Swap Instancestatic SingleStreamComponent[]
ForwardRateDeposit(JulianDate dtSpot, java.lang.String[] astrMaturityTenor, ForwardLabel forwardLabel)
Construct an Array of OTC Forward Deposit Instruments from the corresponding Maturity Tenorsstatic SingleStreamComponent
ForwardRateDeposit(JulianDate dtSpot, java.lang.String strMaturityTenor, ForwardLabel forwardLabel)
Construct an OTC Forward Deposit Instrument from Spot Date and the Maturity Tenorstatic FRAStandardComponent[]
FRAStandard(JulianDate dtSpot, ForwardLabel forwardLabel, java.lang.String[] astrMaturityTenor, double[] adblFRAStrike)
Create an Array of Standard FRAs from the Spot Date, the Forward Label, and the Strikestatic FRAStandardComponent
FRAStandard(JulianDate dtSpot, ForwardLabel forwardLabel, java.lang.String strMaturityTenor, double dblStrike)
Create a Standard FRA from the Spot Date, the Forward Label, and the Strikestatic SingleStreamComponent
FundingDeposit(JulianDate dtSpot, java.lang.String strCurrency, java.lang.String strMaturityTenor)
Construct an OTC Funding Deposit Instrument from the Spot Date and the Maturity Tenorstatic SingleStreamComponent[]
FundingDeposit(JulianDate dtSpot, java.lang.String strCurrency, java.lang.String[] astrMaturityTenor)
Construct an Array of OTC Funding Deposit Instruments from their corresponding Maturity Tenorsstatic SingleStreamComponent[]
FundingDepositFutures(JulianDate dtSpot, java.lang.String strCurrency, java.lang.String[] astrDepositMaturityTenor, int iNumFutures)
Construct an Array of OTC Funding Deposit and Futures Instrumentsstatic FXForwardComponent
FXForward(JulianDate dtSpot, CurrencyPair ccyPair, java.lang.String strMaturityTenor)
Create an OTC FX Forward Componentstatic FXForwardComponent[]
FXForward(JulianDate dtSpot, CurrencyPair ccyPair, java.lang.String[] astrMaturityTenor)
Create an Array of OTC FX Forward Componentsstatic FixFloatComponent[]
OISFixFloat(JulianDate dtSpot, java.lang.String strCurrency, java.lang.String[] astrMaturityTenor, double[] adblCoupon, boolean bFund)
Construct an Array of OTC Fix Float OIS Instancesstatic FixFloatComponent
OISFixFloat(JulianDate dtSpot, java.lang.String strCurrency, java.lang.String strMaturityTenor, double dblCoupon, boolean bFund)
Construct an Instance of OTC OIS Fix Float Swapstatic FixFloatComponent[]
OISFixFloatFutures(JulianDate dtSpot, java.lang.String strCurrency, java.lang.String[] astrEffectiveTenor, java.lang.String[] astrMaturityTenor, double[] adblCoupon, boolean bFund)
Construct an Array of OTC OIS Fix-Float Futuresstatic SingleStreamComponent
OvernightDeposit(JulianDate dtSpot, java.lang.String strCurrency, java.lang.String strMaturityTenor)
Construct an OTC Overnight Deposit Instrument from the Spot Date and the Maturity Tenorstatic SingleStreamComponent[]
OvernightDeposit(JulianDate dtSpot, java.lang.String strCurrency, java.lang.String[] astrMaturityTenor)
Construct an Array of OTC Overnight Deposit Instrument from their Maturity TenorsMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
OTCInstrumentBuilder
public OTCInstrumentBuilder()
-
-
Method Details
-
FundingDeposit
public static final SingleStreamComponent FundingDeposit(JulianDate dtSpot, java.lang.String strCurrency, java.lang.String strMaturityTenor)Construct an OTC Funding Deposit Instrument from the Spot Date and the Maturity Tenor- Parameters:
dtSpot
- The Spot DatestrCurrency
- CurrencystrMaturityTenor
- The Maturity Tenor- Returns:
- Funding Deposit Instrument Instance from the Spot Date and the corresponding Maturity Tenor
-
ForwardRateDeposit
public static final SingleStreamComponent ForwardRateDeposit(JulianDate dtSpot, java.lang.String strMaturityTenor, ForwardLabel forwardLabel)Construct an OTC Forward Deposit Instrument from Spot Date and the Maturity Tenor- Parameters:
dtSpot
- The Spot DatestrMaturityTenor
- The Maturity TenorforwardLabel
- The Forward Label- Returns:
- Forward Deposit Instrument Instance from the Spot Date and the corresponding Maturity Tenor
-
OvernightDeposit
public static final SingleStreamComponent OvernightDeposit(JulianDate dtSpot, java.lang.String strCurrency, java.lang.String strMaturityTenor)Construct an OTC Overnight Deposit Instrument from the Spot Date and the Maturity Tenor- Parameters:
dtSpot
- The Spot DatestrCurrency
- CurrencystrMaturityTenor
- The Maturity Tenor- Returns:
- Overnight Deposit Instrument Instance from the Spot Date and the corresponding Maturity Tenor
-
FRAStandard
public static final FRAStandardComponent FRAStandard(JulianDate dtSpot, ForwardLabel forwardLabel, java.lang.String strMaturityTenor, double dblStrike)Create a Standard FRA from the Spot Date, the Forward Label, and the Strike- Parameters:
dtSpot
- Spot DateforwardLabel
- The Forward LabelstrMaturityTenor
- Maturity TenordblStrike
- Futures Strike- Returns:
- The Standard FRA Instance
-
FixFloatStandard
public static final FixFloatComponent FixFloatStandard(JulianDate dtSpot, java.lang.String strCurrency, java.lang.String strLocation, java.lang.String strMaturityTenor, java.lang.String strIndex, double dblCoupon)Construct an OTC Standard Fix Float Swap using the specified Input Parameters- Parameters:
dtSpot
- The Spot DatestrCurrency
- The OTC CurrencystrLocation
- LocationstrMaturityTenor
- Maturity TenorstrIndex
- IndexdblCoupon
- Coupon- Returns:
- The OTC Standard Fix Float Swap constructed using the specified Input Parameters
-
FixFloatCustom
public static final FixFloatComponent FixFloatCustom(JulianDate dtSpot, ForwardLabel forwardLabel, java.lang.String strMaturityTenor)Construct a Standard Fix Float Swap Instances- Parameters:
dtSpot
- The Spot DateforwardLabel
- The Forward LabelstrMaturityTenor
- Maturity Tenor- Returns:
- A Standard Fix Float Swap Instances
-
OISFixFloat
public static final FixFloatComponent OISFixFloat(JulianDate dtSpot, java.lang.String strCurrency, java.lang.String strMaturityTenor, double dblCoupon, boolean bFund)Construct an Instance of OTC OIS Fix Float Swap- Parameters:
dtSpot
- Spot DatestrCurrency
- CurrencystrMaturityTenor
- The OIS Maturity TenordblCoupon
- The Fixed Coupon RatebFund
- TRUE - Floater Based off of Fund- Returns:
- Instance of OIS Fix Float Swap
-
FloatFloat
public static final FloatFloatComponent FloatFloat(JulianDate dtSpot, java.lang.String strCurrency, java.lang.String strDerivedTenor, java.lang.String strMaturityTenor, double dblBasis)Construct an OTC Float-Float Swap Instance- Parameters:
dtSpot
- Spot DatestrCurrency
- CurrencystrDerivedTenor
- Tenor of the Derived LegstrMaturityTenor
- Maturity Tenor of the Float-Float SwapdblBasis
- The Float-Float Swap Basis- Returns:
- The OTC Float-Float Swap Instance
-
CDS
public static final CreditDefaultSwap CDS(JulianDate dtSpot, java.lang.String strMaturityTenor, double dblCoupon, java.lang.String strCurrency, java.lang.String strCredit)Create an Instance of the OTC CDS.- Parameters:
dtSpot
- The Spot DatestrMaturityTenor
- Maturity TenordblCoupon
- CouponstrCurrency
- CurrencystrCredit
- Credit Curve- Returns:
- The OTC CDS Instance
-
FXForward
public static final FXForwardComponent FXForward(JulianDate dtSpot, CurrencyPair ccyPair, java.lang.String strMaturityTenor)Create an OTC FX Forward Component- Parameters:
dtSpot
- Spot DateccyPair
- Currency PairstrMaturityTenor
- Maturity Tenor- Returns:
- The OTC FX Forward Component Instance
-
FundingDeposit
public static final SingleStreamComponent[] FundingDeposit(JulianDate dtSpot, java.lang.String strCurrency, java.lang.String[] astrMaturityTenor)Construct an Array of OTC Funding Deposit Instruments from their corresponding Maturity Tenors- Parameters:
dtSpot
- Spot DatestrCurrency
- CurrencyastrMaturityTenor
- Array of Maturity Tenors- Returns:
- Array of OTC Funding Deposit Instruments from their corresponding Maturity Tenors
-
FundingDepositFutures
public static final SingleStreamComponent[] FundingDepositFutures(JulianDate dtSpot, java.lang.String strCurrency, java.lang.String[] astrDepositMaturityTenor, int iNumFutures)Construct an Array of OTC Funding Deposit and Futures Instruments- Parameters:
dtSpot
- Spot DatestrCurrency
- CurrencyastrDepositMaturityTenor
- Array of Deposit Maturity TenorsiNumFutures
- Number of Serial Futures to be included- Returns:
- Array of OTC Funding Deposit Instruments from their corresponding Maturity Tenors
-
ForwardRateDeposit
public static final SingleStreamComponent[] ForwardRateDeposit(JulianDate dtSpot, java.lang.String[] astrMaturityTenor, ForwardLabel forwardLabel)Construct an Array of OTC Forward Deposit Instruments from the corresponding Maturity Tenors- Parameters:
dtSpot
- Spot DateastrMaturityTenor
- Array of Maturity TenorsforwardLabel
- The Forward Label- Returns:
- Forward Deposit Instrument Instance from the corresponding Maturity Tenor
-
OvernightDeposit
public static final SingleStreamComponent[] OvernightDeposit(JulianDate dtSpot, java.lang.String strCurrency, java.lang.String[] astrMaturityTenor)Construct an Array of OTC Overnight Deposit Instrument from their Maturity Tenors- Parameters:
dtSpot
- Spot DatestrCurrency
- CurrencyastrMaturityTenor
- Array of Maturity Tenor- Returns:
- Array of Overnight Deposit Instrument from their Maturity Tenors
-
FRAStandard
public static final FRAStandardComponent[] FRAStandard(JulianDate dtSpot, ForwardLabel forwardLabel, java.lang.String[] astrMaturityTenor, double[] adblFRAStrike)Create an Array of Standard FRAs from the Spot Date, the Forward Label, and the Strike- Parameters:
dtSpot
- Spot DateforwardLabel
- The Forward LabelastrMaturityTenor
- Array of Maturity TenorsadblFRAStrike
- Array of FRA Strikes- Returns:
- Array of Standard FRA Instances
-
FixFloatStandard
public static final FixFloatComponent[] FixFloatStandard(JulianDate dtSpot, java.lang.String strCurrency, java.lang.String strLocation, java.lang.String[] astrMaturityTenor, java.lang.String strIndex, double dblCoupon)Construct an Array of OTC Fix Float Swaps using the specified Input Parameters- Parameters:
dtSpot
- The Spot DatestrCurrency
- The OTC CurrencystrLocation
- LocationastrMaturityTenor
- Array of Maturity TenorsstrIndex
- IndexdblCoupon
- Coupon- Returns:
- The Array of OTC Fix Float Swaps
-
FixFloatCustom
public static final FixFloatComponent[] FixFloatCustom(JulianDate dtSpot, ForwardLabel forwardLabel, java.lang.String[] astrMaturityTenor)Construct an Array of Custom Fix Float Swap Instances- Parameters:
dtSpot
- The Spot DateforwardLabel
- The Forward LabelastrMaturityTenor
- Array of Maturity Tenors- Returns:
- Array of Custom Fix Float Swap Instances
-
OISFixFloat
public static final FixFloatComponent[] OISFixFloat(JulianDate dtSpot, java.lang.String strCurrency, java.lang.String[] astrMaturityTenor, double[] adblCoupon, boolean bFund)Construct an Array of OTC Fix Float OIS Instances- Parameters:
dtSpot
- Spot DatestrCurrency
- CurrencyastrMaturityTenor
- Array of OIS Maturity TenorsadblCoupon
- OIS Fixed Rate CouponbFund
- TRUE - Floater Based off of Fund- Returns:
- Array of Fix Float OIS Instances
-
OISFixFloatFutures
public static final FixFloatComponent[] OISFixFloatFutures(JulianDate dtSpot, java.lang.String strCurrency, java.lang.String[] astrEffectiveTenor, java.lang.String[] astrMaturityTenor, double[] adblCoupon, boolean bFund)Construct an Array of OTC OIS Fix-Float Futures- Parameters:
dtSpot
- Spot DatestrCurrency
- CurrencyastrEffectiveTenor
- Array of Effective TenorsastrMaturityTenor
- Array of Maturity TenorsadblCoupon
- Array of CouponsbFund
- TRUE - Floater Based off of Fund- Returns:
- Array of OIS Fix-Float Futures
-
FloatFloat
public static final FloatFloatComponent[] FloatFloat(JulianDate dtSpot, java.lang.String strCurrency, java.lang.String strDerivedTenor, java.lang.String[] astrMaturityTenor, double dblBasis)Construct an Array of OTC Float-Float Swap Instances- Parameters:
dtSpot
- Spot DatestrCurrency
- CurrencystrDerivedTenor
- Tenor of the Derived LegastrMaturityTenor
- Array of the Float-Float Swap Maturity TenorsdblBasis
- The Float-Float Swap Basis- Returns:
- Array of OTC Float-Float Swap Instances
-
CDS
public static final CreditDefaultSwap[] CDS(JulianDate dtSpot, java.lang.String[] astrMaturityTenor, double[] adblCoupon, java.lang.String strCurrency, java.lang.String strCredit)Create an Array of the OTC CDS Instance.- Parameters:
dtSpot
- Spot DateastrMaturityTenor
- Array of Maturity TenorsadblCoupon
- Array of CouponstrCurrency
- CurrencystrCredit
- Credit Curve- Returns:
- Array of OTC CDS Instances
-
FXForward
public static final FXForwardComponent[] FXForward(JulianDate dtSpot, CurrencyPair ccyPair, java.lang.String[] astrMaturityTenor)Create an Array of OTC FX Forward Components- Parameters:
dtSpot
- Spot DateccyPair
- Currency PairastrMaturityTenor
- Array of Maturity Tenors- Returns:
- Array of OTC FX Forward Component Instances
-
CapFloor
public static final FRAStandardCapFloor CapFloor(JulianDate dtSpot, ForwardLabel forwardLabel, java.lang.String strMaturityTenor, double dblStrike, boolean bIsCap)Construct an Instance of the Standard OTC FRA Cap/Floor- Parameters:
dtSpot
- Spot DateforwardLabel
- The Forward LabelstrMaturityTenor
- Cap/Floor Maturity TenordblStrike
- Cap/Floor StrikebIsCap
- TRUE - Contract is a Cap- Returns:
- The Cap/Floor Instance
-
CapFloor
public static final FRAStandardCapFloor[] CapFloor(JulianDate dtSpot, ForwardLabel forwardLabel, java.lang.String[] astrMaturityTenor, double[] adblStrike, boolean bIsCap)Construct an Instance of the Standard OTC FRA Cap/Floor- Parameters:
dtSpot
- Spot DateforwardLabel
- The Forward LabelastrMaturityTenor
- Array of Cap/Floor Maturity TenorsadblStrike
- Array of Cap/Floor StrikesbIsCap
- TRUE - Contract is a Cap- Returns:
- The Cap/Floor Instance
-