CREATE TABLE `SRRisk`.`MsgIndustryRiskRecordV5` (
`accnt` VARCHAR(16) NOT NULL DEFAULT '',
`currency` 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',
`code` VARCHAR(16) NOT NULL DEFAULT '',
`clientFirm` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'SR assigned client firm',
`vegaLong` FLOAT NOT NULL DEFAULT 0 COMMENT 'sum of long vega symbol positions;=sum(+srs.vega) if srs.vega > 0',
`vegaShort` FLOAT NOT NULL DEFAULT 0 COMMENT 'sum of short vega symbol positions;= sum(-srs.vega) if srs.vega < 0',
`wVegaLong` FLOAT NOT NULL DEFAULT 0 COMMENT 'sum of long weighted vega symbol positions;=sum(+srs.wVega) if srs.wVega > 0',
`wVegaShort` FLOAT NOT NULL DEFAULT 0 COMMENT 'sum of short weighted vega symbol positions;= sum(-srs.wVega) if srs.wVega < 0',
`wtVegaLong` FLOAT NOT NULL DEFAULT 0 COMMENT 'sum of long time weighted vega symbol positions;=sum(+srs.wtVega) if srs.wtVega > 0',
`wtVegaShort` FLOAT NOT NULL DEFAULT 0 COMMENT 'sum of short time weighted vega symbol positions;= sum(-srs.wtVega) if srs.wtVega < 0',
`thetaLong` FLOAT NOT NULL DEFAULT 0 COMMENT 'sum of long vega symbol positions;=sum(+srs.theta) if srs.theta > 0',
`thetaShort` FLOAT NOT NULL DEFAULT 0 COMMENT 'sum of short vega symbol positions;= sum(-srs.theta) if srs.theta < 0',
`rhoLong` FLOAT NOT NULL DEFAULT 0 COMMENT 'sum of long rho symbol positions;=sum(+srs.rho) if srs.rho > 0',
`rhoShort` FLOAT NOT NULL DEFAULT 0 COMMENT 'sum of short rho symbol positions;= sum(-srs.rho) if srs.rho < 0',
`ivolLn` FLOAT NOT NULL DEFAULT 0 COMMENT 'vega weighted average symbol ivol where srs.vega > 0',
`ivolSh` FLOAT NOT NULL DEFAULT 0 COMMENT 'vega weighted average symbol ivol where srs.vega < 0',
`wtVeDd` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Dd Time Weighted Vega;=sum[wtVega] if opr.xde < -0.30',
`wtVeDn` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Dn Time Weighted Vega;=sum[wtVega] if -0.30 <= opr.xde < -0.10',
`wtVeAt` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate At Time Weighted Vega;=sum[wtVega] if abs(opr.xde) <= 0.10',
`wtVeUp` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Up Time Weighted Vega;=sum[wtVega] if +0.10 < opr.xde <= +0.30',
`wtVeDu` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Du Time Weighted Vega;=sum[wtVega] if +0.30 < opr.xde',
`wtVeM1` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate M1 Time Weighted Vega;=sum[wtVega] if days < 10',
`wtVeM2` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate M2 Time Weighted Vega;=sum[wtVega] if 10 < days < 25',
`wtVeM3` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate M3 Time Weighted Vega;=sum[wtVega] if 25 < days < 65',
`wtVeM4` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate M4 Time Weighted Vega;=sum[wtVega] if 65 < days < 130',
`wtVeM5` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate M5 Time Weighted Vega;=sum[wtVega] if 130 < days',
`ddelta` FLOAT NOT NULL DEFAULT 0 COMMENT 'net $delta;=sum(srs.ddelta)',
`numSymbols` INT NOT NULL DEFAULT 0 COMMENT 'count of srs records being aggregated',
`absCurSh` INT NOT NULL DEFAULT 0 COMMENT 'absolute number of account shares (CLR + trades);=sum(srs.opShAbsCur)',
`absCurCn` INT NOT NULL DEFAULT 0 COMMENT 'absolute number of account option contracts (CLR + trades);=sum(srs.opCnAbsCur)',
`premOvPar` FLOAT NOT NULL DEFAULT 0 COMMENT 'aggregate premium over parity for the option position;=sum(srs.premOvPar)',
`stPnlMid` FLOAT NOT NULL DEFAULT 0 COMMENT 'stock pnl (using SR marks)',
`stPnlClr` FLOAT NOT NULL DEFAULT 0 COMMENT 'stock pnl (using CLR marks)',
`opPnlVol` FLOAT NOT NULL DEFAULT 0 COMMENT 'options pnl (using SR vol marks)',
`opPnlMid` FLOAT NOT NULL DEFAULT 0 COMMENT 'options pnl (using SR mid marks)',
`opPnlClr` FLOAT NOT NULL DEFAULT 0 COMMENT 'options pnl (using CLR mid marks)',
`opDayVega` FLOAT NOT NULL DEFAULT 0 COMMENT 'option vega traded today',
`opDayWVega` FLOAT NOT NULL DEFAULT 0 COMMENT 'option (vol weighted) vega traded today',
`opDayTVega` FLOAT NOT NULL DEFAULT 0 COMMENT 'option (time weighted) vega traded today',
`opDayWtVega` FLOAT NOT NULL DEFAULT 0 COMMENT 'option (vol time weighted) vega traded today',
`opDayTheta` FLOAT NOT NULL DEFAULT 0 COMMENT 'option theta traded today',
`opEdgeOpened` FLOAT NOT NULL DEFAULT 0 COMMENT 'option theo edge opened today',
`opEdgeClosed` FLOAT NOT NULL DEFAULT 0 COMMENT 'option theo edge closed today',
`pnlDn` FLOAT NOT NULL DEFAULT 0 COMMENT 'option delta neutral pnl;=sum(srs.pnlDn)',
`pnlDe` FLOAT NOT NULL DEFAULT 0 COMMENT 'option delta pnl;=sum(srs.pnlDe)',
`pnlSl` FLOAT NOT NULL DEFAULT 0 COMMENT 'option vega/delta pnl;=sum(srs.pnlSl)',
`pnlGa` FLOAT NOT NULL DEFAULT 0 COMMENT 'option gamma pnl;=sum(srs.pnlGa)',
`pnlTh` FLOAT NOT NULL DEFAULT 0 COMMENT 'option theta pnl;=sum(srs.pnlTh)',
`pnlVe` FLOAT NOT NULL DEFAULT 0 COMMENT 'option vega pnl;=sum(srs.pnlVe)',
`pnlVo` FLOAT NOT NULL DEFAULT 0 COMMENT 'option volga pnl;=sum(srs.pnlVo)',
`pnlVa` FLOAT NOT NULL DEFAULT 0 COMMENT 'option vanna pnl;=sum(srs.pnlVa)',
`pnlDDiv` FLOAT NOT NULL DEFAULT 0 COMMENT 'option DDiv pnl;=sum(srs.pnlDDiv)',
`pnlSDiv` FLOAT NOT NULL DEFAULT 0 COMMENT 'option SDiv pnl;=sum(srs.pnlSDiv)',
`pnlRate` FLOAT NOT NULL DEFAULT 0 COMMENT 'option Rate pnl;=sum(srs.pnlRate)',
`pnlErr` FLOAT NOT NULL DEFAULT 0 COMMENT 'option unexplained (error) pnl;=sum(srs.pnlErr)',
`pnlTe` FLOAT NOT NULL DEFAULT 0 COMMENT 'option theo edge pnl;=sum(srs.pnlTe)',
`pnlLn` FLOAT NOT NULL DEFAULT 0 COMMENT 'option pnl from symbol positions with +vega',
`pnlSh` FLOAT NOT NULL DEFAULT 0 COMMENT 'option pnl from symbol positions with -vega',
`tEdge` FLOAT NOT NULL DEFAULT 0 COMMENT 'aggregate option theo edge;=sum(srs.tEdge)',
`tEdgeMult` FLOAT NOT NULL DEFAULT 0 COMMENT 'denominator for computing edge per unit;=sum(srs.tEdgeMult)',
`tEdgePr` FLOAT NOT NULL DEFAULT 0 COMMENT 'aggregate option theo edge (prior period);=sum(srs.tEdgePr)',
`tEdgeMultPr` FLOAT NOT NULL DEFAULT 0 COMMENT 'enominator for computing edge per unit (prior period);=sum(srs.tEdgeMultPr)',
`posTEdgePnl` FLOAT NOT NULL DEFAULT 0 COMMENT 'aggregate pnl (positive edge symbols);=sum(srs.posTEdgePnl)',
`negTEdgePnl` FLOAT NOT NULL DEFAULT 0 COMMENT 'aggregate pnl (negative edge symbols);=sum(srs.negTEdgePnl)',
`badTEdgePnl` FLOAT NOT NULL DEFAULT 0 COMMENT 'aggregate pnl (no theo edge symbols);=sum(srs.badTEdgePnl)',
`VaRsu90` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate RiskSlide: uPrc up 90%, vol unchanged (newUPrc = uPrc * Math.Exp(+0.90))',
`VaRsd90` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate RiskSlide: uPrc dn 90%, vol unchanged (newUPrc = uPrc * Math.Exp(-0.90))',
`VaRsu50` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate RiskSlide: uPrc up 50%, vol unchanged (newUPrc = uPrc * Math.Exp(+0.50))',
`VaRsd50` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate RiskSlide: uPrc dn 50%, vol unchanged (newUPrc = uPrc * Math.Exp(-0.50))',
`VaRsu15` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate RiskSlide: uPrc up 15%, vol unchanged (newUPrc = uPrc * Math.Exp(+0.15))',
`VaRsd15` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate RiskSlide: uPrc dn 15%, vol unchanged (newUPrc = uPrc * Math.Exp(-0.15))',
`VaRsu10` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate RiskSlide: uPrc up 10%, vol unchanged (newUPrc = uPrc * Math.Exp(+0.10))',
`VaRsd10` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate RiskSlide: uPrc dn 10%, vol unchanged (newUPrc = uPrc * Math.Exp(-0.10))',
`VaRsu05` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate RiskSlide: uPrc up 5%, vol unchanged (newUPrc = uPrc * Math.Exp(+0.05))',
`VaRsd05` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate RiskSlide: uPrc dn 5%, vol unchanged (newUPrc = uPrc * Math.Exp(-0.05))',
`VaRsu1e` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate RiskSlide: uPrc up 1x implied earn move, vol ramp out',
`VaRsd1e` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate RiskSlide: uPrc dn 1x implied earn move, vol ramp out',
`VaRsu2e` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate RiskSlide: uPrc up 2x implied earn move, vol ramp out',
`VaRsd2e` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate RiskSlide: uPrc dn 2x implied earn move, vol ramp out',
`VaRearn` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate RiskSlide: vol earn ramp out (no uPrc move)',
`VaRcash` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate RiskSlide: uPrc up 30%, vol = 0.01, 6mn deal close (delta neutral)',
`hcCnt` FLOAT NOT NULL DEFAULT 0 COMMENT 'count of haircut > $0.0 symbols',
`haircut25` FLOAT NOT NULL DEFAULT 0 COMMENT 'haircut ($25 minimum/cn) [act basis]',
`haircut37` FLOAT NOT NULL DEFAULT 0 COMMENT 'haircut ($37 minimum/cn) [act basis]',
`lastActivity` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000',
PRIMARY KEY USING HASH (`accnt`,`currency`,`code`,`clientFirm`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='IndustryRiskRecords contain account level position and risk summary detail. These records are published by AggRiskServers throughout the day approximately once per minute.';