Skip to main content
Version: 8.4.10.4

SpdrRiskCounter

V8 Message Definiton

Values in this table represent current (live) SpiderRock supervisory risk counters for a corresponding risk control key.

METADATA

AttributeValue
Topic4625-risk-counter
MLink TokenSystemData
ProductSRControl
accessTypeSELECT

Table Definition

FieldTypeKeyDefault ValueComment
ticker_atenum - AssetTypePRI'None'ANYANY represents the entire control group
ticker_tsenum - TickerSrcPRI'None'ANYANY represents the entire control group
ticker_tkVARCHAR(12)PRI''ANYANY represents the entire control group
riskControlKeyVARCHAR(64)PRI''must be an SRClientAccnt if riskControlLevelAccnt must be an SRUser if riskControlLevelUser ignored if riskControlLevelClientFirm
riskControlLevelenum - RiskControlLevelPRI'None'
riskFirmVARCHAR(16)PRI''
isTestAccntenum - YesNoPRI'None'
sysRealmenum - SysRealm'None'
sysEnvironmentenum - SysEnvironment'None'original source sys environment Stable Current etc
riskEngineVARCHAR(32)''EE engine name
netDayDDeltaFLOAT0net day Delta
absDayDDeltaFLOAT0absolute day Delta ddBot ddSld position
netDayVegaFLOAT0net day Vega per
absDayVegaFLOAT0absolute day Vega veBot veSld position
netDayWtVegaFLOAT0net day WtVega
absDayWtVegaFLOAT0absolute day WtVega wvBot wvSld position
netDayNValueFLOAT0net day Notional Value
absDayNValueFLOAT0absolute day Notional Value nvBot nvSld position
netDayRMetric7FLOAT0net day RiskMetric7
absDayRMetric7FLOAT0absolute day RiskMetric7 rm7Bot rm7Sld position
netDayDDeltaEmaFLOAT-160s halflife EMA delta
netDayWtVegaEmaFLOAT-160s halflife EMA wtVega
emaTimestampDOUBLE0
liveMarginDayFLOAT0live net per symbol day portfolio day trades only margin can include external sources
liveOpenExposureFLOAT0live abs open child order Delta no netting open child orders only
dayMarginUDnVDnFLOAT0day margin UPrcDnVolDn
dayMarginUDnVUpFLOAT0day margin UPrcDnVolUp
dayMarginUUpVDnFLOAT0day margin UPrcUpVolDn
dayMarginUUpVUpFLOAT0day margin UPrcUpVolUp
numStkChildOrdersINT0
numFutChildOrdersINT0
numOptChildOrdersINT0
numMLegChildOrdersINT0
counterINT0
timestampDATETIME(6)'1900-01-01 00:00:00.000000'

PRIMARY KEY DEFINITION (Unique)

FieldSequence
ticker_tk1
ticker_at2
ticker_ts3
riskControlKey4
riskControlLevel5
riskFirm6
isTestAccnt7

CREATE TABLE EXAMPLE QUERY

CREATE TABLE `SRControl`.`MsgSRRiskCounter` (
`ticker_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None' COMMENT '''*-ANY-ANY'' represents the entire control group',
`ticker_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','ESX','ANY','CXE','DXE','NXAM','NXBR','NXDUB','NXLS','NXLDN','NXML','NXMLT','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None' COMMENT '''*-ANY-ANY'' represents the entire control group',
`ticker_tk` VARCHAR(12) NOT NULL DEFAULT '' COMMENT '''*-ANY-ANY'' represents the entire control group',
`riskControlKey` VARCHAR(64) NOT NULL DEFAULT '' COMMENT 'must be an SRClientAccnt if riskControlLevel=Accnt; must be an SRUser if riskControlLevel=User; ignored if riskControlLevel=ClientFirm',
`riskControlLevel` ENUM('None','ClientFirm','Accnt','User') NOT NULL DEFAULT 'None',
`riskFirm` VARCHAR(16) NOT NULL DEFAULT '',
`isTestAccnt` ENUM('None','Yes','No') NOT NULL DEFAULT 'None',
`sysRealm` ENUM('None','SysTest','NMS','CME','FR2','LD4','DR') NOT NULL DEFAULT 'None',
`sysEnvironment` ENUM('None','Neptune','Pluto','V7_Stable','V7_Latest','Saturn','Venus','Mars','SysTest','V7_Current') NOT NULL DEFAULT 'None' COMMENT 'original (source) sys environment [Stable, Current, etc]',
`riskEngine` VARCHAR(32) NOT NULL DEFAULT '' COMMENT 'EE engine name',
`netDayDDelta` FLOAT NOT NULL DEFAULT 0 COMMENT 'net day $Delta',
`absDayDDelta` FLOAT NOT NULL DEFAULT 0 COMMENT 'absolute day $Delta, |ddBot| + |ddSld| position',
`netDayVega` FLOAT NOT NULL DEFAULT 0 COMMENT 'net day Vega per',
`absDayVega` FLOAT NOT NULL DEFAULT 0 COMMENT 'absolute day Vega, |veBot| + |veSld| position',
`netDayWtVega` FLOAT NOT NULL DEFAULT 0 COMMENT 'net day WtVega',
`absDayWtVega` FLOAT NOT NULL DEFAULT 0 COMMENT 'absolute day WtVega, |wvBot| + |wvSld| position',
`netDayNValue` FLOAT NOT NULL DEFAULT 0 COMMENT 'net day Notional Value',
`absDayNValue` FLOAT NOT NULL DEFAULT 0 COMMENT 'absolute day Notional Value, |nvBot| + |nvSld| position',
`netDayRMetric7` FLOAT NOT NULL DEFAULT 0 COMMENT 'net day RiskMetric7',
`absDayRMetric7` FLOAT NOT NULL DEFAULT 0 COMMENT 'absolute day RiskMetric7, |rm7Bot| + |rm7Sld| position',
`netDayDDeltaEma` FLOAT NOT NULL DEFAULT -1 COMMENT '60s (half-life) EMA $delta',
`netDayWtVegaEma` FLOAT NOT NULL DEFAULT -1 COMMENT '60s (half-life) EMA wtVega',
`emaTimestamp` DOUBLE NOT NULL DEFAULT 0,
`liveMarginDay` FLOAT NOT NULL DEFAULT 0 COMMENT 'live net (per symbol) day portfolio (day trades only) margin (can include external sources)',
`liveOpenExposure` FLOAT NOT NULL DEFAULT 0 COMMENT 'live abs open child order $Delta (no netting) (open child orders only)',
`dayMarginUDnVDn` FLOAT NOT NULL DEFAULT 0 COMMENT 'day margin (UPrcDn/VolDn)',
`dayMarginUDnVUp` FLOAT NOT NULL DEFAULT 0 COMMENT 'day margin (UPrcDn/VolUp)',
`dayMarginUUpVDn` FLOAT NOT NULL DEFAULT 0 COMMENT 'day margin (UPrcUp/VolDn)',
`dayMarginUUpVUp` FLOAT NOT NULL DEFAULT 0 COMMENT 'day margin (UPrcUp/VolUp)',
`numStkChildOrders` INT NOT NULL DEFAULT 0,
`numFutChildOrders` INT NOT NULL DEFAULT 0,
`numOptChildOrders` INT NOT NULL DEFAULT 0,
`numMLegChildOrders` INT NOT NULL DEFAULT 0,
`counter` INT NOT NULL DEFAULT 0,
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000',
PRIMARY KEY USING HASH (`ticker_tk`,`ticker_at`,`ticker_ts`,`riskControlKey`,`riskControlLevel`,`riskFirm`,`isTestAccnt`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='Values in this table represent current (live) SpiderRock supervisory risk counters for a corresponding risk control key.';

SELECT TABLE EXAMPLE QUERY

SELECT
`ticker_at`,
`ticker_ts`,
`ticker_tk`,
`riskControlKey`,
`riskControlLevel`,
`riskFirm`,
`isTestAccnt`,
`sysRealm`,
`sysEnvironment`,
`riskEngine`,
`netDayDDelta`,
`absDayDDelta`,
`netDayVega`,
`absDayVega`,
`netDayWtVega`,
`absDayWtVega`,
`netDayNValue`,
`absDayNValue`,
`netDayRMetric7`,
`absDayRMetric7`,
`netDayDDeltaEma`,
`netDayWtVegaEma`,
`emaTimestamp`,
`liveMarginDay`,
`liveOpenExposure`,
`dayMarginUDnVDn`,
`dayMarginUDnVUp`,
`dayMarginUUpVDn`,
`dayMarginUUpVUp`,
`numStkChildOrders`,
`numFutChildOrders`,
`numOptChildOrders`,
`numMLegChildOrders`,
`counter`,
`timestamp`
FROM `SRControl`.`MsgSRRiskCounter`
WHERE
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`ticker_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','ESX','ANY','CXE','DXE','NXAM','NXBR','NXDUB','NXLS','NXLDN','NXML','NXMLT','NXOS','NXP','EUREX','CEDX','ICEFE') */
`ticker_ts` = 'None'
AND
/* Replace with a VARCHAR(12) */
`ticker_tk` = 'Example_ticker_tk'
AND
/* Replace with a VARCHAR(64) */
`riskControlKey` = 'Example_riskControlKey'
AND
/* Replace with a ENUM('None','ClientFirm','Accnt','User') */
`riskControlLevel` = 'None'
AND
/* Replace with a VARCHAR(16) */
`riskFirm` = 'Example_riskFirm'
AND
/* Replace with a ENUM('None','Yes','No') */
`isTestAccnt` = 'None';

Doc Columns Query

SELECT * FROM SRControl.doccolumns WHERE TABLE_NAME='SpdrRiskCounter' ORDER BY ordinal_position ASC;