Skip to main content
Version: 8.4.10.2

SpdrAutoHedgeState

V8 Message Definiton

SpdrAutoHedgeState records are published by autohedge servers and describe the current state of an autohedge controller that is managing RiskGroup autohedge orders.

METADATA

AttributeValue
Topic5290-strategy-autohedge
MLink TokenSystemData
ProductSRTrade
accessTypeSELECT

Table Definition

FieldTypeKeyDefault ValueComment
accntVARCHAR(16)PRI''
riskGroupIdCHAR(19)PRI'0000-0000-0000-0000'
hedgeSecKey_atenum - AssetTypePRI'None'Execution Hedge SecKey from SpdrAutoHedgeControltargetSecKey
hedgeSecKey_tsenum - TickerSrcPRI'None'Execution Hedge SecKey from SpdrAutoHedgeControltargetSecKey
hedgeSecKey_tkVARCHAR(12)PRI''Execution Hedge SecKey from SpdrAutoHedgeControltargetSecKey
hedgeSecKey_yrSMALLINT UNSIGNEDPRI0Execution Hedge SecKey from SpdrAutoHedgeControltargetSecKey
hedgeSecKey_mnTINYINT UNSIGNEDPRI0Execution Hedge SecKey from SpdrAutoHedgeControltargetSecKey
hedgeSecKey_dyTINYINT UNSIGNEDPRI0Execution Hedge SecKey from SpdrAutoHedgeControltargetSecKey
hedgeSecTypeenum - SpdrKeyTypePRI'None'Execution Hedge SecType from SpdrAutoHedgeControltargetSecType can be None
clientFirmVARCHAR(16)PRI''
groupingCodeCHAR(19)'0000-0000-0000-0000'
ticker_atenum - AssetType'None'ticker group eg ES ZN
ticker_tsenum - TickerSrc'None'ticker group eg ES ZN
ticker_tkVARCHAR(12)''ticker group eg ES ZN
securityDescTINYTEXT''
ssaleFlagenum - ShortSaleFlag'None'
positionTypeenum - PositionType'None'
hedgeStateenum - HedgeGroupState'None'
hedgeTextTINYTEXT''
uPrcDOUBLE0hedge target underlier price
isDeltaMixedenum - YesNo'None'
accumulatorErrorTINYTEXT''
grpDeltaBotDOUBLE0option delta bot in ctrlDe units
grpDeltaSldDOUBLE0
grpDDeltaBotDOUBLE0option delta bot using uMid at time of option fill
grpDDeltaSldDOUBLE0
lastGrpFillDttmDATETIME(6)'1900-01-01 00:00:00.000000'
ctrlDeltaBotDOUBLE0hedge target delta units bot
ctrlDeltaSldDOUBLE0
ctrlDDeltaBotDOUBLE0hedge target delta bot using actual fill price
ctrlDDeltaSldDOUBLE0
lastCtrlFillDttmDATETIME(6)'1900-01-01 00:00:00.000000'
absOptCnINT0total number of option contracts executed in this hedge group
netDeltaDOUBLE0grpDeltaBot grpDeltaSld ctrlDeltaBot ctrlDeltaSld
netDDeltaDOUBLE0grpDDeltaBot grpDDeltaSld ctrlDDeltaBot ctrlDDeltaSld
openHedgeTimeFLOAT0size weighted average time in seconds hedge risk has been open executions to fills
hedgeTargetVolFLOAT0implied expected today annualized volatility for hedge target
expectedPrcRangeFLOAT0SQRTavgHedgeTime x hedgeTargetVol cone
opnDeltaBotDOUBLE0open risk delta bot in ctrlDe units
opnDeltaSldDOUBLE0
opnDDeltaBotDOUBLE0open risk delta bot in ctrlDe units
opnDDeltaSldDOUBLE0
clsDeltaBotDOUBLE0close risk delta bot in ctrlDe units
clsDeltaSldDOUBLE0
clsDDeltaBotDOUBLE0close risk delta bot in ctrlDe units
clsDDeltaSldDOUBLE0
slippagePnLFLOAT0opnDeltaBot clsDeltaPrcSld opnDeltaPrcBot opnDeltaSld opnDeltaPrcSld clsDeltaPrcBot
slippageUnitPnLFLOAT0slippagePnL grpDeltaBot grpDeltaSld pnl unit share or fc
slippageNormPnLFLOAT0slippageUnitPnL expectedPrcRange
minDDeltaBandFLOAT0
maxDDeltaBandFLOAT0
bParentNumberBIGINT0
bActiveSizeINT0
bBrkrStatusTINYTEXT''
bBrkrErrorTINYTEXT''
sParentNumberBIGINT0
sActiveSizeINT0
sBrkrStatusTINYTEXT''
sBrkrErrorTINYTEXT''
ddMultDOUBLE0
underliersPerCnINT0future underliers per contract
underlierTypeenum - UnderlierType'None'type of underlier affects greek calculations
pointValueDOUBLE0NLV value of a single point change in display premium hedge target
pointCurrencyenum - Currency'None'
liveHedgeMarkDOUBLE0hedgeSecKey live mark midmarket zero in SRSE
updtReasonVARCHAR(20)''
timestampDATETIME(6)'1900-01-01 00:00:00.000000'SR system timestamp

PRIMARY KEY DEFINITION (Unique)

FieldSequence
accnt1
riskGroupId2
hedgeSecKey_tk3
hedgeSecKey_yr4
hedgeSecKey_mn5
hedgeSecKey_dy6
hedgeSecKey_at7
hedgeSecKey_ts8
hedgeSecType9
clientFirm10

CREATE TABLE EXAMPLE QUERY

CREATE TABLE `SRTrade`.`MsgSRAutoHedgeState` (
`accnt` VARCHAR(16) NOT NULL DEFAULT '',
`riskGroupId` CHAR(19) NOT NULL DEFAULT '0000-0000-0000-0000',
`hedgeSecKey_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None' COMMENT 'Execution Hedge SecKey (from SpdrAutoHedgeControl.targetSecKey)',
`hedgeSecKey_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 'Execution Hedge SecKey (from SpdrAutoHedgeControl.targetSecKey)',
`hedgeSecKey_tk` VARCHAR(12) NOT NULL DEFAULT '' COMMENT 'Execution Hedge SecKey (from SpdrAutoHedgeControl.targetSecKey)',
`hedgeSecKey_yr` SMALLINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Execution Hedge SecKey (from SpdrAutoHedgeControl.targetSecKey)',
`hedgeSecKey_mn` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Execution Hedge SecKey (from SpdrAutoHedgeControl.targetSecKey)',
`hedgeSecKey_dy` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Execution Hedge SecKey (from SpdrAutoHedgeControl.targetSecKey)',
`hedgeSecType` ENUM('None','Stock','Future','Option','MLeg') NOT NULL DEFAULT 'None' COMMENT 'Execution Hedge SecType (from SpdrAutoHedgeControl.targetSecType) [can be None]',
`clientFirm` VARCHAR(16) NOT NULL DEFAULT '',
`groupingCode` CHAR(19) NOT NULL DEFAULT '0000-0000-0000-0000',
`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 'ticker group (eg. @ES, @ZN)',
`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 'ticker group (eg. @ES, @ZN)',
`ticker_tk` VARCHAR(12) NOT NULL DEFAULT '' COMMENT 'ticker group (eg. @ES, @ZN)',
`securityDesc` TINYTEXT NOT NULL DEFAULT '',
`ssaleFlag` ENUM('None','Long','Short','Exempt','Auto','Open','Close','Cover','NA') NOT NULL DEFAULT 'None',
`positionType` ENUM('None','Opening','Closing','Auto') NOT NULL DEFAULT 'None',
`hedgeState` ENUM('None','NoHedgeCtrl','MLegHold','InBand','BandSh','BandLn','Exception','DDMultErr','UndTypeErr','UndPerCnErr','Init','UPrcErr','AccumulatorError') NOT NULL DEFAULT 'None',
`hedgeText` TINYTEXT NOT NULL DEFAULT '',
`uPrc` DOUBLE NOT NULL DEFAULT 0 COMMENT 'hedge target underlier price',
`isDeltaMixed` ENUM('None','Yes','No') NOT NULL DEFAULT 'None',
`accumulatorError` TINYTEXT NOT NULL DEFAULT '',
`grpDeltaBot` DOUBLE NOT NULL DEFAULT 0 COMMENT 'option delta bot (in ctrlDe units)',
`grpDeltaSld` DOUBLE NOT NULL DEFAULT 0,
`grpDDeltaBot` DOUBLE NOT NULL DEFAULT 0 COMMENT 'option $delta bot (using uMid at time of option fill)',
`grpDDeltaSld` DOUBLE NOT NULL DEFAULT 0,
`lastGrpFillDttm` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000',
`ctrlDeltaBot` DOUBLE NOT NULL DEFAULT 0 COMMENT 'hedge target delta (units) bot',
`ctrlDeltaSld` DOUBLE NOT NULL DEFAULT 0,
`ctrlDDeltaBot` DOUBLE NOT NULL DEFAULT 0 COMMENT 'hedge target $delta bot (using actual fill price)',
`ctrlDDeltaSld` DOUBLE NOT NULL DEFAULT 0,
`lastCtrlFillDttm` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000',
`absOptCn` INT NOT NULL DEFAULT 0 COMMENT 'total number of option contracts executed in this hedge group',
`netDelta` DOUBLE NOT NULL DEFAULT 0 COMMENT 'grpDeltaBot - grpDeltaSld + ctrlDeltaBot - ctrlDeltaSld',
`netDDelta` DOUBLE NOT NULL DEFAULT 0 COMMENT 'grpDDeltaBot - grpDDeltaSld + ctrlDDeltaBot - ctrlDDeltaSld',
`openHedgeTime` FLOAT NOT NULL DEFAULT 0 COMMENT 'size weighted average time (in seconds) hedge risk has been open (executions to fills)',
`hedgeTargetVol` FLOAT NOT NULL DEFAULT 0 COMMENT 'implied / expected today (annualized) volatility for hedge target',
`expectedPrcRange` FLOAT NOT NULL DEFAULT 0 COMMENT 'SQRT(avgHedgeTime x hedgeTargetVol) cone',
`opnDeltaBot` DOUBLE NOT NULL DEFAULT 0 COMMENT 'open risk delta bot (in ctrlDe units)',
`opnDeltaSld` DOUBLE NOT NULL DEFAULT 0,
`opnDDeltaBot` DOUBLE NOT NULL DEFAULT 0 COMMENT 'open risk $delta bot (in ctrlDe units)',
`opnDDeltaSld` DOUBLE NOT NULL DEFAULT 0,
`clsDeltaBot` DOUBLE NOT NULL DEFAULT 0 COMMENT 'close risk delta bot (in ctrlDe units)',
`clsDeltaSld` DOUBLE NOT NULL DEFAULT 0,
`clsDDeltaBot` DOUBLE NOT NULL DEFAULT 0 COMMENT 'close risk $delta bot (in ctrlDe units)',
`clsDDeltaSld` DOUBLE NOT NULL DEFAULT 0,
`slippagePnL` FLOAT NOT NULL DEFAULT 0 COMMENT 'opnDeltaBot * (clsDeltaPrcSld - opnDeltaPrcBot) + opnDeltaSld * (opnDeltaPrcSld - clsDeltaPrcBot)',
`slippageUnitPnL` FLOAT NOT NULL DEFAULT 0 COMMENT 'slippagePnL / (grpDeltaBot + grpDeltaSld) [pnl / unit (share or fc)]',
`slippageNormPnL` FLOAT NOT NULL DEFAULT 0 COMMENT 'slippageUnitPnL / expectedPrcRange',
`minDDeltaBand` FLOAT NOT NULL DEFAULT 0,
`maxDDeltaBand` FLOAT NOT NULL DEFAULT 0,
`bParentNumber` BIGINT NOT NULL DEFAULT 0,
`bActiveSize` INT NOT NULL DEFAULT 0,
`bBrkrStatus` TINYTEXT NOT NULL DEFAULT '',
`bBrkrError` TINYTEXT NOT NULL DEFAULT '',
`sParentNumber` BIGINT NOT NULL DEFAULT 0,
`sActiveSize` INT NOT NULL DEFAULT 0,
`sBrkrStatus` TINYTEXT NOT NULL DEFAULT '',
`sBrkrError` TINYTEXT NOT NULL DEFAULT '',
`ddMult` DOUBLE NOT NULL DEFAULT 0,
`underliersPerCn` INT NOT NULL DEFAULT 0 COMMENT 'future underliers per contract',
`underlierType` ENUM('None','Equity','Other','FX') NOT NULL DEFAULT 'None' COMMENT 'type of underlier (affects $greek calculations)',
`pointValue` DOUBLE NOT NULL DEFAULT 0 COMMENT '$NLV value of a single point change in display premium (hedge target)',
`pointCurrency` ENUM('None','AUD','BRL','CAD','CHF','CNH','CNY','EUR','GBP','JPY','KRW','MXN','MYR','NOK','NZD','SEK','TRY','USD','USDCents','CZK','ZAR','HUF','USX','GBX') NOT NULL DEFAULT 'None',
`liveHedgeMark` DOUBLE NOT NULL DEFAULT 0 COMMENT 'hedgeSecKey live mark (mid-market) [zero in SRSE]',
`updtReason` VARCHAR(20) NOT NULL DEFAULT '',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT 'SR system timestamp',
CONSTRAINT nonnegative_riskGroupId CHECK(ASCII(riskGroupId) < 56),
CONSTRAINT nonnegative_groupingCode CHECK(ASCII(groupingCode) < 56),
PRIMARY KEY USING HASH (`accnt`,`riskGroupId`,`hedgeSecKey_tk`,`hedgeSecKey_yr`,`hedgeSecKey_mn`,`hedgeSecKey_dy`,`hedgeSecKey_at`,`hedgeSecKey_ts`,`hedgeSecType`,`clientFirm`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='SpdrAutoHedgeState records are published by autohedge servers and describe the current state of an autohedge controller that is managing RiskGroup autohedge orders.';

SELECT TABLE EXAMPLE QUERY

SELECT
`accnt`,
`riskGroupId`,
`hedgeSecKey_at`,
`hedgeSecKey_ts`,
`hedgeSecKey_tk`,
`hedgeSecKey_yr`,
`hedgeSecKey_mn`,
`hedgeSecKey_dy`,
`hedgeSecType`,
`clientFirm`,
`groupingCode`,
`ticker_at`,
`ticker_ts`,
`ticker_tk`,
`securityDesc`,
`ssaleFlag`,
`positionType`,
`hedgeState`,
`hedgeText`,
`uPrc`,
`isDeltaMixed`,
`accumulatorError`,
`grpDeltaBot`,
`grpDeltaSld`,
`grpDDeltaBot`,
`grpDDeltaSld`,
`lastGrpFillDttm`,
`ctrlDeltaBot`,
`ctrlDeltaSld`,
`ctrlDDeltaBot`,
`ctrlDDeltaSld`,
`lastCtrlFillDttm`,
`absOptCn`,
`netDelta`,
`netDDelta`,
`openHedgeTime`,
`hedgeTargetVol`,
`expectedPrcRange`,
`opnDeltaBot`,
`opnDeltaSld`,
`opnDDeltaBot`,
`opnDDeltaSld`,
`clsDeltaBot`,
`clsDeltaSld`,
`clsDDeltaBot`,
`clsDDeltaSld`,
`slippagePnL`,
`slippageUnitPnL`,
`slippageNormPnL`,
`minDDeltaBand`,
`maxDDeltaBand`,
`bParentNumber`,
`bActiveSize`,
`bBrkrStatus`,
`bBrkrError`,
`sParentNumber`,
`sActiveSize`,
`sBrkrStatus`,
`sBrkrError`,
`ddMult`,
`underliersPerCn`,
`underlierType`,
`pointValue`,
`pointCurrency`,
`liveHedgeMark`,
`updtReason`,
`timestamp`
FROM `SRTrade`.`MsgSRAutoHedgeState`
WHERE
/* Replace with a VARCHAR(16) */
`accnt` = 'Example_accnt'
AND
/* Replace with a CHAR(19) */
`riskGroupId` = 'Example_riskGroupId'
AND
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`hedgeSecKey_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') */
`hedgeSecKey_ts` = 'None'
AND
/* Replace with a VARCHAR(12) */
`hedgeSecKey_tk` = 'Example_hedgeSecKey_tk'
AND
/* Replace with a SMALLINT UNSIGNED */
`hedgeSecKey_yr` = 123
AND
/* Replace with a TINYINT UNSIGNED */
`hedgeSecKey_mn` = 1
AND
/* Replace with a TINYINT UNSIGNED */
`hedgeSecKey_dy` = 1
AND
/* Replace with a ENUM('None','Stock','Future','Option','MLeg') */
`hedgeSecType` = 'None'
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm';

Doc Columns Query

SELECT * FROM SRTrade.doccolumns WHERE TABLE_NAME='SpdrAutoHedgeState' ORDER BY ordinal_position ASC;