Skip to main content
Version: Staging

Schema: ExpirationRiskRecordV5 (ID: 4765)

ExpirationRiskRecords 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 TokenSystemData
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=expirationDateKey
13=clientFirmstring(16)SR assigned client firm
106vegaLongfloatsum of long vega symbol positions;=sum(+ors.vega) if ors.vega > 0
109vegaShortfloatsum of short vega symbol positions;= sum(-ors.vega) if ors.vega < 0
112wVegaLongfloatsum of long weighted vega symbol positions;=sum(+ors.wVega) if ors.wVega > 0
115wVegaShortfloatsum of short weighted vega symbol positions;= sum(-ors.wVega) if ors.wVega < 0
118wtVegaLongfloatsum of long time weighted vega symbol positions;=sum(+ors.wtVega) if ors.wtVega > 0
121wtVegaShortfloatsum of short time weighted vega symbol positions;= sum(-ors.wtVega) if ors.wtVega < 0
124thetaLongfloatsum of long vega symbol positions;=sum(+ors.theta) if ors.theta > 0
127thetaShortfloatsum of short vega symbol positions;= sum(-ors.theta) if ors.theta < 0
130rhoLongfloatsum of long rho symbol positions;=sum(+ors.rho) if ors.rho > 0
133rhoShortfloatsum of short rho symbol positions;= sum(-ors.rho) if ors.rho < 0
136dGammaLongfloatsum of long $ gamma option positions
139dGammaShortfloatsum of short $gamma option positions
142dBetaGaLongfloatsum of long $ beta/gamma option positions
145dBetaGaShortfloatsum of short $ beta/gamma option positions
148ivolLnfloatvega weighted average symbol ivol where ors.vega > 0
151ivolShfloatvega weighted average symbol ivol where ors.vega < 0
154wtVeDdfloatAggregate Dd Time Weighted Vega;=sum[wtVega] if opr.xde < -0.30
157wtVeDnfloatAggregate Dn Time Weighted Vega;=sum[wtVega] if -0.30 <= opr.xde < -0.10
160wtVeAtfloatAggregate At Time Weighted Vega;=sum[wtVega] if abs(opr.xde) <= 0.10
163wtVeUpfloatAggregate Up Time Weighted Vega;=sum[wtVega] if +0.10 < opr.xde <= +0.30
166wtVeDufloatAggregate Du Time Weighted Vega;=sum[wtVega] if +0.30 < opr.xde
169absClrCnintabsolute number of contracts (open clr)
172absCurCnintabsolute number of contracts (open clr + bot - sld)
175premOvParfloataggregate option premium over parity
178opPnlVolfloatoptions pnl (using SR vol marks)
181opPnlMidfloatoptions pnl (using SR mid marks)
184opPnlClrfloatoptions pnl (using CLR mid marks)
187opDayVegafloatoption vega traded today
190opDayWVegafloatoption (vol weighted) vega traded today
193opDayTVegafloatoption (time weighted) vega traded today
196opDayWtVegafloatoption (vol time weighted) vega traded today
199opDayThetafloatoption theta traded today
202opEdgeOpenedfloatoption theo edge opened today
205opEdgeClosedfloatoption theo edge closed today
208pnlDnfloatoption delta neutral pnl;=sum(ors.pnlDn)
211pnlDefloatoption delta pnl;=sum(ors.pnlDe)
214pnlSlfloatoption vega/delta pnl;=sum(ors.pnlSl)
217pnlGafloatoption gamma pnl;=sum(ors.pnlGa)
220pnlThfloatoption theta pnl;=sum(ors.pnlTh)
223pnlVefloatoption vega pnl;=sum(ors.pnlVe)
226pnlVofloatoption volga pnl;=sum(ors.pnlVo)
229pnlVafloatoption vanna pnl;=sum(ors.pnlVa)
232pnlDDivfloatoption DDiv pnl;=sum(ors.pnlDDiv)
235pnlSDivfloatoption SDiv pnl;=sum(ors.pnlSDiv)
238pnlRatefloatoption Rate pnl;=sum(ors.pnlRate)
241pnlErrfloatoption unexplained (error) pnl;=sum(ors.pnlErr)
244pnlTefloatoption theo edge pnl;=sum(ors.pnlTe)
247pnlLnfloatoption pnl from option positions with +vega
250pnlShfloatoption pnl from option positions with -vega
253tEdgefloataggregate option theo edge;=sum(srs.tEdge)
256tEdgeMultfloatdenominator for computing edge per unit;=sum(srs.tEdgeMult)
259tEdgePrfloataggregate option theo edge (prior period);=sum(srs.tEdgePr)
262tEdgeMultPrfloatenominator for computing edge per unit (prior period);=sum(srs.tEdgeMultPr)
265posTEdgePnlfloataggregate pnl (positive edge symbols);=sum(ors.posTEdgePnl)
268negTEdgePnlfloataggregate pnl (negative edge symbols);=sum(ors.negTEdgePnl)
271badTEdgePnlfloataggregate pnl (no theo edge symbols);=sum(ors.badTEdgePnl)
274VaRsu90floatAggregate RiskSlide: uPrc up 90%, vol unchanged (newUPrc = uPrc * Math.Exp(+0.90))
277VaRsd90floatAggregate RiskSlide: uPrc dn 90%, vol unchanged (newUPrc = uPrc * Math.Exp(-0.90))
280VaRsu50floatAggregate RiskSlide: uPrc up 50%, vol unchanged (newUPrc = uPrc * Math.Exp(+0.50))
283VaRsd50floatAggregate RiskSlide: uPrc dn 50%, vol unchanged (newUPrc = uPrc * Math.Exp(-0.50))
286VaRsu15floatAggregate RiskSlide: uPrc up 15%, vol unchanged (newUPrc = uPrc * Math.Exp(+0.15))
289VaRsd15floatAggregate RiskSlide: uPrc dn 15%, vol unchanged (newUPrc = uPrc * Math.Exp(-0.15))
292VaRsu10floatAggregate RiskSlide: uPrc up 10%, vol unchanged (newUPrc = uPrc * Math.Exp(+0.10))
295VaRsd10floatAggregate RiskSlide: uPrc dn 10%, vol unchanged (newUPrc = uPrc * Math.Exp(-0.10))
298VaRsu05floatAggregate RiskSlide: uPrc up 5%, vol unchanged (newUPrc = uPrc * Math.Exp(+0.05))
301VaRsd05floatAggregate RiskSlide: uPrc dn 5%, vol unchanged (newUPrc = uPrc * Math.Exp(-0.05))
304VaRsu1efloatAggregate RiskSlide: uPrc up 1x implied earn move, vol ramp out
307VaRsd1efloatAggregate RiskSlide: uPrc dn 1x implied earn move, vol ramp out
310VaRsu2efloatAggregate RiskSlide: uPrc up 2x implied earn move, vol ramp out
313VaRsd2efloatAggregate RiskSlide: uPrc dn 2x implied earn move, vol ramp out
316VaRearnfloatAggregate RiskSlide: vol earn ramp out (no uPrc move)
319VaRcashfloatAggregate RiskSlide: uPrc up 30%, vol = 0.01, 6mn deal close (delta neutral)
322lastActivityDateTime
325timestampDateTime

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 = 'ExpirationRiskRecordV5'

# 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 = 'ExpirationRiskRecordV5'

# 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|dGammaLong|dGammaShort|dBetaGaLong|dBetaGaShort|ivolLn|ivolSh|wtVeDd|wtVeDn|wtVeAt|wtVeUp|wtVeDu|absClrCn|absCurCn|premOvPar|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|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 = 'ExpirationRiskRecordV5'

# 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|dGammaLong|dGammaShort|dBetaGaLong|dBetaGaShort|ivolLn|ivolSh|wtVeDd|wtVeDn|wtVeAt|wtVeUp|wtVeDu|absClrCn|absCurCn|premOvPar|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|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 = 'ExpirationRiskRecordV5'

# 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|dGammaLong|dGammaShort|dBetaGaLong|dBetaGaShort|ivolLn|ivolSh|wtVeDd|wtVeDn|wtVeAt|wtVeUp|wtVeDu|absClrCn|absCurCn|premOvPar|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|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 = 'ExpirationRiskRecordV5'

# 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)