Skip to main content
Version: Upcoming

LiveBasisCurve

V8 Message Definiton

var = vol^2 = skewMult * skewFN[ xMult * (xAxis - xShift) ]

METADATA

AttributeValue
Topic1000-analytics
MLink TokenSRMLinkAnalytics
ProductSRAnalytics
accessTypeSELECT

Table Definition

FieldTypeKeyDefault ValueComment
ekey_atenum - AssetTypePRI'None'
ekey_tsenum - TickerSrcPRI'None'
ekey_tkVARCHAR(12)PRI''
ekey_yrSMALLINT UNSIGNEDPRI0
ekey_mnTINYINT UNSIGNEDPRI0
ekey_dyTINYINT UNSIGNEDPRI0
surfaceTypeenum - SurfaceCurveTypePRI'None'
minXDOUBLE0for x in minX maxX y spline for x minX y leftA leftB x for x maxX y rightA rightB x
maxXDOUBLE0
leftADOUBLE0
leftBDOUBLE0
rightADOUBLE0
rightBDOUBLE0
numPointsINT0number of points used in basisFN fit
numExpiriesINT0number of underlierexpiries used in basisFN fit
fitMAEDOUBLE0final basisFN fit mean abs error
timestampDATETIME(6)'1900-01-01 00:00:00.000000'
PointListJSON'JSON_ARRAY()'

PRIMARY KEY DEFINITION (Unique)

FieldSequence
ekey_tk1
ekey_yr2
ekey_mn3
ekey_dy4
ekey_at5
ekey_ts6
surfaceType7

JSON Block (PointList)

FieldTypeComment
xenum - xskew x axis
yenum - yskew fn value usually y10 x00

CREATE TABLE EXAMPLE QUERY

CREATE TABLE `SRAnalytics`.`MsgLiveBasisCurve` (
`ekey_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None',
`ekey_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None',
`ekey_tk` VARCHAR(12) NOT NULL DEFAULT '',
`ekey_yr` SMALLINT UNSIGNED NOT NULL DEFAULT 0,
`ekey_mn` TINYINT UNSIGNED NOT NULL DEFAULT 0,
`ekey_dy` TINYINT UNSIGNED NOT NULL DEFAULT 0,
`surfaceType` ENUM('None','Live','PrevDay','Interp','Close','Test') NOT NULL DEFAULT 'None',
`minX` DOUBLE NOT NULL DEFAULT 0 COMMENT 'for x in (minX, maxX) y = spline(.); for x < minX: y = leftA + leftB * x; for x > maxX: y = rightA + rightB * x;',
`maxX` DOUBLE NOT NULL DEFAULT 0,
`leftA` DOUBLE NOT NULL DEFAULT 0,
`leftB` DOUBLE NOT NULL DEFAULT 0,
`rightA` DOUBLE NOT NULL DEFAULT 0,
`rightB` DOUBLE NOT NULL DEFAULT 0,
`numPoints` INT NOT NULL DEFAULT 0 COMMENT 'number of points used in basisFN fit',
`numExpiries` INT NOT NULL DEFAULT 0 COMMENT 'number of underlier/expiries used in basisFN fit',
`fitMAE` DOUBLE NOT NULL DEFAULT 0 COMMENT 'final basisFN fit mean abs error',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000',
`PointList` JSON NOT NULL DEFAULT JSON_ARRAY() CHECK(JSON_VALID(PointList)),
PRIMARY KEY USING HASH (`ekey_tk`,`ekey_yr`,`ekey_mn`,`ekey_dy`,`ekey_at`,`ekey_ts`,`surfaceType`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='var = vol^2 = skewMult * skewFN[ xMult * (xAxis - xShift) ]';

SELECT TABLE EXAMPLE QUERY

SELECT
`ekey_at`,
`ekey_ts`,
`ekey_tk`,
`ekey_yr`,
`ekey_mn`,
`ekey_dy`,
`surfaceType`,
`minX`,
`maxX`,
`leftA`,
`leftB`,
`rightA`,
`rightB`,
`numPoints`,
`numExpiries`,
`fitMAE`,
`timestamp`,
`PointList`
FROM `SRAnalytics`.`MsgLiveBasisCurve`
WHERE
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`ekey_at` = 'None'
AND
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') */
`ekey_ts` = 'None'
AND
/* Replace with a VARCHAR(12) */
`ekey_tk` = 'Example_ekey_tk'
AND
/* Replace with a SMALLINT UNSIGNED */
`ekey_yr` = 123
AND
/* Replace with a TINYINT UNSIGNED */
`ekey_mn` = 1
AND
/* Replace with a TINYINT UNSIGNED */
`ekey_dy` = 1
AND
/* Replace with a ENUM('None','Live','PrevDay','Interp','Close','Test') */
`surfaceType` = 'None';

Doc Columns Query

SELECT * FROM SRAnalytics.doccolumns WHERE TABLE_NAME='LiveBasisCurve' ORDER BY ordinal_position ASC;