Skip to main content
Version: Upcoming

IndustryControl

V8 Message Definiton

METADATA

AttributeValue
Topic1630-client-book-risk
MLink TokenClientControl
ProductSRControl
accessTypeSELECT,UPDATE,INSERT,DELETE

Table Definition

FieldTypeKeyDefault ValueComment
accntVARCHAR(16)PRI''
icodeINTPRI0can be 1 2 or 3 digits
clientFirmVARCHAR(16)PRI''SR client firm
indStatusenum - OptStatus'TwoWay'industry trading control
minWtVegaFLOAT-2000xRM minimum net industry wtVegawtVega ve vol sqrtmax01 years 4
maxWtVegaFLOAT+2000xRM maximum net industry wtVegawtVega ve vol sqrtmax01 years 4
maxWtVePctM1FLOAT100of minmax industry wtVega in M1 days 10 expirations
maxWtVePctM2FLOAT100of minmax industry wtVega in M2 10 days 25 expirations
maxWtVePctM3FLOAT100of minmax industry wtVega in M3 25 days 65 expirations
maxWtVePctM4FLOAT100of minmax industry wtVega in M4 65 days 128 expirations
maxWtVePctM5FLOAT100of minmax industry wtVega in M5 128 days expirations
modifiedByVARCHAR(24)''user who last modified this record
modifiedInenum - SysEnvironment'None'
timestampDATETIME(6)'1900-01-01 00:00:00.000000'timestamp of last modification

PRIMARY KEY DEFINITION (Unique)

FieldSequence
accnt1
icode2
clientFirm3

CREATE TABLE EXAMPLE QUERY

CREATE TABLE `SRControl`.`MsgIndustryControl` (
`accnt` VARCHAR(16) NOT NULL DEFAULT '',
`icode` INT NOT NULL DEFAULT 0 COMMENT 'can be 1, 2, or 3 digits',
`clientFirm` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'SR client firm',
`indStatus` ENUM('Hold','TwoWay','BuyOnly','SellOnly','CloseOnly','CloseNow','CloseRisk','BuyCloseOnly','SellCloseOnly') NOT NULL DEFAULT 'TwoWay' COMMENT 'industry trading control',
`minWtVega` FLOAT NOT NULL DEFAULT -2000 COMMENT '(xRM) minimum net industry wtVega;wtVega = ve * vol / sqrt(max(0.1, years * 4))',
`maxWtVega` FLOAT NOT NULL DEFAULT +2000 COMMENT '(xRM) maximum net industry wtVega;wtVega = ve * vol / sqrt(max(0.1, years * 4))',
`maxWtVePctM1` FLOAT NOT NULL DEFAULT 100 COMMENT '% of min/max industry wtVega in M1 {days < 10} expirations',
`maxWtVePctM2` FLOAT NOT NULL DEFAULT 100 COMMENT '% of min/max industry wtVega in M2 {10 < days < 25} expirations',
`maxWtVePctM3` FLOAT NOT NULL DEFAULT 100 COMMENT '% of min/max industry wtVega in M3 {25 < days < 65} expirations',
`maxWtVePctM4` FLOAT NOT NULL DEFAULT 100 COMMENT '% of min/max industry wtVega in M4 {65 < days < 128} expirations',
`maxWtVePctM5` FLOAT NOT NULL DEFAULT 100 COMMENT '% of min/max industry wtVega in M5 {128 < days} expirations',
`modifiedBy` VARCHAR(24) NOT NULL DEFAULT '' COMMENT 'user who last modified this record',
`modifiedIn` ENUM('None','Neptune','Pluto','V7_Stable','V7_Latest','Saturn','Venus','Mars','SysTest','V7_Current') NOT NULL DEFAULT 'None',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT 'timestamp of last modification',
PRIMARY KEY USING HASH (`accnt`,`icode`,`clientFirm`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='';

SELECT TABLE EXAMPLE QUERY

SELECT
`accnt`,
`icode`,
`clientFirm`,
`indStatus`,
`minWtVega`,
`maxWtVega`,
`maxWtVePctM1`,
`maxWtVePctM2`,
`maxWtVePctM3`,
`maxWtVePctM4`,
`maxWtVePctM5`,
`timestamp`
FROM `SRControl`.`MsgIndustryControl`
WHERE
/* Replace with a VARCHAR(16) */
`accnt` = 'Example_accnt'
AND
/* Replace with a INT */
`icode` = 5
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm';

UPDATE TABLE EXAMPLE QUERY

UPDATE `SRControl`.`MsgIndustryControl` 
SET
/* Replace with a ENUM('Hold','TwoWay','BuyOnly','SellOnly','CloseOnly','CloseNow','CloseRisk','BuyCloseOnly','SellCloseOnly') */
`indStatus` = 'TwoWay',
/* Replace with a FLOAT */
`minWtVega` = 1.23,
/* Replace with a FLOAT */
`maxWtVega` = 1.23,
/* Replace with a FLOAT */
`maxWtVePctM1` = 1.23,
/* Replace with a FLOAT */
`maxWtVePctM2` = 1.23,
/* Replace with a FLOAT */
`maxWtVePctM3` = 1.23,
/* Replace with a FLOAT */
`maxWtVePctM4` = 1.23,
/* Replace with a FLOAT */
`maxWtVePctM5` = 1.23,
/* Replace with a DATETIME(6) */
`timestamp` = '2022-01-01 12:34:56.000000'
WHERE
/* Replace with a VARCHAR(16) */
`accnt` = 'Example_accnt'
AND
/* Replace with a INT */
`icode` = 5
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm';

INSERT TABLE EXAMPLE QUERY

INSERT INTO `SRControl`.`MsgIndustryControl`(
/* Replace with a VARCHAR(16) */
`accnt`,
/* Replace with a INT */
`icode`,
/* Replace with a VARCHAR(16) */
`clientFirm`,
/* Replace with a ENUM('Hold','TwoWay','BuyOnly','SellOnly','CloseOnly','CloseNow','CloseRisk','BuyCloseOnly','SellCloseOnly') */
`indStatus`,
/* Replace with a FLOAT */
`minWtVega`,
/* Replace with a FLOAT */
`maxWtVega`,
/* Replace with a FLOAT */
`maxWtVePctM1`,
/* Replace with a FLOAT */
`maxWtVePctM2`,
/* Replace with a FLOAT */
`maxWtVePctM3`,
/* Replace with a FLOAT */
`maxWtVePctM4`,
/* Replace with a FLOAT */
`maxWtVePctM5`,
/* Replace with a DATETIME(6) */
`timestamp`
)
VALUES(
'Example_accnt',
5,
'Example_clientFirm',
'TwoWay',
1.23,
1.23,
1.23,
1.23,
1.23,
1.23,
1.23,
'2022-01-01 12:34:56.000000'
);

DELETE TABLE EXAMPLE QUERY

DELETE FROM `SRControl`.`MsgIndustryControl` 
WHERE
/* Replace with a VARCHAR(16) */
`accnt` = 'Example_accnt'
AND
/* Replace with a INT */
`icode` = 5
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm';

Doc Columns Query

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