Schema: LiveSurfacePerf (ID: 1055)
LiveSurfacePerf records contain current and prior period implied ATM volatilities and greeks and as well as fixed-strike PnL values. The strike used for the fix-strike calculation is equal to the forward underlier price that prevailed on the open. Note that this strike price 'resets' each day.
LiveSurfacePerf records are published to the SpiderRock elastic cluster at the end of the day for each option expiration. These records are designed to allow fixed strike EOD to EOD attributed PnL to be easily calculated. These records can also be used to measure atm volatility dynamics.
METADATA
Attribute | Value |
---|---|
Topic | 1000-analytics |
MLink Token | SRMLinkAnalytics |
SRSE Product | SRAnalytics |
Note: The symbol
=
next to a field number indicates that it is a primary key.
BODY
# | Field | Type | Comment |
---|---|---|---|
10= | ekey | ExpiryKey | |
11= | perfSurfType | enum : PerfSurfaceType | Preferred surface type: None; Live; PriorDay |
100 | date | string(10) | |
103 | time | string(8) | |
106 | ticker | TickerKey | SpiderRock underlier stock key |
109 | exType | enum : ExerciseType | |
112 | modelType | enum : CalcModelType | |
115 | uMark | float | current underlier mark (usually mid market) |
118 | years | float | time to expiration (in years) |
121 | rate | float | interest rate |
124 | sdiv | float | stock dividend (borrow rate) |
127 | ddiv | float | present value of discrete dividend stream |
130 | eventCnt | float | number of qualifying earnings (or earnings like) events (between now and expiration) [can be fractional] |
133 | iEMove | float | implied event move (if any) |
136 | hEMove | float | average of the trailing 12 historical (quarterly) earnings moves (if any) |
139 | strike | float | atm strike = uMark * Math.Exp(years * rate) - ddiv; |
142 | cIVol | float | call surface atm vol @ strike = uMark |
145 | pIVol | float | put surface atm vol @ strike = uMark |
148 | cSOpx | float | call option price @ (cAtm, uMark, years, sdiv, rate, ddiv);strike = uMark |
151 | pSOpx | float | put option price @ (pAtm, uMark, years, sdiv, rate, ddiv);strike = uMark |
154 | cDe | float | surface call delta @ (cAtm, uMark, years, sdiv, rate, ddiv) |
157 | cGa | float | surface call gamma @ (cAtm, uMark, years, sdiv, rate, ddiv) |
160 | cTh | float | surface call theta @ (cAtm, uMark, years, sdiv, rate, ddiv) |
163 | cVe | float | surface call vega @ (cAtm, uMark, years, sdiv, rate, ddiv) |
166 | cRo | float | surface call rho @ (cAtm, uMark, years, sdiv, rate, ddiv) |
169 | pDe | float | surface put delta @ (pAtm, uMark, years, sdiv, rate, ddiv) |
172 | pGa | float | surface put gamma @ (pAtm, uMark, years, sdiv, rate, ddiv) |
175 | pTh | float | surface put theta @ (pAtm, uMark, years, sdiv, rate, ddiv) |
178 | pVe | float | surface put vega @ (pAtm, uMark, years, sdiv, rate, ddiv) |
181 | pRo | float | surface put rho @ (pAtm, uMark, years, sdiv, rate, ddiv) |
184 | xxCnt | byte | number of valid surface strikes |
187 | pwidth | float | minimum mkt premium width |
190 | vwidth | float | minimum mkt volatility width |
193 | fixCIVol | float | fixed strike call surface atm vol @ strike = prvUMark |
196 | fixPIVol | float | fixed strike put surface atm vol @ strike = prvUMark |
199 | fixCSOpx | float | fixed strike call option price @ (fixCAtm, uMark, years, sdiv, rate, ddiv);strike = prvUMark |
202 | fixPSOpx | float | fixed strike put option price @ (fixPAtm, uMark, years, sdiv, rate, ddiv);strike = prvUMark |
205 | prvUMark | float | prior period underlier mark |
208 | prvYears | float | prior period years to expiration |
211 | prvSDiv | float | prior period sdiv |
214 | prvRate | float | prior period rate |
217 | prvDDiv | float | prior period ddiv |
220 | prvStrike | float | prior period atm strike = prvUMark * Math.Exp(years * rate) - ddiv; |
223 | prvEventCnt | float | number of qualifying earnings (or earnings like) events (between now and expiration) [can be fractional] |
226 | prvIEMove | float | prior period implied event move (if any) |
229 | prvCIVol | float | prior period surface cAtm @ strike = prvMark |
232 | prvPIVol | float | prior period surface pAtm @ strike = prvMark |
235 | prvCSOpx | float | prior period call surface price @ strike = prvUMark |
238 | prvPSOpx | float | prior period put surface price @ strike = prvUMark |
241 | prvCDe | float | prior period surface call delta @ (cAtm, uMark, years, sdiv, rate, ddiv) |
244 | prvCGa | float | prior period surface call gamma @ (cAtm, uMark, years, sdiv, rate, ddiv) |
247 | prvCTh | float | prior period surface call theta @ (cAtm, uMark, years, sdiv, rate, ddiv) |
250 | prvCVe | float | prior period surface call vega @ (cAtm, uMark, years, sdiv, rate, ddiv) |
253 | prvCRo | float | prior period surface call rho @ (cAtm, uMark, years, sdiv, rate, ddiv) |
256 | prvPDe | float | prior period surface put delta @ (pAtm, uMark, years, sdiv, rate, ddiv) |
259 | prvPGa | float | prior period surface put gamma @ (pAtm, uMark, years, sdiv, rate, ddiv) |
262 | prvPTh | float | prior period surface put theta @ (pAtm, uMark, years, sdiv, rate, ddiv) |
265 | prvPVe | float | prior period surface put vega @ (pAtm, uMark, years, sdiv, rate, ddiv) |
268 | prvPRo | float | prior period surface put rho @ (pAtm, uMark, years, sdiv, rate, ddiv) |
271 | prvXXCnt | byte | prior period number of valid surface strikes |
274 | prvPWidth | float | prior period minimum mkt premium width |
277 | prvVWidth | float | prior period minimum mkt volatility width |
280 | cOptPnL | float | call option pnl (fixCOpx - prvCOpx) |
283 | pOptPnL | float | put option pnl (fixPOpx - prvPOpx) |
286 | dUPrc | float | uMark - prvUMark |
289 | cDePnL | float | prvCDe * dUPrc |
292 | cGaPnL | float | 0.5 * prvCGa * dUPrc * dUPrc |
295 | cThPnL | float | prvCTh * (years - prvYears) |
298 | cVePnL | float | prvCVe * (sVol - prvSVol) |
301 | cRoPnL | float | prvCRo * (sdiv - prvSDiv) |
304 | pDePnL | float | prvPDe * dUPrc |
307 | pGaPnL | float | 0.5 * prvPGa * dUPrc * dUPrc |
310 | pThPnL | float | prvPTh * (years - prvYears) |
313 | pVePnL | float | prvPVe * (sVol - prvSVol) |
316 | pRoPnL | float | prvPRo * (sdiv - prvSDiv) |
319 | 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 = 'LiveSurfacePerf'
# 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=LiveSurfacePerf'
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 = 'LiveSurfacePerf'
# 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 = 'date|time|ticker|exType|modelType|uMark|years|rate|sdiv|ddiv|eventCnt|iEMove|hEMove|strike|cIVol|pIVol|cSOpx|pSOpx|cDe|cGa|cTh|cVe|cRo|pDe|pGa|pTh|pVe|pRo|xxCnt|pwidth|vwidth|fixCIVol|fixPIVol|fixCSOpx|fixPSOpx|prvUMark|prvYears|prvSDiv|prvRate|prvDDiv|prvStrike|prvEventCnt|prvIEMove|prvCIVol|prvPIVol|prvCSOpx|prvPSOpx|prvCDe|prvCGa|prvCTh|prvCVe|prvCRo|prvPDe|prvPGa|prvPTh|prvPVe|prvPRo|prvXXCnt|prvPWidth|prvVWidth|cOptPnL|pOptPnL|dUPrc|cDePnL|cGaPnL|cThPnL|cVePnL|cRoPnL|pDePnL|pGaPnL|pThPnL|pVePnL|pRoPnL|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 = 'time: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=LiveSurfacePerf' \
--data-urlencode 'view=date|time|ticker|exType|modelType|uMark|years|rate|sdiv|ddiv|eventCnt|iEMove|hEMove|strike|cIVol|pIVol|cSOpx|pSOpx|cDe|cGa|cTh|cVe|cRo|pDe|pGa|pTh|pVe|pRo|xxCnt|pwidth|vwidth|fixCIVol|fixPIVol|fixCSOpx|fixPSOpx|prvUMark|prvYears|prvSDiv|prvRate|prvDDiv|prvStrike|prvEventCnt|prvIEMove|prvCIVol|prvPIVol|prvCSOpx|prvPSOpx|prvCDe|prvCGa|prvCTh|prvCVe|prvCRo|prvPDe|prvPGa|prvPTh|prvPVe|prvPRo|prvXXCnt|prvPWidth|prvVWidth|cOptPnL|pOptPnL|dUPrc|cDePnL|cGaPnL|cThPnL|cVePnL|cRoPnL|pDePnL|pGaPnL|pThPnL|pVePnL|pRoPnL|timestamp' \
--data-urlencode 'where=time: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 = 'LiveSurfacePerf'
# Replace with your desired view. A "|" separated list of views can be provided
# If no view is provided, all views will be returned
VIEW = 'date|time|ticker|exType|modelType|uMark|years|rate|sdiv|ddiv|eventCnt|iEMove|hEMove|strike|cIVol|pIVol|cSOpx|pSOpx|cDe|cGa|cTh|cVe|cRo|pDe|pGa|pTh|pVe|pRo|xxCnt|pwidth|vwidth|fixCIVol|fixPIVol|fixCSOpx|fixPSOpx|prvUMark|prvYears|prvSDiv|prvRate|prvDDiv|prvStrike|prvEventCnt|prvIEMove|prvCIVol|prvPIVol|prvCSOpx|prvPSOpx|prvCDe|prvCGa|prvCTh|prvCVe|prvCRo|prvPDe|prvPGa|prvPTh|prvPVe|prvPRo|prvXXCnt|prvPWidth|prvVWidth|cOptPnL|pOptPnL|dUPrc|cDePnL|cGaPnL|cThPnL|cVePnL|cRoPnL|pDePnL|pGaPnL|pThPnL|pVePnL|pRoPnL|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 = 'time: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 = 'date: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=LiveSurfacePerf' \
--data-urlencode 'view=date|time|ticker|exType|modelType|uMark|years|rate|sdiv|ddiv|eventCnt|iEMove|hEMove|strike|cIVol|pIVol|cSOpx|pSOpx|cDe|cGa|cTh|cVe|cRo|pDe|pGa|pTh|pVe|pRo|xxCnt|pwidth|vwidth|fixCIVol|fixPIVol|fixCSOpx|fixPSOpx|prvUMark|prvYears|prvSDiv|prvRate|prvDDiv|prvStrike|prvEventCnt|prvIEMove|prvCIVol|prvPIVol|prvCSOpx|prvPSOpx|prvCDe|prvCGa|prvCTh|prvCVe|prvCRo|prvPDe|prvPGa|prvPTh|prvPVe|prvPRo|prvXXCnt|prvPWidth|prvVWidth|cOptPnL|pOptPnL|dUPrc|cDePnL|cGaPnL|cThPnL|cVePnL|cRoPnL|pDePnL|pGaPnL|pThPnL|pVePnL|pRoPnL|timestamp' \
--data-urlencode 'where=time:eq:ExampleString' \
--data-urlencode 'limit=500' \
--data-urlencode 'order=date: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 = 'LiveSurfacePerf'
# Replace with fields you want to see aggregate values for. A "|" separated list of measures should be provided
MEASURE = 'date|time|ticker|exType|modelType|uMark|years|rate|sdiv|ddiv|eventCnt|iEMove|hEMove|strike|cIVol|pIVol|cSOpx|pSOpx|cDe|cGa|cTh|cVe|cRo|pDe|pGa|pTh|pVe|pRo|xxCnt|pwidth|vwidth|fixCIVol|fixPIVol|fixCSOpx|fixPSOpx|prvUMark|prvYears|prvSDiv|prvRate|prvDDiv|prvStrike|prvEventCnt|prvIEMove|prvCIVol|prvPIVol|prvCSOpx|prvPSOpx|prvCDe|prvCGa|prvCTh|prvCVe|prvCRo|prvPDe|prvPGa|prvPTh|prvPVe|prvPRo|prvXXCnt|prvPWidth|prvVWidth|cOptPnL|pOptPnL|dUPrc|cDePnL|cGaPnL|cThPnL|cVePnL|cRoPnL|pDePnL|pGaPnL|pThPnL|pVePnL|pRoPnL|timestamp'
# Replace with fields you want to see aggregated. A "|" separated list of fields should be provided
GROUP = 'exType|modelType'
# 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 = 'time: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=LiveSurfacePerf' \
--data-urlencode 'measure=date|time|ticker|exType|modelType|uMark|years|rate|sdiv|ddiv|eventCnt|iEMove|hEMove|strike|cIVol|pIVol|cSOpx|pSOpx|cDe|cGa|cTh|cVe|cRo|pDe|pGa|pTh|pVe|pRo|xxCnt|pwidth|vwidth|fixCIVol|fixPIVol|fixCSOpx|fixPSOpx|prvUMark|prvYears|prvSDiv|prvRate|prvDDiv|prvStrike|prvEventCnt|prvIEMove|prvCIVol|prvPIVol|prvCSOpx|prvPSOpx|prvCDe|prvCGa|prvCTh|prvCVe|prvCRo|prvPDe|prvPGa|prvPTh|prvPVe|prvPRo|prvXXCnt|prvPWidth|prvVWidth|cOptPnL|pOptPnL|dUPrc|cDePnL|cGaPnL|cThPnL|cVePnL|cRoPnL|pDePnL|pGaPnL|pThPnL|pVePnL|pRoPnL|timestamp' \
--data-urlencode 'group=exType|modelType' \
--data-urlencode 'where=time: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 = 'LiveSurfacePerf'
# 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 = 'time: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=LiveSurfacePerf' \
--data-urlencode 'where=time:eq:ExampleString'