Skip to main content
Version: 8.4.08.4

Schema: AccountRiskRecordV5 (ID: 4745)

AccountRiskRecords 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)SR account acronym
11=currencyenum : Currencypoint currency of all associated positions and pnl values
12=tradeDateDateKey
13=riskSessionenum : RiskSession
14=clientFirmstring(16)SR assigned client firm acronym
106lnDDeltadoublelong net position $delta value (underlier + options) (today; SR marks)
109shDDeltadoubleshort net position $delta value (underlier + options) (today; SR marks)
112lnStkMktValuedoublelong stock market value (today; SR marks)
115shStkMktValuedoubleshort stock market value (today; SR marks)
118futMktValuedoublefuture market value (today; SR marks)
121stkOptMktValuedoublestock option market value (today; SR vol marks)
124futOptMktValuedoublefuture option market value (today; SR vol marks)
127vegaLongfloatsum of long vega symbol positions;=sum(+srs.vega) if srs.vega > 0
130vegaShortfloatsum of short vega symbol positions;= sum(-srs.vega) if srs.vega < 0
133wVegaLongfloatsum of long weighted vega symbol positions;=sum(+srs.wVega) if srs.wVega > 0
136wVegaShortfloatsum of short weighted vega symbol positions;= sum(-srs.wVega) if srs.wVega < 0
139wtVegaLongfloatsum of long time weighted weighted vega symbol positions;=sum(+srs.wtVega) if srs.wtVega > 0
142wtVegaShortfloatsum of short time weighted vega symbol positions;= sum(-srs.wtVega) if srs.wtVega < 0
145thetaLongfloatsum of long vega symbol positions;=sum(+srs.theta) if srs.theta > 0
148thetaShortfloatsum of short vega symbol positions;= sum(-srs.theta) if srs.theta < 0
151rhoLongfloatsum of long rho symbol positions;=sum(+srs.rho) if srs.rho > 0
154rhoShortfloatsum of short rho symbol positions;= sum(-srs.rho) if srs.rho < 0
157ivolLnfloat
160ivolShfloat
163wtVeDdfloatAggregate Dd Time Weighted Vega;=sum[wtVega] if opr.xde < -0.30
166wtVeDnfloatAggregate Dn Time Weighted Vega;=sum[wtVega] if -0.30 <= opr.xde < -0.10
169wtVeAtfloatAggregate At Time Weighted Vega;=sum[wtVega] if abs(opr.xde) <= 0.10
172wtVeUpfloatAggregate Up Time Weighted Vega;=sum[wtVega] if +0.10 < opr.xde <= +0.30
175wtVeDufloatAggregate Du Time Weighted Vega;=sum[wtVega] if +0.30 < opr.xde
178wtVeM1floatAggregate M1 Time Weighted Vega;=sum[wtVega] if days < 10
181wtVeM2floatAggregate M2 Time Weighted Vega;=sum[wtVega] if 10 < days < 25
184wtVeM3floatAggregate M3 Time Weighted Vega;=sum[wtVega] if 25 < days < 65
187wtVeM4floatAggregate M4 Time Weighted Vega;=sum[wtVega] if 65 < days < 130
190wtVeM5floatAggregate M5 Time Weighted Vega;=sum[wtVega] if 130 < days
193ddeltafloatnet $delta;=sum(srs.ddelta)
196numSymbolsintcount of srs records being aggregated
199absCurShintabsolute number of account shares (CLR + trades);=sum(srs.opShAbsCur)
202absCurFcintabsolute number of account future contracts (CLR + trades);=sum(srs.opFcAbsCur)
205absCurCnintabsolute number of account option contracts (CLR + trades);=sum(srs.opCnAbsCur)
208premOvParfloataggregate premium over parity for the option position;=sum(srs.premOvPar)
211optExAsPnldouble
214dividendPnldouble
217corpActCashPnLdouble
220stkOpnPnlMiddouble
223stkOpnPnlClrdouble
226futOpnPnlMiddouble
229futOpnPnlClrdouble
232stkOptOpnPnlVoldouble
235stkOptOpnPnlMiddouble
238stkOptOpnPnlClrdouble
241futOptOpnPnlVoldouble
244futOptOpnPnlMiddouble
247futOptOpnPnlClrdouble
250stkDayPnldoublestock day pnl;=sum(srs.stPnlDay)
253futDayPnldoublefutures day pnl;=sum(srs.fcPnlDay)
256stkOptDayPnldoublestock option day pnl;= sum(srs.opPnlDay)
259futOptDayPnldoublefuture option day pnl;= sum(srs.opPnlDay)
262stktDayShintstock day shares (bot + sld);
265stkDayMnydoublestock day mny (sld - bot)
268futDayCnintfuture day contracts (bot + sld);
271futDayMnydoublefuture day mny (sld - bot)
274stkOptDayCnintstock option day contracts (bot + sld);
277stkOptDayMnydoublestock option day mny (sld - bot)
280futOptDayCnintfuture option day contracts (bot + sld);
283futOptDayMnydoublefuture option day mny (sld - bot)
286dayDDeltafloatday $delta;= sum(srs.dayDelta)
289opDayVegafloatoption vega traded today
292opDayWVegafloatoption (vol weighted) vega traded today
295opDayTVegafloatoption (time weighted) vega traded today
298opDayWtVegafloatoption (vol time weighted) vega traded today
301opDayThetafloatoption theta traded today
304opEdgeOpenedfloatoption theo edge opened today
307opEdgeClosedfloatoption theo edge closed today
310pnlDnfloatoption delta neutral pnl;=sum(srs.pnlDn)
313pnlDefloatoption delta pnl;=sum(srs.pnlDe)
316pnlSlfloatoption vega/delta pnl;=sum(srs.pnlSl)
319pnlGafloatoption gamma pnl;=sum(srs.pnlGa)
322pnlThfloatoption theta pnl;=sum(srs.pnlTh)
325pnlVefloatoption vega pnl;=sum(srs.pnlVe)
328pnlVofloatoption volga pnl;=sum(srs.pnlVo)
331pnlVafloatoption vanna pnl;=sum(srs.pnlVa)
334pnlDDivfloatoption DDiv pnl;=sum(srs.pnlDDiv)
337pnlSDivfloatoption SDiv pnl;=sum(srs.pnlSDiv)
340pnlRatefloatoption Rate pnl;=sum(srs.pnlRate)
343pnlErrfloatoption unexplained (error) pnl;=sum(srs.pnlErr)
346pnlTefloatoption theo edge pnl;=sum(srs.pnlTe)
349pnlLnfloatoption pnl from symbol positions with +vega
352pnlShfloatoption pnl from symbol positions with -vega
355tEdgefloataggregate option theo edge;=sum(srs.tEdge)
358tEdgeMultfloatdenominator for computing edge per unit;=sum(srs.tEdgeMult)
361posTEdgePnlfloataggregate pnl (positive edge symbols);=sum(srs.posTEdgePnl)
364negTEdgePnlfloataggregate pnl (negative edge symbols);=sum(srs.negTEdgePnl)
367badTEdgePnlfloataggregate pnl (no theo edge symbols);=sum(srs.badTEdgePnl)
370VaRsu90floatAggregate RiskSlide: uPrc up 90%, vol unchanged (newUPrc = uPrc * exp(+0.90))
373VaRsd90floatAggregate RiskSlide: uPrc dn 90%, vol unchanged (newUPrc = uPrc * exp(-0.90))
376VaRsu50floatAggregate RiskSlide: uPrc up 50%, vol unchanged (newUPrc = uPrc * exp(+0.50))
379VaRsd50floatAggregate RiskSlide: uPrc dn 50%, vol unchanged (newUPrc = uPrc * exp(-0.50))
382VaRsu15floatAggregate RiskSlide: uPrc up 15%, vol unchanged (newUPrc = uPrc * exp(+0.15))
385VaRsd15floatAggregate RiskSlide: uPrc dn 15%, vol unchanged (newUPrc = uPrc * exp(-0.15))
388VaRsu10floatAggregate RiskSlide: uPrc up 10%, vol unchanged (newUPrc = uPrc * Math.Exp(+0.10))
391VaRsd10floatAggregate RiskSlide: uPrc dn 10%, vol unchanged (newUPrc = uPrc * Math.Exp(-0.10))
394VaRsu05floatAggregate RiskSlide: uPrc up 5%, vol unchanged (newUPrc = uPrc * exp(+0.05))
397VaRsd05floatAggregate RiskSlide: uPrc dn 5%, vol unchanged (newUPrc = uPrc * exp(-0.05))
400VaRsu1efloatAggregate RiskSlide: uPrc up 1x implied earn move, vol ramp out
403VaRsd1efloatAggregate RiskSlide: uPrc dn 1x implied earn move, vol ramp out
406VaRsu2efloatAggregate RiskSlide: uPrc up 2x implied earn move, vol ramp out
409VaRsd2efloatAggregate RiskSlide: uPrc dn 2x implied earn move, vol ramp out
412VaRearnfloatAggregate RiskSlide: vol earn ramp out (no uPrc move)
415VaRcashfloatAggregate RiskSlide: uPrc up 30%, vol = 0.01, 6mn deal close (delta neutral)
418hcCntfloatcount of haircut > $0.0 symbols
421haircut25floathaircut ($25 minimum/cn) [act basis]
424haircut37floathaircut ($37 minimum/cn) [act basis]
427optCnMinimumfloatoption contract margin minimum (37.50 for equities;SPAN minimum for options on futures)
430span01floatspan1: uPrc=unch, vol=up
433span02floatspan2: uPrc=unch, vol=down
436span03floatspan3: uPrc=+33.33%, vol=up
439span04floatspan4: uPrc=+33.33%, vol=dn
442span05floatspan5: uPrc=-33.33%, vol=up
445span06floatspan6: uPrc=-33.33%, vol=down
448span07floatspan7: uPrc=+66.67%, vol=up
451span08floatspan8: uPrc=+66.67%, vol=down
454span09floatspan9: uPrc=-66.67%, vol=up
457span10floatspan10: uPrc=-66.67%, vol=down
460span11floatspan11: uPrc=+100%, vol=up
463span12floatspan12: uPrc=+100%, vol=down
466span13floatspan13: uPrc=-100%, vol=up
469span14floatspan14: uPrc=-100%, vol=down
472span15floatspan15: uPrc=+300%; price slide * 0.33
475span16floatspan16: uPrc=-300%, price slide * 0.33
478worst3Riskfloatsum of 3 worst 50% slide loss symbols
481worstSym1TickerKeysymbol with the largest 50% slide loss
484worstSym2TickerKeysymbol with the second largest 50% slide loss
487worstSym3TickerKeysymbol with the third largest 50% slide loss
490stkLiqRiskfloatestimated cost of neutralizing/liquidating all stock positions (half market width * position size)
493futLiqRiskfloatestimated cost of neutralizing/liquidating all future positions (half market width * position size)
496optLiqRiskfloatestimated cost of neutralizing/liquidating all option positions (half market width * position size)
499srRiskMarginfloatSR assessed risk margin MAX(haircut37, worst3Risk + optCnMinimum)
502lastActivityDateTime
505timestampDateTime

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

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

# 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 = 'lnDDelta|shDDelta|lnStkMktValue|shStkMktValue|futMktValue|stkOptMktValue|futOptMktValue|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|absCurFc|absCurCn|premOvPar|optExAsPnl|dividendPnl|corpActCashPnL|stkOpnPnlMid|stkOpnPnlClr|futOpnPnlMid|futOpnPnlClr|stkOptOpnPnlVol|stkOptOpnPnlMid|stkOptOpnPnlClr|futOptOpnPnlVol|futOptOpnPnlMid|futOptOpnPnlClr|stkDayPnl|futDayPnl|stkOptDayPnl|futOptDayPnl|stktDaySh|stkDayMny|futDayCn|futDayMny|stkOptDayCn|stkOptDayMny|futOptDayCn|futOptDayMny|dayDDelta|opDayVega|opDayWVega|opDayTVega|opDayWtVega|opDayTheta|opEdgeOpened|opEdgeClosed|pnlDn|pnlDe|pnlSl|pnlGa|pnlTh|pnlVe|pnlVo|pnlVa|pnlDDiv|pnlSDiv|pnlRate|pnlErr|pnlTe|pnlLn|pnlSh|tEdge|tEdgeMult|posTEdgePnl|negTEdgePnl|badTEdgePnl|VaRsu90|VaRsd90|VaRsu50|VaRsd50|VaRsu15|VaRsd15|VaRsu10|VaRsd10|VaRsu05|VaRsd05|VaRsu1e|VaRsd1e|VaRsu2e|VaRsd2e|VaRearn|VaRcash|hcCnt|haircut25|haircut37|optCnMinimum|span01|span02|span03|span04|span05|span06|span07|span08|span09|span10|span11|span12|span13|span14|span15|span16|worst3Risk|worstSym1|worstSym2|worstSym3|stkLiqRisk|futLiqRisk|optLiqRisk|srRiskMargin|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 = 'AccountRiskRecordV5'

# Replace with your desired view. A "|" separated list of views can be provided
# If no view is provided, all views will be returned
VIEW = 'lnDDelta|shDDelta|lnStkMktValue|shStkMktValue|futMktValue|stkOptMktValue|futOptMktValue|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|absCurFc|absCurCn|premOvPar|optExAsPnl|dividendPnl|corpActCashPnL|stkOpnPnlMid|stkOpnPnlClr|futOpnPnlMid|futOpnPnlClr|stkOptOpnPnlVol|stkOptOpnPnlMid|stkOptOpnPnlClr|futOptOpnPnlVol|futOptOpnPnlMid|futOptOpnPnlClr|stkDayPnl|futDayPnl|stkOptDayPnl|futOptDayPnl|stktDaySh|stkDayMny|futDayCn|futDayMny|stkOptDayCn|stkOptDayMny|futOptDayCn|futOptDayMny|dayDDelta|opDayVega|opDayWVega|opDayTVega|opDayWtVega|opDayTheta|opEdgeOpened|opEdgeClosed|pnlDn|pnlDe|pnlSl|pnlGa|pnlTh|pnlVe|pnlVo|pnlVa|pnlDDiv|pnlSDiv|pnlRate|pnlErr|pnlTe|pnlLn|pnlSh|tEdge|tEdgeMult|posTEdgePnl|negTEdgePnl|badTEdgePnl|VaRsu90|VaRsd90|VaRsu50|VaRsd50|VaRsu15|VaRsd15|VaRsu10|VaRsd10|VaRsu05|VaRsd05|VaRsu1e|VaRsd1e|VaRsu2e|VaRsd2e|VaRearn|VaRcash|hcCnt|haircut25|haircut37|optCnMinimum|span01|span02|span03|span04|span05|span06|span07|span08|span09|span10|span11|span12|span13|span14|span15|span16|worst3Risk|worstSym1|worstSym2|worstSym3|stkLiqRisk|futLiqRisk|optLiqRisk|srRiskMargin|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 = 'lnDDelta: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 = 'AccountRiskRecordV5'

# Replace with fields you want to see aggregate values for. A "|" separated list of measures should be provided
MEASURE = 'lnDDelta|shDDelta|lnStkMktValue|shStkMktValue|futMktValue|stkOptMktValue|futOptMktValue|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|absCurFc|absCurCn|premOvPar|optExAsPnl|dividendPnl|corpActCashPnL|stkOpnPnlMid|stkOpnPnlClr|futOpnPnlMid|futOpnPnlClr|stkOptOpnPnlVol|stkOptOpnPnlMid|stkOptOpnPnlClr|futOptOpnPnlVol|futOptOpnPnlMid|futOptOpnPnlClr|stkDayPnl|futDayPnl|stkOptDayPnl|futOptDayPnl|stktDaySh|stkDayMny|futDayCn|futDayMny|stkOptDayCn|stkOptDayMny|futOptDayCn|futOptDayMny|dayDDelta|opDayVega|opDayWVega|opDayTVega|opDayWtVega|opDayTheta|opEdgeOpened|opEdgeClosed|pnlDn|pnlDe|pnlSl|pnlGa|pnlTh|pnlVe|pnlVo|pnlVa|pnlDDiv|pnlSDiv|pnlRate|pnlErr|pnlTe|pnlLn|pnlSh|tEdge|tEdgeMult|posTEdgePnl|negTEdgePnl|badTEdgePnl|VaRsu90|VaRsd90|VaRsu50|VaRsd50|VaRsu15|VaRsd15|VaRsu10|VaRsd10|VaRsu05|VaRsd05|VaRsu1e|VaRsd1e|VaRsu2e|VaRsd2e|VaRearn|VaRcash|hcCnt|haircut25|haircut37|optCnMinimum|span01|span02|span03|span04|span05|span06|span07|span08|span09|span10|span11|span12|span13|span14|span15|span16|worst3Risk|worstSym1|worstSym2|worstSym3|stkLiqRisk|futLiqRisk|optLiqRisk|srRiskMargin|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 = 'AccountRiskRecordV5'

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