bondOutrightRepoPricer

First introduced in version 3.00.6

Syntax

bondOutrightRepoPricer(instrument, pricingDate, discountCurve)

Details

Prices bond outright repos.

Parameters

instrument is an INSTRUMENT scalar or vector that specifies the bond repo to price. For field requirements, see the product field description.

pricingDate is a DATE scalar or vector that specifies the pricing date.

discountCurve is a MKTDATA scalar or vector that specifies the spot curve (IrYieldCurve) used to calculate discount factors.

Returns

DOUBLE scalar or vector, indicating the net present value (NPV) of the repo.

Examples

This example constructs a repo contract based on a fixed-rate bond and prices its cash flows by discounting them using the specified yield curve, ultimately obtaining the trade's theoretical value on the valuation date.

bond = {
    "productType": "Cash",
    "assetType": "Bond",
    "bondType": "FixedRateBond",
    "instrumentId": "220010.IB",
    "start": 2022.06.16,
    "maturity": 2032.06.16,
    "issuePrice": 100.0,
    "coupon": 0.0276,
    "frequency": "Semiannual",
    "dayCountConvention": "Actual360"
}

bondOutrightRepo =  {
    "productType": "Cash",
    "assetType": "Repo",
    "repoType":"BondOutrightRepo",
    "notionalCurrency": "CNY",
    "notionalAmount": 1E6,
    "start": 2025.05.15,
    "maturity": 2025.08.15,
    "rate": 0.02,
    "dayCountConvention": "Actual360",
    "payReceive": "Receive",
    "underlying":bond
}

instrument = parseInstrument(bondOutrightRepo)

pricingDate = 2025.06.10
curve_dict = {
    "mktDataType": "Curve",
    "curveType": "IrYieldCurve",
    "referenceDate": pricingDate,
    "currency": "CNY",
    "dayCountConvention": "Actual365",
    "compounding": "Continuous",  //Continuous compounding
    "interpMethod": "Linear",
    "extrapMethod": "Flat",
    "frequency": "Annual",
    "dates":[2025.07.25, 2030.09.25],
    "values":[0.015, 0.015]
}
discountCurve = parseMktData(curve_dict)
price = bondOutrightRepoPricer(instrument,2025.06.10,discountCurve)
print(price)
// Output: 1016338.506363639258779

Related functions: parseInstrument and parseMktData

Product Field Description

Field Name Type Description Required
productType STRING Set this field to "Cash". Yes
assetType STRING Set this field to "Repo". Yes
repoType STRING Set this field to "BondOutrightRepo". Yes
notionalAmount DOUBLE Notional amount Yes
notionalCurrency STRING Notional currency, defaults to "CNY" No
instrumentId STRING User-defined unique identifier, such as "repo000002" No
start DATE Interest start date Yes
maturity DATE Maturity date Yes
rate DOUBLE Repo rate Yes
payReceive STRING Payment/receipt indicator; "Pay" indicates the repo side, and "Receive" indicates the reverse repo side Yes
underlying DICT/INSTRUMENT Basic information about the pledged bonds Yes
dayCountConvention STRING Day count convention. Valid values are "ActualActualISDA", "ActualActualISMA", "Actual365", and "Actual360". Yes
discountCurve STRING Name of the discount curve used as a pricing reference; for CNY deposits, the default is "CNY_FR_007". No