bondPledgedRepoPricer

First introduced in version: 3.00.6

Syntax

bondPledgedRepoPricer(instrument, pricingDate, discountCurve)

Details

Prices a bond pledged repo contract of BondPledgedRepo type.

Arguments

Note:
Scalar inputs will be automatically expanded to match the length of other vector inputs. All vector inputs must be of equal length.

instrument is an INSTRUMENT scalar or vector of BondPledgedRepo type indicating the bond pledged repo contract to be priced. For the required fields, see BondPledgedRepo Fields.

pricingDate is a DATE scalar or vector specifying the pricing date.

discountCurve is a MKTDATA scalar or vector of IrYieldCurve type representing the discount curve used to calculate discount factors.

Returns

A DOUBLE scalar or vector.

Examples

// =====================================================
// 1. Construct a bond pledged repo product
// =====================================================
bondPledgedRepoJson =  {
    "productType": "Cash",
    "assetType": "Repo",
    "repoType":"BondPledgedRepo",
    "notionalCurrency": "CNY",
    "notionalAmount": 1E6,
    "start": 2025.05.15,
    "maturity": 2025.08.15,
    "rate": 0.02,
    "dayCountConvention": "Actual360",
    // Pay/receive direction
    "payReceive": "Receive"
}
// =====================================================
// 2. Parse the repo product
// =====================================================
instrument = parseInstrument(bondPledgedRepoJson)
// =====================================================
// 3. Set the pricing date
// =====================================================
pricingDate = 2025.06.10
// =====================================================
// 4. Construct a discount zero-coupon yield curve
// =====================================================
curve_dict = {
    "mktDataType": "Curve",
    "curveType": "IrYieldCurve",
    "referenceDate": pricingDate,
    "currency": "CNY",
    "dayCountConvention": "Actual365",
    "compounding": "Continuous",
    "interpMethod": "Linear",
    "extrapMethod": "Flat",
    "frequency": "Annual",
    // Curve tenor node dates
    "dates":[
        2025.06.25,
        2025.07.25,
        2025.09.25,
        2025.12.25,
        2026.06.25
    ],
    // Continuously compounded zero rates at each tenor node
    "values":[
        0.014,
        0.0142,
        0.0149,
        0.0158,
        0.0171
    ]
}
// =====================================================
// 5. Parse the discount curve
// =====================================================
discountCurve = parseMktData(curve_dict)
// =====================================================
// 6. Call the bond pledged repo pricer
// =====================================================
bondPledgedRepoPricer(
    instrument,
    2025.06.10,
    discountCurve
)

BondPledgedRepo Fields

Field Type Description Required
productType STRING Fixed value: "Cash". Yes
assetType STRING Fixed value: "Repo". Yes
repoType STRING Fixed value: "BondPledgedRepo". Yes
notionalAmount DOUBLE The notional amount. Yes
notionalCurrency STRING The notional currency. The default value is "CNY". No
instrumentId STRING A user-defined unique identifier, such as "repo000001". No
start DATE The start date. Yes
maturity DATE The maturity date. Yes
rate DOUBLE The repo rate. Yes
payReceive STRING The pay/receive indicator. "Pay" indicates the repo party, and "Receive" indicates the reverse repo party. Yes
dayCountConvention STRING The day count convention. Valid values are "ActualActualISDA", "ActualActualISMA", "Actual365", and "Actual360". Yes
discountCurve STRING The name of the discount curve used for pricing. For CNY scenarios, the default value is "CNY_FR_007". No

Related functions: parseInstrument, parseMktData, irDepositPricer