CREATE TABLE `SRRisk`.`MsgSymbolRiskSummaryV5` (
`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 'stock ticker (eg MSFT, SPY)',
`ticker_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' COMMENT 'stock ticker (eg MSFT, SPY)',
`ticker_tk` VARCHAR(12) NOT NULL DEFAULT '' COMMENT 'stock ticker (eg MSFT, SPY)',
`accnt` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'SRAccnt (SR assigned;up to 16 chars)',
`tradeDate` DATE NOT NULL DEFAULT '1900-01-01',
`riskSession` ENUM('Regular','PostClose') NOT NULL DEFAULT 'Regular',
`clientFirm` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'SR assigned client firm',
`sector` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'SymbolControl.sector: user defined sector code',
`industry` INT NOT NULL DEFAULT 0 COMMENT 'industry code [00000000]',
`beta` FLOAT NOT NULL DEFAULT 0 COMMENT 'beta (usually beta to SPX; see AccountConfig.betaSource)',
`betaSource` ENUM('None','betaSPX','betaQQQ','betaIWM','clientBeta') NOT NULL DEFAULT 'None',
`uPrc` DOUBLE NOT NULL DEFAULT 0 COMMENT 'current live underlier price (can be from risk server, tool server, or srse server)',
`uMark` DOUBLE NOT NULL DEFAULT 0 COMMENT 'current underlier price [as of risk server record publish] [freezes at 4pm EST]',
`uOpnMark` DOUBLE NOT NULL DEFAULT 0 COMMENT 'start-of-day SR underlier mark (rotated from prior day record) [corp action adjusted]',
`lnDDelta` DOUBLE NOT NULL DEFAULT 0 COMMENT 'long net position delta value (today; SR marks )',
`shDDelta` DOUBLE NOT NULL DEFAULT 0 COMMENT 'short net position delta value (today; SR marks )',
`lnStkMktValueMid` DOUBLE NOT NULL DEFAULT 0 COMMENT 'long stock market value (today; SR marks)',
`shStkMktValueMid` DOUBLE NOT NULL DEFAULT 0 COMMENT 'short stock market value (today; SR marks)',
`optMktValueMid` DOUBLE NOT NULL DEFAULT 0 COMMENT 'option position market value (SR mid marks);=sum[opCurPosM * opr.optVolMark]',
`optMktValueVol` DOUBLE NOT NULL DEFAULT 0 COMMENT 'option position market value (SR vol marks);=sum[opCurPosM * opr.optMidMark]',
`shOpnPosClr` INT NOT NULL DEFAULT 0 COMMENT 'start of period position (from custodian or clearing firm)',
`shOpnPosPrv` INT NOT NULL DEFAULT 0 COMMENT 'start of period position (expected;from SpiderRock archive)',
`shOpnPos` INT NOT NULL DEFAULT 0 COMMENT 'start of period position (effective;from either SR or CLR record)',
`shBot` INT NOT NULL DEFAULT 0 COMMENT 'number of shares bot today',
`shSld` INT NOT NULL DEFAULT 0 COMMENT 'number of shares sld today',
`shSldShrt` INT NOT NULL DEFAULT 0 COMMENT 'number of shares sld short today',
`shMnyBot` DOUBLE NOT NULL DEFAULT 0 COMMENT 'shares money bot today',
`shMnySld` DOUBLE NOT NULL DEFAULT 0 COMMENT 'shares money sld today',
`shBotHdg` INT NOT NULL DEFAULT 0 COMMENT 'number of shares bot today from open pos hedging (spdrSource=HedgeTool)',
`shSldHdg` INT NOT NULL DEFAULT 0 COMMENT 'number of shares sld today from open pos hedging (spdrSource=HedgeTool)',
`shBotTrh` INT NOT NULL DEFAULT 0 COMMENT 'number of shares bot today from open pos hedging (spdrSource=TradeHedge)',
`shSldTrh` INT NOT NULL DEFAULT 0 COMMENT 'number of shares sld today from open pos hedging (spdrSource=TradeHedge)',
`shBotOpn` INT NOT NULL DEFAULT 0 COMMENT 'number of shares bot today from open pos hedging (spdrSource=OpenHedge)',
`shSldOpn` INT NOT NULL DEFAULT 0 COMMENT 'number of shares sld today from open pos hedging (spdrSource=OpenHedge)',
`shBotTrd` INT NOT NULL DEFAULT 0 COMMENT 'number of shares bot today from a trade hedging source (AutoHedge or Trades loop)',
`shSldTrd` INT NOT NULL DEFAULT 0 COMMENT 'number of shares sld today from a trade hedging source (AutoHedge or Trades loop)',
`maxStkDttm` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT 'most recent timestamp of a qualifying stock execution (used to ensure risk record integrity)',
`stPnlMid` DOUBLE NOT NULL DEFAULT 0 COMMENT 'Stock Pnl (SR Marks);=(nbbo.mid - stPrvPrc) * shOpnClr',
`stPnlClr` DOUBLE NOT NULL DEFAULT 0 COMMENT 'Stock Pnl (CLR Marks);=(nbbo.mid - stClrPrc) * shOpnClr',
`stPnlDay` DOUBLE NOT NULL DEFAULT 0 COMMENT 'Net Stock Day Pnl;=sum[ (nbbo.min - fillPrice) * fillQuantity * side ]',
`stDivPnl` DOUBLE NOT NULL DEFAULT 0 COMMENT 'total cash paid/collected since prior period for this position (stock dividend value)',
`stBorrowPnl` DOUBLE NOT NULL DEFAULT 0 COMMENT 'total cash paid/collected since prior period for this position (borrow pnl; usually interest on HTB names)',
`opCnAbsCurPos` INT NOT NULL DEFAULT 0 COMMENT 'abs number of option contracts (position + fills);=sum[abs(opr.cnCurPos)]',
`opCnAbsOpnClr` INT NOT NULL DEFAULT 0 COMMENT 'abs number of start of period option contracts (CLR view); =sum[abs(opr.cnOpnClr)]',
`opCnAbsOpnPrv` INT NOT NULL DEFAULT 0 COMMENT 'abs number of start of period option contracts (SR view); =sum[abs(opr.cnOpnPrv)]',
`opCnAbsOpnPos` INT NOT NULL DEFAULT 0 COMMENT 'abs number of start of period option contracts; =sum[abs(opr.cnOpnPos)]',
`opCnAbsOpnBrk` INT NOT NULL DEFAULT 0 COMMENT 'abs number of option contract start of period breaks (CLR - PRV);=sum[abs(opr.cnOpnClr - opr.cnOpnPrv)]',
`opShShort` INT NOT NULL DEFAULT 0 COMMENT 'equivalent shares from short option positions',
`opCnPosCall` INT NOT NULL DEFAULT 0 COMMENT 'net number of call contracts; =sum[opr.cnOpnClr + opr.cnBot - opr.cnSld] (if call)',
`opCnPosPut` INT NOT NULL DEFAULT 0 COMMENT 'net number of call contracts; =sum[opr.cnOpnClr + opr.cnBot - opr.cnSld] (if put)',
`opCnAbsPair` INT NOT NULL DEFAULT 0 COMMENT 'abs number of option contracts with CP reversals removed;=sum[abs(opr.cnOpnClr + opr.cnBot - opr.cnSld) - abs(opr.cnNetPos)]',
`absAtmEquivCn` FLOAT NOT NULL DEFAULT 0 COMMENT 'abs atm equivalent contracts; = sum[abs(opr.cnOpnPos + opr.cnBot - opr.cnSld) * opr.ve / opr.atmVega]',
`opCnBot` INT NOT NULL DEFAULT 0 COMMENT 'number of option contracts bot today;=sum[opr.cnBot]',
`opCnSld` INT NOT NULL DEFAULT 0 COMMENT 'number of option contracts sld today;=sum[opr.cnSld]',
`opMnyBot` DOUBLE NOT NULL DEFAULT 0 COMMENT 'option money bot',
`opMnySld` DOUBLE NOT NULL DEFAULT 0 COMMENT 'option money sld',
`opPremBot` FLOAT NOT NULL DEFAULT 0 COMMENT 'option premium bot today;=sum[(max(0, opr.optVolMark - opr.loBound) * opr.pointValue) * opr.cnBot]',
`opPremSld` FLOAT NOT NULL DEFAULT 0 COMMENT 'option premium sld today;=sum[(max(0, opr.optVolMark - opr.loBound) * opr.pointValue) * opr.cnSld]',
`maxOptDttm` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT 'DateTime of most recent SpdrOptionExecution (if any)',
`opPnlVol` DOUBLE NOT NULL DEFAULT 0 COMMENT 'Option Open Pnl (SR vol marks); =sum[opr.opnPnlVolMark]',
`opPnlMid` DOUBLE NOT NULL DEFAULT 0 COMMENT 'Option Open Pnl (SR mid marks); =sum[opr.opnPnlMidMark]',
`opPnlClr` DOUBLE NOT NULL DEFAULT 0 COMMENT 'Option Open Pnl (CLR marks); =sum[opr.opnPnlClrMark]',
`opPnlBrk` DOUBLE NOT NULL DEFAULT 0 COMMENT 'Option Mark Break Pnl (SR vol marks to CLR marks);=sum[(opr.cnOpnClr * opr.pointValue) * (opr.optVolMark - opr.optMidMark)]',
`opPnlDay` DOUBLE NOT NULL DEFAULT 0 COMMENT 'Option Day Pnl;=sum[opr.dayPnl]',
`opDnPnlDay` DOUBLE NOT NULL DEFAULT 0 COMMENT 'Option DN Day Pnl (delta neutral);=sum[opr.dnDayPnl]',
`opDayVega` FLOAT NOT NULL DEFAULT 0 COMMENT 'Option Day Vega;=sum[opr.ve * (opr.cnBot - opr.cnSld) * opr.pointValue]',
`opDayWVega` FLOAT NOT NULL DEFAULT 0 COMMENT 'Option Day Vol Weighted Vega;=sum[opr.ve * opr.iVol * (opr.cnBot - opr.cnSld) * opr.pointvalue]',
`opDayTVega` FLOAT NOT NULL DEFAULT 0 COMMENT 'Option Day Time-Weighted Vega;=sum[opr.ve * / sqrt(max(0.1, opr.years * 4)) * (opr.cnBot - opr.cnSld) * opr.pointValue]',
`opDayWtVega` FLOAT NOT NULL DEFAULT 0 COMMENT 'Option Day Vol Time-Weighted Vega;=sum[opr.ve * (opr.iVol / sqrt(max(0.1, opr.years * 4))) * (opr.cnBot - opr.cnSld) * opr.pointValue]',
`opDayTheta` FLOAT NOT NULL DEFAULT 0 COMMENT 'Option Day Theta;=sum[opr.th * ((opr.cnBot - opr.cnSld) * opr.pointValue)]',
`opDayDelta` FLOAT NOT NULL DEFAULT 0 COMMENT 'Option Day Delta;=sum[opr.de * ((opr.cnBot - opr.cnSld) * opr.underliersPerCn)]',
`opTrdDelta` FLOAT NOT NULL DEFAULT 0 COMMENT 'Option Trade Delta (delta fixed at time of trade);=sum[opr.trdDelta]',
`pairPnl` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Dn Pair Pnl;=sum[shNetClrM * (opr.optVolMark - opr.optOpnVolMark - opr.hedgeDePr * (opr.uMark - opr.uOpnMark))]',
`contHedgePnl` FLOAT NOT NULL DEFAULT 0 COMMENT 'Estimated continuous hedging pnl (open positions only) [~1 minute intervals]',
`contHedgePnl1` FLOAT NOT NULL DEFAULT 0 COMMENT 'Estimated continuous hedging pnl (open positions only) [~10 minute intervals]',
`opEdgeOpened` FLOAT NOT NULL DEFAULT 0 COMMENT 'Option Edge Opened (new risk);=sum[opr.edgeOpened]',
`opEdgeClosed` FLOAT NOT NULL DEFAULT 0 COMMENT 'Option Edge Closed (new risk);=sum[opr.edgeClosed]',
`pnlDn` FLOAT NOT NULL DEFAULT 0 COMMENT 'Option Pnl Attr: delta neutral pnl: =sum[volPnl - shClrM * dUPrc * opr.dePr]',
`pnlDe` FLOAT NOT NULL DEFAULT 0 COMMENT 'Option Pnl Attr: delta pnl;=sum[shClrM * dUPrc * opr.dePr]',
`pnlSl` FLOAT NOT NULL DEFAULT 0 COMMENT 'Option Pnl Attr: slope pnl;=sum[shClrM * dUPrc * opr.vePr * opr.veSlopePr]',
`pnlGa` FLOAT NOT NULL DEFAULT 0 COMMENT 'Option Pnl Attr: gamma pnl;=sum[shClrM * 0.5 * dUPrc * dUPrc * (opr.ga + opr.gaPr)/2]',
`pnlTh` FLOAT NOT NULL DEFAULT 0 COMMENT 'Option Pnl Attr: theta pnl;=sum[shClrM * dTime * -opr.thPr]',
`pnlVe` FLOAT NOT NULL DEFAULT 0 COMMENT 'Option Pnl Attr: vega pnl;=sum[shClrM * 100 * dVol * opr.vePr]',
`pnlVo` FLOAT NOT NULL DEFAULT 0 COMMENT 'Option Pnl Attr: volga pnl;=sum[shClrM * 0.5 * 100 * 100 * dVol * dVol * opr.voPr]',
`pnlVa` FLOAT NOT NULL DEFAULT 0 COMMENT 'Option Pnl Attr: vanna pnl;=sum[shClrM * 100 * dVol * dUPrc * opr.vaPr]',
`pnlErr` FLOAT NOT NULL DEFAULT 0 COMMENT 'Option Pnl Attr: error (unexplained) pnl;=sum[shClrM * (volPnl - pnlDe - pnlGa - pnlTh - pnlVe)]',
`pnlRate` FLOAT NOT NULL DEFAULT 0 COMMENT 'Option Pnl Attr: rate pnl;=sum[shClrM * 100 * dRate * opr.rhPr]',
`pnlSDiv` FLOAT NOT NULL DEFAULT 0 COMMENT 'Option Pnl Attr: sdiv pnl;=sum[shClrM * 100 * dSDiv * opr.phPr]',
`pnlDDiv` FLOAT NOT NULL DEFAULT 0 COMMENT 'Option Pnl Attr: ddiv pnl;=sum[shClrM * 100 * (opr.ddiv - opr.ddivPr) / opr.uPrc * opr.phPr]',
`pnlTe` FLOAT NOT NULL DEFAULT 0 COMMENT 'Option Pnl Attr: theo edge pnl;=sum[shClrM * ((opr.tOpx - opr.optVolMark) - (opr.tOpxPr - opr.optOpnVolMark))]',
`pctIvChange` FLOAT NOT NULL DEFAULT 0 COMMENT 'Option Avg IVol Change (Numerator);=sum[abs(shClrM) * opr.ve * log(opr.iVol/opr.iVolPr)]',
`pctIvVega` FLOAT NOT NULL DEFAULT 0 COMMENT 'Option Avg IVol Change (Denominator);=sum[abs(shClrM) * opr.ve]',
`pctTvChange` FLOAT NOT NULL DEFAULT 0 COMMENT 'Option Avg TVol Change (Numerator);=sum[abs(shClrM) * opr.ve * log(opr.tVol/opr.tVolPr)]',
`pctTvVega` FLOAT NOT NULL DEFAULT 0 COMMENT 'Option Avg TVol Change (Denominator);=sum[abs(shClrM) * opr.ve]',
`stkWidthMny` FLOAT NOT NULL DEFAULT 0 COMMENT 'Stock Market Width Value;=sum[0.5 * abs(shCurPos) * (spr.stkAsk - spr.stkBid)]',
`optWidthMny` FLOAT NOT NULL DEFAULT 0 COMMENT 'Option Market Width Value;=sum[0.5 * abs(shCurPosM) * (opr.optAsk - opr.optBid)]',
`dayDDelta` FLOAT NOT NULL DEFAULT 0 COMMENT 'Day $Delta (bot or sld;all sources) today;',
`delta` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Position Delta;=sum[shCurPos] + sum[fcCurPosM] + sum[shCurPosM * opr.de] + sum[other.delta]',
`ddelta` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Position $Delta (Delta * DDMult)',
`deDecay` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Position DeltaDecay;=sum[shCurPosM * opr.deDecay] + sum[other.deDecay]',
`ddDecay` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Position $DeltaDecay (DeltaDecay * DDMult) [change in $delta when one trading day (1.0/252.0) is taken out of option pricing]',
`gamma` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Position Gamma;=sum[shCurPosM * opr.ga] + sum[other.gamma]',
`dGamma` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Position $Gamma',
`theta` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Position Theta;=sum[shCurPosM * opr.th] + sum[other.theta]',
`rho` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Position Rho;=sum[shCurPosM * opr.rh] + sum[other.rho]',
`vega` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Position Vega;=sum[shCurPosM * opr.ve] + sum[other.vega]',
`tVega` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Position Time Weight Vega;=sum[shCurPosM * opr.ve / sqrt(max(0.1, opr.years * 4))]',
`wVega` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Position Vol Weighted Vega;=sum[shCurPosM * opr.iVol * opr.ve]',
`wtVega` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Position Vol Time Weighted Vega;=sum[shCurPosM * opr.iVol * opr.ve / sqrt(max(0.1, opr.years * 4))]',
`ivolVe` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Position Avg Vol Numerator (vega weighted) (avg = ivolVe / avega); =sum[abs(shCurPosM) * opr.iVol * opr.ve]',
`volga` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Position Volga;=sum[shCurPosM * opr.vo] + sum[other.volga]',
`vanna` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Position Vanna;=sum[shCurPosM * opr.va] + sum[other.vanna]',
`slope` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Position VegaDelta (uPrc/Vol correlation factor);=sum[shCurPosM * opr.sl * opr.ve] + sum[other.slope]',
`avega` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Postion Abs Vega;=sum[abs(shCurPosM ) * opr.ve]',
`atheta` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Postion Abs Theta;= sum[abs(shCurPosM) * opr.th]',
`hedgeGamma` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Postion Hedge Gamma (either iVol or tVol based;can go binary);=sum[shCurPos * opr.hedgeGa]',
`hedgeDGamma` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Postion ($) Hedge Gamma',
`premOvPar` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Position Premium Over Parity;=sum[shCurPosM * max(0, opr.optVolMark - opr.loBound)]',
`simpPremOvPar` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Position Premium Over Parity Simple;=sum[shCurPosM * max(0, opr.opxMidMark - max(0, ±(strike - uprc)))]',
`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',
`pinXX` FLOAT NOT NULL DEFAULT 0 COMMENT 'pin strike nearest to current uPrc (zero = none) (only exists if there are near ATM option positions expiring today)',
`opnDeBelow` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Position Open Delta (Open Positions + Open Hedge Trades Only) if liveUPrc < pinXX',
`opnDeAbove` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Position Open Delta (Open Positions + Open Hedge Trades Only) if liveUPrc > pinXX',
`opnDDeBelow` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Position ($) Open Delta (Open Positions + Open Hedge Trades Only) if liveUPrc < pinXX',
`opnDDeAbove` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Position ($) Open Delta (Open Positions + Open Hedge Trades Only) if liveUPrc > pinXX',
`posDeBelow` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Position Hedge Delta (Current Position) if liveUPrc < pinXX',
`posDeAbove` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Position Hedge Delta (Current Position) if liveUPrc > pinXX',
`posDDeBelow` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Position ($) Hedge Delta (Current Position) if liveUPrc < pinXX',
`posDDeAbove` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Position ($) Hedge Delta (Current Position) if liveUPrc > pinXX',
`posHedgeDeltaEx` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Position Hedge Delta (Current Position) if exDate != today',
`posHedgeDDeltaEx` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Position ($) Hedge Delta (Current Position) if exDate != today',
`mmhDelta` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Delta allocated from other symbols (multi-multihedge symbols)',
`mmhContracts` INT NOT NULL DEFAULT 0 COMMENT 'Aggregate Contracts allocated from other symbols (multi-multihedge symbols)',
`mmhSources` TINYTEXT NOT NULL DEFAULT '' COMMENT 'Allocation source string (usually mmh contracts)',
`tEdge` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate $ Theo Edge;=sum[shNetPosM * (opr.tOpx - opr.optVolMark)] if opr.tVol > 0.01 and opr.tOpx > 0.0 and opr.optVolMark > 0.0',
`tEdgeMult` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Abs Net Contracts (Rev/Conv contracts removed);= sum[abs(shNetPosM)]',
`tEdgePr` FLOAT NOT NULL DEFAULT 0 COMMENT 'Prior Day $ Theo Edge',
`tEdgeMultPr` FLOAT NOT NULL DEFAULT 0 COMMENT 'Prior Day Aggregate Abs Net Contracts',
`numTVolErrors` SMALLINT NOT NULL DEFAULT 0 COMMENT 'number of opr.tErr != 0 or opr.tVol < 0.01',
`posTEdgeWV` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Vol Weighted Vega (wvega) where (opr.tOpx > 0 and (opr.tOpx - opr.optVolMark) >= 0)',
`negTEdgeWV` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Vol Weighted Vega (wvega) where (opr.tOpx > 0 and (opr.tOpx - opr.optVolMark) < 0)',
`badTEdgeWV` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Vol Weighted Vega (wvega) where (opr.tOpx = 0)',
`posTEdgePnl` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Dn Pair Pnl where (opr.tOpxPr > 0 and (opr.tOpxPr - opr.priorOpxVolMark) >= 0)',
`negTEdgePnl` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Dn Pair Pnl where (opr.tOpxPr > 0 and (opr.tOpxPr - opr.priorOpxVolMark) < 0)',
`badTEdgePnl` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Dn Pair Pnl where (opr.tOpxPr = 0)',
`tEdge2` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate $ Theo Edge;=sum[shNetPosM * (opr.tOpx - opr.optVolMark)] if opr.tVol > 0.01 and opr.tOpx > 0.0 and opr.optVolMark > 0.0',
`tEdgeMult2` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Abs Net Contracts (Rev/Conv contracts removed);= sum[abs(shNetPosM)]',
`tEdgePr2` FLOAT NOT NULL DEFAULT 0 COMMENT 'Prior Day $ Theo Edge',
`tEdgeMultPr2` FLOAT NOT NULL DEFAULT 0 COMMENT 'Prior Day Aggregate Abs Net Contracts',
`numTVolErrors2` SMALLINT NOT NULL DEFAULT 0 COMMENT 'number of opr.tErr != 0 or opr.tVol < 0.01',
`posTEdgeWV2` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Vol Weighted Vega (wvega) where (opr.tOpx > 0 and (opr.tOpx - opr.optVolMark) >= 0)',
`negTEdgeWV2` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Vol Weighted Vega (wvega) where (opr.tOpx > 0 and (opr.tOpx - opr.optVolMark) < 0)',
`badTEdgeWV2` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Vol Weighted Vega (wvega) where (opr.tOpx = 0)',
`posTEdgePnl2` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Dn Pair Pnl where (opr.tOpxPr > 0 and (opr.tOpxPr - opr.priorOpxVolMark) >= 0)',
`negTEdgePnl2` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Dn Pair Pnl where (opr.tOpxPr > 0 and (opr.tOpxPr - opr.priorOpxVolMark) < 0)',
`badTEdgePnl2` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Dn Pair Pnl where (opr.tOpxPr = 0)',
`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))',
`VaRsu06` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate RiskSlide: uPrc up 6%, vol unchanged (newUPrc = uPrc * Math.Exp(+0.06))',
`VaRsd08` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate RiskSlide: uPrc dn 8%, vol unchanged (newUPrc = uPrc * Math.Exp(-0.08))',
`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)',
`marginUDnVDn` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate RiskSlide: uPrc dn, vol dn',
`marginUDnVUp` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate RiskSlide: uPrc dn, vol up',
`marginUUpVDn` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate RiskSlide: uPrc up, vol dn',
`marginUUpVUp` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate RiskSlide: uPrc up, vol up',
`stkLiqRisk` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Equity Liquidation Risk',
`optLiqRisk` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Option Liquidation Risk',
`shBotC0` INT NOT NULL DEFAULT 0 COMMENT 'hypothetical shares bot (~1 minute intervals)',
`shSldC0` INT NOT NULL DEFAULT 0 COMMENT 'hypothetical shares sld',
`shMnyC0` FLOAT NOT NULL DEFAULT 0 COMMENT 'hypothetical money',
`shBotC1` INT NOT NULL DEFAULT 0 COMMENT 'hypothetical shares bot (~10 minute intervals)',
`shSldC1` INT NOT NULL DEFAULT 0 COMMENT 'hypothetical shares sld',
`shMnyC1` FLOAT NOT NULL DEFAULT 0 COMMENT 'hypothetical money',
`opHcMin25` FLOAT NOT NULL DEFAULT 0 COMMENT 'sum(option haircut minimum) [$25.00/cn]',
`opHcMin37` FLOAT NOT NULL DEFAULT 0 COMMENT 'sum(option haircut minimum) [$37.50/cn]',
`haircut25` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Risk Margin (JBO): [$25 minimum;-15/+15 uPrc slides]',
`haircut37` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate Risk Margin (PM): [$37.50 minimum;-8/+6 uPrc slides (broad based);-15/+15 uPrc slides (non-broad based)]',
`numStkErrors` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'number of stock positions with a computation error (should be zero)',
`numOptErrors` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'number of options positions with a computation error (should be zero)',
`updateSource` ENUM('None','Loop','Priority') NOT NULL DEFAULT 'None',
`stkMarkFlag` VARCHAR(255) NOT NULL DEFAULT 'None' COMMENT 'Stock position error flag',
`optMarkFlag` VARCHAR(255) NOT NULL DEFAULT 'None' COMMENT 'Option position error flag',
`riskAlert1` ENUM('None','ExerciseNow','ExBeforeNextDiv','ExAfterNextDiv','ExBeforeFutureDiv','ExAfterFutureDiv','ExDivCall','ExAskSoon','ExAskNow','ExSurfSoon','ExSurfNow','ExBidSoon','ExBidNow') NOT NULL DEFAULT 'None' COMMENT 'Risk Alert Code: Early Exercise, etc.',
`riskAlert2` ENUM('None','ExerciseNow','ExBeforeNextDiv','ExAfterNextDiv','ExBeforeFutureDiv','ExAfterFutureDiv','ExDivCall','ExAskSoon','ExAskNow','ExSurfSoon','ExSurfNow','ExBidSoon','ExBidNow') NOT NULL DEFAULT 'None' COMMENT 'Risk Alert Code: Early Exercise, etc.',
`riskAlert3` ENUM('None','ExerciseNow','ExBeforeNextDiv','ExAfterNextDiv','ExBeforeFutureDiv','ExAfterFutureDiv','ExDivCall','ExAskSoon','ExAskNow','ExSurfSoon','ExSurfNow','ExBidSoon','ExBidNow') NOT NULL DEFAULT 'None' COMMENT 'Risk Alert Code: Early Exercise, etc.',
`riskAlert4` ENUM('None','ExerciseNow','ExBeforeNextDiv','ExAfterNextDiv','ExBeforeFutureDiv','ExAfterFutureDiv','ExDivCall','ExAskSoon','ExAskNow','ExSurfSoon','ExSurfNow','ExBidSoon','ExBidNow') NOT NULL DEFAULT 'None' COMMENT 'Risk Alert Code: Early Exercise, etc.',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000',
PRIMARY KEY USING HASH (`ticker_tk`,`ticker_at`,`ticker_ts`,`accnt`,`tradeDate`,`riskSession`,`clientFirm`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='SymbolRiskSummary records contain live symbol level risk aggregation of StockPositionRecord and OptionPositionRecord values.\nRecords are published by AggRiskServers if/when positions change and about once per minute otherwise.';