OptionPrintProbability
METADATA
Attribute | Value |
---|---|
Topic | 4255-probabilities |
MLink Token | OptProbModel |
Product | SRAnalytics |
accessType | SELECT |
Table Definition
Field | Type | Key | Default Value | Comment |
---|---|---|---|---|
okey_at | enum - AssetType | PRI | 'None' | |
okey_ts | enum - TickerSrc | PRI | 'None' | |
okey_tk | VARCHAR(12) | PRI | '' | |
okey_yr | SMALLINT UNSIGNED | PRI, SEC | 0 | |
okey_mn | TINYINT UNSIGNED | PRI, SEC | 0 | |
okey_dy | TINYINT UNSIGNED | PRI, SEC | 0 | |
okey_xx | DOUBLE | PRI | 0 | |
okey_cp | enum - CallPut | PRI | 'Call' | |
stateModel | enum - StateModel | PRI | 'None' | |
prtPrice | FLOAT | 0 | ||
prtSize | INT | 0 | ||
prtProb | FLOAT | 0 | probability that this print will result in positive PnL | |
prtSide | enum - BuySell | 'None' | ||
bidPrice | FLOAT | 0 | nbbo bid price | |
askPrice | FLOAT | 0 | nbbo ask price | |
bidSize | INT | 0 | cumulative size bid price | |
askSize | INT | 0 | cumulative size ask price | |
avgBLink1m | FLOAT | 0 | average buy link value trailing 10 | |
maeBLink1m | FLOAT | 0 | buy link value mean abs err trailing 1000 | |
avgSLink1m | FLOAT | 0 | average sell link value trailing 10 | |
maeSLink1m | FLOAT | 0 | sell link value mean abs err trailing 1000 | |
avgBLink10m | FLOAT | 0 | average buy link value trailing 100 | |
maeBLink10m | FLOAT | 0 | bid link value mean abs err trailing 1000 | |
avgSLink10m | FLOAT | 0 | average ask link value trailing 100 | |
maeSLink10m | FLOAT | 0 | ask link value mean abs err trailing 1000 | |
bCounter | INT | 0 | buy counter | |
sCounter | INT | 0 | sell counter | |
prtTimestamp | BIGINT | 0 | feed timestamp from the packet | |
netTimestamp | BIGINT | 0 | inbound packet PTP timestamp from SR gateway switch from OptionPrint | |
smsTimestamp | BIGINT | 0 | state model server timestamp just before publish |
PRIMARY KEY DEFINITION (Unique)
Field | Sequence |
---|---|
okey_tk | 1 |
okey_yr | 2 |
okey_mn | 3 |
okey_dy | 4 |
okey_xx | 5 |
okey_cp | 6 |
okey_at | 7 |
okey_ts | 8 |
stateModel | 9 |
SECONDARY INDEX (ExpirationIndex) (Not Unique)
Field | Sequence |
---|---|
okey_yr | 1 |
okey_mn | 2 |
okey_dy | 3 |
CREATE TABLE EXAMPLE QUERY
CREATE TABLE `SRAnalytics`.`MsgOptionPrintProbability` (
`okey_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None',
`okey_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',
`okey_tk` VARCHAR(12) NOT NULL DEFAULT '',
`okey_yr` SMALLINT UNSIGNED NOT NULL DEFAULT 0,
`okey_mn` TINYINT UNSIGNED NOT NULL DEFAULT 0,
`okey_dy` TINYINT UNSIGNED NOT NULL DEFAULT 0,
`okey_xx` DOUBLE NOT NULL DEFAULT 0,
`okey_cp` ENUM('Call','Put','Pair') NOT NULL DEFAULT 'Call',
`stateModel` ENUM('None','M1','M2','M3','M4') NOT NULL DEFAULT 'None',
`prtPrice` FLOAT NOT NULL DEFAULT 0,
`prtSize` INT NOT NULL DEFAULT 0,
`prtProb` FLOAT NOT NULL DEFAULT 0 COMMENT 'probability that this print will result in positive PnL',
`prtSide` ENUM('None','Buy','Sell') NOT NULL DEFAULT 'None',
`bidPrice` FLOAT NOT NULL DEFAULT 0 COMMENT 'nbbo bid price',
`askPrice` FLOAT NOT NULL DEFAULT 0 COMMENT 'nbbo ask price',
`bidSize` INT NOT NULL DEFAULT 0 COMMENT 'cumulative size @ bid price',
`askSize` INT NOT NULL DEFAULT 0 COMMENT 'cumulative size @ ask price',
`avgBLink1m` FLOAT NOT NULL DEFAULT 0 COMMENT 'average buy link value (trailing 10)',
`maeBLink1m` FLOAT NOT NULL DEFAULT 0 COMMENT 'buy link value mean abs err (trailing 1000)',
`avgSLink1m` FLOAT NOT NULL DEFAULT 0 COMMENT 'average sell link value (trailing 10)',
`maeSLink1m` FLOAT NOT NULL DEFAULT 0 COMMENT 'sell link value mean abs err (trailing 1000)',
`avgBLink10m` FLOAT NOT NULL DEFAULT 0 COMMENT 'average buy link value (trailing 100)',
`maeBLink10m` FLOAT NOT NULL DEFAULT 0 COMMENT 'bid link value mean abs err (trailing 1000)',
`avgSLink10m` FLOAT NOT NULL DEFAULT 0 COMMENT 'average ask link value (trailing 100)',
`maeSLink10m` FLOAT NOT NULL DEFAULT 0 COMMENT 'ask link value mean abs err (trailing 1000)',
`bCounter` INT NOT NULL DEFAULT 0 COMMENT 'buy counter',
`sCounter` INT NOT NULL DEFAULT 0 COMMENT 'sell counter',
`prtTimestamp` BIGINT NOT NULL DEFAULT 0 COMMENT 'feed timestamp from the packet',
`netTimestamp` BIGINT NOT NULL DEFAULT 0 COMMENT 'inbound packet PTP timestamp from SR gateway switch (from OptionPrint)',
`smsTimestamp` BIGINT NOT NULL DEFAULT 0 COMMENT 'state model server timestamp (just before publish)',
PRIMARY KEY USING HASH (`okey_tk`,`okey_yr`,`okey_mn`,`okey_dy`,`okey_xx`,`okey_cp`,`okey_at`,`okey_ts`,`stateModel`),
KEY `ExpirationIndex` (`okey_yr`,`okey_mn`,`okey_dy`) USING HASH
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='';
SELECT TABLE EXAMPLE QUERY
SELECT
`okey_at`,
`okey_ts`,
`okey_tk`,
`okey_yr`,
`okey_mn`,
`okey_dy`,
`okey_xx`,
`okey_cp`,
`stateModel`,
`prtPrice`,
`prtSize`,
`prtProb`,
`prtSide`,
`bidPrice`,
`askPrice`,
`bidSize`,
`askSize`,
`avgBLink1m`,
`maeBLink1m`,
`avgSLink1m`,
`maeSLink1m`,
`avgBLink10m`,
`maeBLink10m`,
`avgSLink10m`,
`maeSLink10m`,
`bCounter`,
`sCounter`,
`prtTimestamp`,
`netTimestamp`,
`smsTimestamp`
FROM `SRAnalytics`.`MsgOptionPrintProbability`
WHERE
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`okey_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') */
`okey_ts` = 'None'
AND
/* Replace with a VARCHAR(12) */
`okey_tk` = 'Example_okey_tk'
AND
/* Replace with a SMALLINT UNSIGNED */
`okey_yr` = 123
AND
/* Replace with a TINYINT UNSIGNED */
`okey_mn` = 1
AND
/* Replace with a TINYINT UNSIGNED */
`okey_dy` = 1
AND
/* Replace with a DOUBLE */
`okey_xx` = 4.56
AND
/* Replace with a ENUM('Call','Put','Pair') */
`okey_cp` = 'Call'
AND
/* Replace with a ENUM('None','M1','M2','M3','M4') */
`stateModel` = 'None';
Doc Columns Query
SELECT * FROM SRAnalytics.doccolumns WHERE TABLE_NAME='OptionPrintProbability' ORDER BY ordinal_position ASC;