eqDividendCurveBuilder

Syntax

eqDividendCurveBuilder(referenceDate, termDates, method, [futPrices], [callPrices], [putPrices], [strikes], spot, discountCurve, dayCountConvention='Actual365', [curveName])

Details

Builds an equity dividend curve.

Parameters

referenceDate A DATE scalar representing the curve’s reference date.

termDates A DATE vector representing the curve’s term dates, which must be monotonically increasing and larger than referenceDate.

method A STRING scalar representing the calculating method, which can be “CallPutParity” or “FuturesPrice”.

  • When method = “CallPutParity”, callPrices, putPrices and strikes are required.

  • When method = “FuturesPrice”, futPrices is required.

futPrices (optional) A positive DOUBLE vector representing the future prices. It should have the same length as termDates.

callPrices (optional) A positive DOUBLE matrix representing the call prices, which must have the same length as termDates.

putPrices (optional) A positive DOUBLE matrix representing the put prices.

strikes (optional) A DOUBLE matrix representing the strike prices, which must be monotonically increasing.

Notes:

  • callPrices, putPrices, and strikes must have the same shape and the number of columns should match the length of termDates.
  • futPrices must also have the same length as termDates.

spot A positive DOUBLE scalar representing the spot price of the underlying asset.

discountCurve A MKTDATA object of type IrYieldCurve representing the discount curve.

dayCountConvention A STRING scalar representing the day count convention to use, which can be:

  • "Actual365" (default): actual/365
  • "Actual360": actual/360
  • "Thirty360US": US (NASD) 30/360
  • "Thirty360EU": European 30/360
  • "ActualActualISMA": actual/actual according to ISMA (International Securities Market Association) convention
  • "ActualActualISDA": actual/actual according to ISDA (International Swaps and Derivatives Association) convention

curveName (optional) A STRING scalar representing the curve name.

Returns

A MKTDATA object of type DividendCurve.

Examples

CallPutParity

referenceDate = 2019.07.08
spot = 2.924
termDates = [2019.07.24, 2019.08.28, 2019.09.25, 2019.12.25]
callPrices = matrix(
    [0.2806, 0.2326, 0.1861, 0.1424, 0.1016, 0.0698, 0.0457, 0.0281, 0.0098, 0.0038],
    [0.2586, 0.2186, 0.1814, 0.1506, 0.1204, 0.0959, 0.0752, 0.0440, 0.0255, 0.0140],
    [0.3202, 0.2801, 0.2417, 0.2068, 0.1754, 0.1474, 0.1234, 0.1030, 0.0697, 0.0465],
    [0.3731, 0.3366, 0.3032, 0.2721, 0.2441, 0.2182, 0.1935, 0.1717, 0.1337, 0.1030]
)
putPrices = matrix(
    [0.0023, 0.0044, 0.0072, 0.0131, 0.0239, 0.0409, 0.0660, 0.1000, 0.1803, 0.2760],
    [0.0189, 0.0284, 0.0413, 0.0589, 0.0796, 0.1047, 0.1346, 0.2031, 0.2835, 0.3760],
    [0.0240, 0.0340, 0.0456, 0.0604, 0.0785, 0.1004, 0.1234, 0.1545, 0.2202, 0.2964],
    [0.0534, 0.0675, 0.0836, 0.1020, 0.1233, 0.1465, 0.1712, 0.1986, 0.2593, 0.3277]
)
strikes = matrix(
    [2.65, 2.7, 2.75, 2.8, 2.85, 2.9, 2.95, 3, 3.1, 3.2],
    [2.65, 2.7, 2.75, 2.8, 2.85, 2.9, 2.95, 3, 3.1, 3.2],
    [2.65, 2.7, 2.75, 2.8, 2.85, 2.9, 2.95, 3, 3.1, 3.2],
    [2.65, 2.7, 2.75, 2.8, 2.85, 2.9, 2.95, 3, 3.1, 3.2]
)
discountCurveDict = {
    "mktDataType": "Curve",
    "curveType": "IrYieldCurve",
    "curveName": "CNY_FR_007",
    "referenceDate": referenceDate,
    "currency": "CNY",
    "dayCountConvention": "Actual365",
    "compounding": "Continuous",
    "interpMethod": "Linear",
    "extrapMethod": "Flat",
    "dates": [
        2019.07.10, 2019.07.16, 2019.10.09, 2020.01.09, 2020.04.09,
        2020.07.09, 2021.07.09, 2022.07.11, 2023.07.10, 2024.07.09,
        2026.07.09, 2029.07.09
    ],
    "values":[
        0.0145994, 0.0229076, 0.0253021, 0.0257565, 0.0259751,
        0.0260355, 0.0265336, 0.0272721, 0.0282024, 0.0290231,
        0.0304665, 0.0319855
    ]
}
discountCurve = parseMktData(discountCurveDict)
dividendCurve = eqDividendCurveBuilder(referenceDate, termDates, "CallPutParity", ,
    callPrices, putPrices, strikes, spot, discountCurve, "Actual365", "50ETF")
print(dividendCurve)

FuturesPrice

referenceDate = 2019.07.08
spot = 3050
termDates = [2019.07.24, 2019.08.28, 2019.09.25, 2019.12.25]
futPrices = [3080, 3090, 3100, 3110]
discountCurveDict = {
    "mktDataType": "Curve",
    "curveType": "IrYieldCurve",
    "curveName": "CNY_FR_007",
    "referenceDate": referenceDate,
    "currency": "CNY",
    "dayCountConvention": "Actual365",
    "compounding": "Continuous",
    "interpMethod": "Linear",
    "extrapMethod": "Flat",
    "dates": [
        2019.07.10, 2019.07.16, 2019.10.09, 2020.01.09, 2020.04.09,
        2020.07.09, 2021.07.09, 2022.07.11, 2023.07.10, 2024.07.09,
        2026.07.09, 2029.07.09
    ],
    "values":[
        0.0145994, 0.0229076, 0.0253021, 0.0257565, 0.0259751,
        0.0260355, 0.0265336, 0.0272721, 0.0282024, 0.0290231,
        0.0304665, 0.0319855
    ]
}
discountCurve = parseMktData(discountCurveDict)
dividendCurve = eqDividendCurveBuilder(referenceDate, termDates, "FuturesPrice", futPrices,
    , , , spot, discountCurve, "Actual365", "HS300")
print(dividendCurve)

Related Function: parseMktData