Skip to main content
Version: 8.4.10.2

Schema: IndustryRiskRecordV5 (ID: 4790)

IndustryRiskRecords contain account level position and risk summary detail. These records are published by AggRiskServers throughout the day approximately once per minute.

METADATA

AttributeValue
Topic4740-risk-v5
MLink TokenClientRisk
SRSE ProductSRRisk

Note: The symbol = next to a field number indicates that it is a primary key.

BODY

#FieldTypeComment
10=accntstring(16)
11=currencyenum : Currency
12=codestring(16)
13=clientFirmstring(16)SR assigned client firm
106vegaLongfloatsum of long vega symbol positions;=sum(+srs.vega) if srs.vega > 0
109vegaShortfloatsum of short vega symbol positions;= sum(-srs.vega) if srs.vega < 0
112wVegaLongfloatsum of long weighted vega symbol positions;=sum(+srs.wVega) if srs.wVega > 0
115wVegaShortfloatsum of short weighted vega symbol positions;= sum(-srs.wVega) if srs.wVega < 0
118wtVegaLongfloatsum of long time weighted vega symbol positions;=sum(+srs.wtVega) if srs.wtVega > 0
121wtVegaShortfloatsum of short time weighted vega symbol positions;= sum(-srs.wtVega) if srs.wtVega < 0
124thetaLongfloatsum of long vega symbol positions;=sum(+srs.theta) if srs.theta > 0
127thetaShortfloatsum of short vega symbol positions;= sum(-srs.theta) if srs.theta < 0
130rhoLongfloatsum of long rho symbol positions;=sum(+srs.rho) if srs.rho > 0
133rhoShortfloatsum of short rho symbol positions;= sum(-srs.rho) if srs.rho < 0
136ivolLnfloatvega weighted average symbol ivol where srs.vega > 0
139ivolShfloatvega weighted average symbol ivol where srs.vega < 0
142wtVeDdfloatAggregate Dd Time Weighted Vega;=sum[wtVega] if opr.xde < -0.30
145wtVeDnfloatAggregate Dn Time Weighted Vega;=sum[wtVega] if -0.30 <= opr.xde < -0.10
148wtVeAtfloatAggregate At Time Weighted Vega;=sum[wtVega] if abs(opr.xde) <= 0.10
151wtVeUpfloatAggregate Up Time Weighted Vega;=sum[wtVega] if +0.10 < opr.xde <= +0.30
154wtVeDufloatAggregate Du Time Weighted Vega;=sum[wtVega] if +0.30 < opr.xde
157wtVeM1floatAggregate M1 Time Weighted Vega;=sum[wtVega] if days < 10
160wtVeM2floatAggregate M2 Time Weighted Vega;=sum[wtVega] if 10 < days < 25
163wtVeM3floatAggregate M3 Time Weighted Vega;=sum[wtVega] if 25 < days < 65
166wtVeM4floatAggregate M4 Time Weighted Vega;=sum[wtVega] if 65 < days < 130
169wtVeM5floatAggregate M5 Time Weighted Vega;=sum[wtVega] if 130 < days
172ddeltafloatnet $delta;=sum(srs.ddelta)
175numSymbolsintcount of srs records being aggregated
178absCurShintabsolute number of account shares (CLR + trades);=sum(srs.opShAbsCur)
181absCurCnintabsolute number of account option contracts (CLR + trades);=sum(srs.opCnAbsCur)
184premOvParfloataggregate premium over parity for the option position;=sum(srs.premOvPar)
187stPnlMidfloatstock pnl (using SR marks)
190stPnlClrfloatstock pnl (using CLR marks)
193opPnlVolfloatoptions pnl (using SR vol marks)
196opPnlMidfloatoptions pnl (using SR mid marks)
199opPnlClrfloatoptions pnl (using CLR mid marks)
202opDayVegafloatoption vega traded today
205opDayWVegafloatoption (vol weighted) vega traded today
208opDayTVegafloatoption (time weighted) vega traded today
211opDayWtVegafloatoption (vol time weighted) vega traded today
214opDayThetafloatoption theta traded today
217opEdgeOpenedfloatoption theo edge opened today
220opEdgeClosedfloatoption theo edge closed today
223pnlDnfloatoption delta neutral pnl;=sum(srs.pnlDn)
226pnlDefloatoption delta pnl;=sum(srs.pnlDe)
229pnlSlfloatoption vega/delta pnl;=sum(srs.pnlSl)
232pnlGafloatoption gamma pnl;=sum(srs.pnlGa)
235pnlThfloatoption theta pnl;=sum(srs.pnlTh)
238pnlVefloatoption vega pnl;=sum(srs.pnlVe)
241pnlVofloatoption volga pnl;=sum(srs.pnlVo)
244pnlVafloatoption vanna pnl;=sum(srs.pnlVa)
247pnlDDivfloatoption DDiv pnl;=sum(srs.pnlDDiv)
250pnlSDivfloatoption SDiv pnl;=sum(srs.pnlSDiv)
253pnlRatefloatoption Rate pnl;=sum(srs.pnlRate)
256pnlErrfloatoption unexplained (error) pnl;=sum(srs.pnlErr)
259pnlTefloatoption theo edge pnl;=sum(srs.pnlTe)
262pnlLnfloatoption pnl from symbol positions with +vega
265pnlShfloatoption pnl from symbol positions with -vega
268tEdgefloataggregate option theo edge;=sum(srs.tEdge)
271tEdgeMultfloatdenominator for computing edge per unit;=sum(srs.tEdgeMult)
274tEdgePrfloataggregate option theo edge (prior period);=sum(srs.tEdgePr)
277tEdgeMultPrfloatenominator for computing edge per unit (prior period);=sum(srs.tEdgeMultPr)
280posTEdgePnlfloataggregate pnl (positive edge symbols);=sum(srs.posTEdgePnl)
283negTEdgePnlfloataggregate pnl (negative edge symbols);=sum(srs.negTEdgePnl)
286badTEdgePnlfloataggregate pnl (no theo edge symbols);=sum(srs.badTEdgePnl)
289VaRsu90floatAggregate RiskSlide: uPrc up 90%, vol unchanged (newUPrc = uPrc * Math.Exp(+0.90))
292VaRsd90floatAggregate RiskSlide: uPrc dn 90%, vol unchanged (newUPrc = uPrc * Math.Exp(-0.90))
295VaRsu50floatAggregate RiskSlide: uPrc up 50%, vol unchanged (newUPrc = uPrc * Math.Exp(+0.50))
298VaRsd50floatAggregate RiskSlide: uPrc dn 50%, vol unchanged (newUPrc = uPrc * Math.Exp(-0.50))
301VaRsu15floatAggregate RiskSlide: uPrc up 15%, vol unchanged (newUPrc = uPrc * Math.Exp(+0.15))
304VaRsd15floatAggregate RiskSlide: uPrc dn 15%, vol unchanged (newUPrc = uPrc * Math.Exp(-0.15))
307VaRsu10floatAggregate RiskSlide: uPrc up 10%, vol unchanged (newUPrc = uPrc * Math.Exp(+0.10))
310VaRsd10floatAggregate RiskSlide: uPrc dn 10%, vol unchanged (newUPrc = uPrc * Math.Exp(-0.10))
313VaRsu05floatAggregate RiskSlide: uPrc up 5%, vol unchanged (newUPrc = uPrc * Math.Exp(+0.05))
316VaRsd05floatAggregate RiskSlide: uPrc dn 5%, vol unchanged (newUPrc = uPrc * Math.Exp(-0.05))
319VaRsu1efloatAggregate RiskSlide: uPrc up 1x implied earn move, vol ramp out
322VaRsd1efloatAggregate RiskSlide: uPrc dn 1x implied earn move, vol ramp out
325VaRsu2efloatAggregate RiskSlide: uPrc up 2x implied earn move, vol ramp out
328VaRsd2efloatAggregate RiskSlide: uPrc dn 2x implied earn move, vol ramp out
331VaRearnfloatAggregate RiskSlide: vol earn ramp out (no uPrc move)
334VaRcashfloatAggregate RiskSlide: uPrc up 30%, vol = 0.01, 6mn deal close (delta neutral)
337hcCntfloatcount of haircut > $0.0 symbols
340haircut25floathaircut ($25 minimum/cn) [act basis]
343haircut37floathaircut ($37 minimum/cn) [act basis]
346lastActivityDateTime
349timestampDateTime

Get Schema API Call

import requests 

# Replace with your desired MLINK URL
MLINK_PROD_URL = 'https://mlink-live.nms.saturn.spiderrockconnect.com/rest/json'

# Replace with your MLINK API Key
API_KEY = 'XXXX-XXXX-XXXX-XXXX'

# Replace with your desired MsgType.
MSG_TYPE = 'IndustryRiskRecordV5'

# Request Parameters for Get Schema Of The MsgType
params = {
#Required Parameters
"apiKey": API_KEY,
"cmd": 'getschema',
"msgType": MSG_TYPE,
}

response = requests.get(MLINK_PROD_URL, params=params)

Get Msg API Call

import requests 

# Replace with your desired MLINK URL
MLINK_PROD_URL = 'https://mlink-live.nms.saturn.spiderrockconnect.com/rest/json'

# Replace with your MLINK API Key
API_KEY = 'XXXX-XXXX-XXXX-XXXX'

# Replace with your desired MsgType.
MSG_TYPE = 'IndustryRiskRecordV5'

# Replace with your pkey value for getting the specific message desired
PKEY = 'ReplaceThisValueForTheQueryToWork'

# Replace with your desired view. A "|" separated list of views can be provided
# If no view is provided, all views will be returned.
VIEW = 'vegaLong|vegaShort|wVegaLong|wVegaShort|wtVegaLong|wtVegaShort|thetaLong|thetaShort|rhoLong|rhoShort|ivolLn|ivolSh|wtVeDd|wtVeDn|wtVeAt|wtVeUp|wtVeDu|wtVeM1|wtVeM2|wtVeM3|wtVeM4|wtVeM5|ddelta|numSymbols|absCurSh|absCurCn|premOvPar|stPnlMid|stPnlClr|opPnlVol|opPnlMid|opPnlClr|opDayVega|opDayWVega|opDayTVega|opDayWtVega|opDayTheta|opEdgeOpened|opEdgeClosed|pnlDn|pnlDe|pnlSl|pnlGa|pnlTh|pnlVe|pnlVo|pnlVa|pnlDDiv|pnlSDiv|pnlRate|pnlErr|pnlTe|pnlLn|pnlSh|tEdge|tEdgeMult|tEdgePr|tEdgeMultPr|posTEdgePnl|negTEdgePnl|badTEdgePnl|VaRsu90|VaRsd90|VaRsu50|VaRsd50|VaRsu15|VaRsd15|VaRsu10|VaRsd10|VaRsu05|VaRsd05|VaRsu1e|VaRsd1e|VaRsu2e|VaRsd2e|VaRearn|VaRcash|hcCnt|haircut25|haircut37|lastActivity|timestamp'

# Replace with your desired where clause.
# a string in the form "field1:eq:valuse" or "(field1:ne:value1 & field1:ne:value2)
# "WHERE" clauses can contain the following comparison symbols:
# :gt: is greater than
# :ge: is greater than or equal to
# :lt: is less than
# :le: is less than or equal to
# :eq: is equal
# :ne: is not equal
# %26 is an AND statement
# | is an OR statement
# :sw: is starts with
# :ew: is ends with
# :cv: is contains values
# :nv: is does not contain value
# :cb: is contained between (two dates for instance) separated by '$'
WHERE = 'accnt:eq:ExampleString'

# Request Parameters for getmsg Of The MsgType
params = {
# Required Parameters
"apiKey": API_KEY,
"cmd": 'getmsg',
"pkey": PKEY,
"msgType": MSG_TYPE,
# Optional Parameters
"view": VIEW,
"where": WHERE
}

response = requests.get(MLINK_PROD_URL, params=params)

Get Msgs API Call

import requests 

# Replace with your desired MLINK URL
MLINK_PROD_URL = 'https://mlink-live.nms.saturn.spiderrockconnect.com/rest/json'

# Replace with your MLINK API Key
API_KEY = 'XXXX-XXXX-XXXX-XXXX'

# Replace with your desired MsgType.
MSG_TYPE = 'IndustryRiskRecordV5'

# Replace with your desired view. A "|" separated list of views can be provided
# If no view is provided, all views will be returned
VIEW = 'vegaLong|vegaShort|wVegaLong|wVegaShort|wtVegaLong|wtVegaShort|thetaLong|thetaShort|rhoLong|rhoShort|ivolLn|ivolSh|wtVeDd|wtVeDn|wtVeAt|wtVeUp|wtVeDu|wtVeM1|wtVeM2|wtVeM3|wtVeM4|wtVeM5|ddelta|numSymbols|absCurSh|absCurCn|premOvPar|stPnlMid|stPnlClr|opPnlVol|opPnlMid|opPnlClr|opDayVega|opDayWVega|opDayTVega|opDayWtVega|opDayTheta|opEdgeOpened|opEdgeClosed|pnlDn|pnlDe|pnlSl|pnlGa|pnlTh|pnlVe|pnlVo|pnlVa|pnlDDiv|pnlSDiv|pnlRate|pnlErr|pnlTe|pnlLn|pnlSh|tEdge|tEdgeMult|tEdgePr|tEdgeMultPr|posTEdgePnl|negTEdgePnl|badTEdgePnl|VaRsu90|VaRsd90|VaRsu50|VaRsd50|VaRsu15|VaRsd15|VaRsu10|VaRsd10|VaRsu05|VaRsd05|VaRsu1e|VaRsd1e|VaRsu2e|VaRsd2e|VaRearn|VaRcash|hcCnt|haircut25|haircut37|lastActivity|timestamp'

# Replace with your desired where clause.
# a string in the form "field1:eq:value" or "(field1:ne:value1 & field1:ne:value2)
# "WHERE" clauses can contain the following comparison symbols:
# :gt: is greater than
# :ge: is greater than or equal to
# :lt: is less than
# :le: is less than or equal to
# :eq: is equal
# :ne: is not equal
# %26 is an AND statement
# | is an OR statement
# :sw: is starts with
# :ew: is ends with
# :cv: is contains values
# :nv: is does not contain value
# :cb: is contained between (two dates for instance) separated by '$'
WHERE = 'accnt:eq:ExampleString'

# Replace with your desired limit of how many messages you receive. The default limit is 500
LIMIT = 500

# Order clause eg. "(field1:DESC | field1:ASC | field2:DESC:ABS | field2:ASC:ABS" (default is unordered; default is faster)
ORDER = 'vegaLong:ASC'

# Request Parameters for getmsgs Of The MsgType
params = {
# Required Parameters
"apiKey": API_KEY,
"cmd": 'getmsgs',
"msgType": MSG_TYPE,
# Optional Parameters
"view": VIEW,
"where": WHERE,
"limit": LIMIT,
"order": ORDER
}

response = requests.get(MLINK_PROD_URL, params=params)

Get Aggregate API Call

import requests 

# Replace with your desired MLINK URL
MLINK_PROD_URL = 'https://mlink-live.nms.saturn.spiderrockconnect.com/rest/json'

# Replace with your MLINK API Key
API_KEY = 'XXXX-XXXX-XXXX-XXXX'

# Replace with your desired MsgType.
MSG_TYPE = 'IndustryRiskRecordV5'

# Replace with fields you want to see aggregate values for. A "|" separated list of measures should be provided
MEASURE = 'vegaLong|vegaShort|wVegaLong|wVegaShort|wtVegaLong|wtVegaShort|thetaLong|thetaShort|rhoLong|rhoShort|ivolLn|ivolSh|wtVeDd|wtVeDn|wtVeAt|wtVeUp|wtVeDu|wtVeM1|wtVeM2|wtVeM3|wtVeM4|wtVeM5|ddelta|numSymbols|absCurSh|absCurCn|premOvPar|stPnlMid|stPnlClr|opPnlVol|opPnlMid|opPnlClr|opDayVega|opDayWVega|opDayTVega|opDayWtVega|opDayTheta|opEdgeOpened|opEdgeClosed|pnlDn|pnlDe|pnlSl|pnlGa|pnlTh|pnlVe|pnlVo|pnlVa|pnlDDiv|pnlSDiv|pnlRate|pnlErr|pnlTe|pnlLn|pnlSh|tEdge|tEdgeMult|tEdgePr|tEdgeMultPr|posTEdgePnl|negTEdgePnl|badTEdgePnl|VaRsu90|VaRsd90|VaRsu50|VaRsd50|VaRsu15|VaRsd15|VaRsu10|VaRsd10|VaRsu05|VaRsd05|VaRsu1e|VaRsd1e|VaRsu2e|VaRsd2e|VaRearn|VaRcash|hcCnt|haircut25|haircut37|lastActivity|timestamp'

# Replace with fields you want to see aggregated. A "|" separated list of fields should be provided
GROUP = ''

# Replace with your desired where clause.
# a string in the form "field1:eq:value" or "(field1:ne:value1 & field1:ne:value2)
# "WHERE" clauses can contain the following comparison symbols:
# :gt: is greater than
# :ge: is greater than or equal to
# :lt: is less than
# :le: is less than or equal to
# :eq: is equal
# :ne: is not equal
# %26 is an AND statement
# | is an OR statement
# :sw: is starts with
# :ew: is ends with
# :cv: is contains values
# :nv: is does not contain value
# :cb: is contained between (two dates for instance) separated by '$'
WHERE = 'accnt:eq:ExampleString'

# Request Parameters for getaggregate Of The MsgType
params = {
# Required Parameters
"apiKey": API_KEY,
"cmd": 'getaggregate',
"msgType": MSG_TYPE,
"measure": MEASURE,
"group": GROUP,
# Optional Parameters
"where": WHERE,
}

response = requests.get(MLINK_PROD_URL, params=params)

Get Count API Call

import requests 

# Replace with your desired MLINK URL
MLINK_PROD_URL = 'https://mlink-live.nms.saturn.spiderrockconnect.com/rest/json'

# Replace with your MLINK API Key
API_KEY = 'XXXX-XXXX-XXXX-XXXX'

# Replace with your desired MsgType.
MSG_TYPE = 'IndustryRiskRecordV5'

# Replace with your desired where clause.
# a string in the form "field1:eq:value" or "(field1:ne:value1 & field1:ne:value2)
# "WHERE" clauses can contain the following comparison symbols:
# :gt: is greater than
# :ge: is greater than or equal to
# :lt: is less than
# :le: is less than or equal to
# :eq: is equal
# :ne: is not equal
# %26 is an AND statement
# | is an OR statement
# :sw: is starts with
# :ew: is ends with
# :cv: is contains values
# :nv: is does not contain value
# :cb: is contained between (two dates for instance) separated by '$'
WHERE = 'accnt:eq:ExampleString'

# Request Parameters for getCount Of The MsgType
params = {
# Required Parameters
"apiKey": API_KEY,
"cmd": 'getcount',
"msgType": MSG_TYPE,
# Optional Parameters
"where": WHERE,
}

response = requests.get(MLINK_PROD_URL, params=params)