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
Attribute | Value |
---|---|
Topic | 4740-risk-v5 |
MLink Token | ClientRisk |
SRSE Product | SRRisk |
Note: The symbol
=
next to a field number indicates that it is a primary key.
BODY
# | Field | Type | Comment |
---|---|---|---|
10= | accnt | string(16) | |
11= | currency | enum : Currency | |
12= | expiration | DateKey | |
13= | clientFirm | string(16) | SR assigned client firm |
106 | vegaLong | float | sum of long vega symbol positions;=sum(+ors.vega) if ors.vega > 0 |
109 | vegaShort | float | sum of short vega symbol positions;= sum(-ors.vega) if ors.vega < 0 |
112 | wVegaLong | float | sum of long weighted vega symbol positions;=sum(+ors.wVega) if ors.wVega > 0 |
115 | wVegaShort | float | sum of short weighted vega symbol positions;= sum(-ors.wVega) if ors.wVega < 0 |
118 | wtVegaLong | float | sum of long time weighted vega symbol positions;=sum(+ors.wtVega) if ors.wtVega > 0 |
121 | wtVegaShort | float | sum of short time weighted vega symbol positions;= sum(-ors.wtVega) if ors.wtVega < 0 |
124 | thetaLong | float | sum of long vega symbol positions;=sum(+ors.theta) if ors.theta > 0 |
127 | thetaShort | float | sum of short vega symbol positions;= sum(-ors.theta) if ors.theta < 0 |
130 | rhoLong | float | sum of long rho symbol positions;=sum(+ors.rho) if ors.rho > 0 |
133 | rhoShort | float | sum of short rho symbol positions;= sum(-ors.rho) if ors.rho < 0 |
136 | dGammaLong | float | sum of long $ gamma option positions |
139 | dGammaShort | float | sum of short $gamma option positions |
142 | dBetaGaLong | float | sum of long $ beta/gamma option positions |
145 | dBetaGaShort | float | sum of short $ beta/gamma option positions |
148 | ivolLn | float | vega weighted average symbol ivol where ors.vega > 0 |
151 | ivolSh | float | vega weighted average symbol ivol where ors.vega < 0 |
154 | wtVeDd | float | Aggregate Dd Time Weighted Vega;=sum[wtVega] if opr.xde < -0.30 |
157 | wtVeDn | float | Aggregate Dn Time Weighted Vega;=sum[wtVega] if -0.30 <= opr.xde < -0.10 |
160 | wtVeAt | float | Aggregate At Time Weighted Vega;=sum[wtVega] if abs(opr.xde) <= 0.10 |
163 | wtVeUp | float | Aggregate Up Time Weighted Vega;=sum[wtVega] if +0.10 < opr.xde <= +0.30 |
166 | wtVeDu | float | Aggregate Du Time Weighted Vega;=sum[wtVega] if +0.30 < opr.xde |
169 | absClrCn | int | absolute number of contracts (open clr) |
172 | absCurCn | int | absolute number of contracts (open clr + bot - sld) |
175 | premOvPar | float | aggregate option premium over parity |
178 | opPnlVol | float | options pnl (using SR vol marks) |
181 | opPnlMid | float | options pnl (using SR mid marks) |
184 | opPnlClr | float | options pnl (using CLR mid marks) |
187 | opDayVega | float | option vega traded today |
190 | opDayWVega | float | option (vol weighted) vega traded today |
193 | opDayTVega | float | option (time weighted) vega traded today |
196 | opDayWtVega | float | option (vol time weighted) vega traded today |
199 | opDayTheta | float | option theta traded today |
202 | opEdgeOpened | float | option theo edge opened today |
205 | opEdgeClosed | float | option theo edge closed today |
208 | pnlDn | float | option delta neutral pnl;=sum(ors.pnlDn) |
211 | pnlDe | float | option delta pnl;=sum(ors.pnlDe) |
214 | pnlSl | float | option vega/delta pnl;=sum(ors.pnlSl) |
217 | pnlGa | float | option gamma pnl;=sum(ors.pnlGa) |
220 | pnlTh | float | option theta pnl;=sum(ors.pnlTh) |
223 | pnlVe | float | option vega pnl;=sum(ors.pnlVe) |
226 | pnlVo | float | option volga pnl;=sum(ors.pnlVo) |
229 | pnlVa | float | option vanna pnl;=sum(ors.pnlVa) |
232 | pnlDDiv | float | option DDiv pnl;=sum(ors.pnlDDiv) |
235 | pnlSDiv | float | option SDiv pnl;=sum(ors.pnlSDiv) |
238 | pnlRate | float | option Rate pnl;=sum(ors.pnlRate) |
241 | pnlErr | float | option unexplained (error) pnl;=sum(ors.pnlErr) |
244 | pnlTe | float | option theo edge pnl;=sum(ors.pnlTe) |
247 | pnlLn | float | option pnl from option positions with +vega |
250 | pnlSh | float | option pnl from option positions with -vega |
253 | tEdge | float | aggregate option theo edge;=sum(srs.tEdge) |
256 | tEdgeMult | float | denominator for computing edge per unit;=sum(srs.tEdgeMult) |
259 | tEdgePr | float | aggregate option theo edge (prior period);=sum(srs.tEdgePr) |
262 | tEdgeMultPr | float | enominator for computing edge per unit (prior period);=sum(srs.tEdgeMultPr) |
265 | posTEdgePnl | float | aggregate pnl (positive edge symbols);=sum(ors.posTEdgePnl) |
268 | negTEdgePnl | float | aggregate pnl (negative edge symbols);=sum(ors.negTEdgePnl) |
271 | badTEdgePnl | float | aggregate pnl (no theo edge symbols);=sum(ors.badTEdgePnl) |
274 | VaRsu90 | float | Aggregate RiskSlide: uPrc up 90%, vol unchanged (newUPrc = uPrc * Math.Exp(+0.90)) |
277 | VaRsd90 | float | Aggregate RiskSlide: uPrc dn 90%, vol unchanged (newUPrc = uPrc * Math.Exp(-0.90)) |
280 | VaRsu50 | float | Aggregate RiskSlide: uPrc up 50%, vol unchanged (newUPrc = uPrc * Math.Exp(+0.50)) |
283 | VaRsd50 | float | Aggregate RiskSlide: uPrc dn 50%, vol unchanged (newUPrc = uPrc * Math.Exp(-0.50)) |
286 | VaRsu15 | float | Aggregate RiskSlide: uPrc up 15%, vol unchanged (newUPrc = uPrc * Math.Exp(+0.15)) |
289 | VaRsd15 | float | Aggregate RiskSlide: uPrc dn 15%, vol unchanged (newUPrc = uPrc * Math.Exp(-0.15)) |
292 | VaRsu10 | float | Aggregate RiskSlide: uPrc up 10%, vol unchanged (newUPrc = uPrc * Math.Exp(+0.10)) |
295 | VaRsd10 | float | Aggregate RiskSlide: uPrc dn 10%, vol unchanged (newUPrc = uPrc * Math.Exp(-0.10)) |
298 | VaRsu05 | float | Aggregate RiskSlide: uPrc up 5%, vol unchanged (newUPrc = uPrc * Math.Exp(+0.05)) |
301 | VaRsd05 | float | Aggregate RiskSlide: uPrc dn 5%, vol unchanged (newUPrc = uPrc * Math.Exp(-0.05)) |
304 | VaRsu1e | float | Aggregate RiskSlide: uPrc up 1x implied earn move, vol ramp out |
307 | VaRsd1e | float | Aggregate RiskSlide: uPrc dn 1x implied earn move, vol ramp out |
310 | VaRsu2e | float | Aggregate RiskSlide: uPrc up 2x implied earn move, vol ramp out |
313 | VaRsd2e | float | Aggregate RiskSlide: uPrc dn 2x implied earn move, vol ramp out |
316 | VaRearn | float | Aggregate RiskSlide: vol earn ramp out (no uPrc move) |
319 | VaRcash | float | Aggregate RiskSlide: uPrc up 30%, vol = 0.01, 6mn deal close (delta neutral) |
322 | lastActivity | DateTime | |
325 | timestamp | DateTime |
Get Schema API Call
- Python
- cUrl
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)
curl -G 'https://mlink-live.nms.saturn.spiderrockconnect.com/rest/json' \
--data-urlencode 'apiKey=XXXX-XXXX-XXXX-XXXX' \
--data-urlencode 'cmd=getschema' \
--data-urlencode 'msgType=ExpirationRiskRecordV5'
Get Msg API Call
- Python
- cUrl
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)
curl -G 'https://mlink-live.nms.saturn.spiderrockconnect.com/rest/json' \
--data-urlencode 'apiKey=XXXX-XXXX-XXXX-XXXX' \
--data-urlencode 'cmd=getmsg' \
--data-urlencode 'pkey=ReplaceThisValueForTheQueryToWork' \
--data-urlencode 'msgType=ExpirationRiskRecordV5' \
--data-urlencode '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' \
--data-urlencode 'where=accnt:eq:ExampleString'
Get Msgs API Call
- Python
- cUrl
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)
curl -G 'https://mlink-live.nms.saturn.spiderrockconnect.com/rest/json' \
--data-urlencode 'apiKey=XXXX-XXXX-XXXX-XXXX' \
--data-urlencode 'cmd=getmsgs' \
--data-urlencode 'msgType=ExpirationRiskRecordV5' \
--data-urlencode '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' \
--data-urlencode 'where=accnt:eq:ExampleString' \
--data-urlencode 'limit=500' \
--data-urlencode 'order=vegaLong:ASC'
Get Aggregate API Call
- Python
- cUrl
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)
curl -G 'https://mlink-live.nms.saturn.spiderrockconnect.com/rest/json' \
--data-urlencode 'apiKey=XXXX-XXXX-XXXX-XXXX' \
--data-urlencode 'cmd=getaggregate' \
--data-urlencode 'msgType=ExpirationRiskRecordV5' \
--data-urlencode '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' \
--data-urlencode 'group=' \
--data-urlencode 'where=accnt:eq:ExampleString'
Get Count API Call
- Python
- cUrl
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)
curl -G 'https://mlink-live.nms.saturn.spiderrockconnect.com/rest/json' \
--data-urlencode 'apiKey=XXXX-XXXX-XXXX-XXXX' \
--data-urlencode 'cmd=getcount' \
--data-urlencode 'msgType=ExpirationRiskRecordV5' \
--data-urlencode 'where=accnt:eq:ExampleString'