Skip to main content

EventCurve

An EventCurve is a curve that is dynamically built from events.

Introduction​

An EventCurve is a very flexible and dynamic way of expressing point-in-time based future values, both real and forecasted from events that are stored in your private database, the common database and the public database.

Construction​

To construct a new EventCurve, you use the EventCurve function as shown in the syntax below:

curve = EventCurve(event, calendar, property, tenor)

An example of constructing a new EventCurve:

curve = EventCurve("AAA:EVENTS", "#REOMHENG", "price", "absolute")

Properties​

An EventCurve has the following properties:

NameDescriptionType
eventThe name of the eventlist that this Curve uses (in the form objectId:eventListId)String
propertyThe name of the property in the event that this Curve uses as the valueString
tenorThe name of the property in the event that this Curve uses as the tenor/maturity codeString
calendarThe expiry calendar for this CurveString
holidayCalendarThe holiday calendar for this Curve - this is used to determine what dates this curve should be published onString
filterOptional filter used to filter the events used to build this CurveString
sourceOptional source of the events used to build this Curve. Can be private, common or public, defaults to privateString
valueTransformationOptional value transformation expression to change all values in the curve, e.g. 'value * 1.1'String
currencyAn optional currency codeString
unitsAn optional units codeString
propertiesAny other properties you want to add onto the curveObject
precisionThe precision configuration for this curvePrecision
includeAdditional properties from an event to add as columns in the curve contractsString or Array

Examples​

Creating and saving an event curve​

EC = EventCurve("AAA:EVENTS", "#REOMHENG", "price", "relative")
EC.precision.scale = 8
AAA = Object()
AAA.EC = EC
save AAA

Using value transformation​

EC = EventCurve("AAA:EVENTS", "#REOMHENG", "price", "relative")
EC.valueTransformation = "value * 1.1"

Additional properties​

You can include additional columns in the curve from event properties, using the include property, e.g.

EC = EventCurve("AAA:EVENTS", "#REOMHENG", "price", "relative")
EC.include = "vendorId"

To include multiple additional columns use an array, e.g.

EC = EventCurve("AAA:EVENTS", "#REOMHENG", "price", "relative")
EC.include = ["vendorId", "internalId"]

Calendars​

When dynamically retrieving the historic timeseries for absolute or relative tenors, the calendar for that timeseries is determined using the following logic:

  • If a property exists with the name of the tenor, e.g. 2025M01 and the value of that property is a calendar code, that will be used.
  • If a holidayCalendar is set on the event curve, that will be used.
  • The underlying trading calendar on the expiry calendar will be used.
info

Functionality change since January 2025 (Jan25 release)

Previously the holidayCalendar property was used if present, otherwise the SPARSE calendar would be used

See Also​