Update Theos
In order to “push” theoretical values to the server, the theoretical model must be set to “API Provider” for ALL products. This can only be done through the OptionsCity Metro GUI client (the setting is accessible through the Theoretical Model Wizard). If this configuration is set, the API client must submit values to populate the entire theoretical cache.
TheoUpdate
Updates should be sent by the client when it has a new theoretical value for an instrument and wishes to notify Metro of the value. A theoretical update may consist of an update for one or more instruments. The value for MessageID is a long and is client-defined. This value will be returned in the TheoUpdateAck notification.
Syntax
TheoUpdate <MessageID> <Update 1> <Update 2> ...
TheoUpdate Message Structure
Field | Value(s) | Repeating | Comment |
---|---|---|---|
Header | TheoUpdate | No | Fixed header |
MessageID | Long | No | identifier provided by Client |
Update | An Update | Yes | See Update Structure below |
Each update is defined as:
<InstrumentID> <UnderlyingPrice> <Theo> <Delta>
Update Structure
Field | Value(s) | Repeating | Comment |
---|---|---|---|
InstrumentID | Long | No | The InstrumentID |
UnderlyingPrice | Double | No | Underlying price at time of theo calculation |
Theo | Double or "INV" | No | The new theo (or INV, if there is no valid theo for the instrument) |
Delta | Double | No | The delta of the instrument |
The InstrumentID corresponds to the ID provided in client-bound SupportedInstruments notifications. UnderlyingPrice is the price used to calculate this new theoretical value. Theo is the new theoretical value for the instrument; if the string value INV (invalid) is submitted for the Theo parameter, then the server will invalidate the entry and disable quote submission for the specified instrument. Delta is a value between -1.0 and 1.0.
Example
TheoUpdate 1000 01288 57 3.45 .20 93834 59.50 3.78 .25
In order to “push” theoretical values to the server, the theoretical model must be set to “API Provider” for ALL products. This can only be done through the OptionsCity Metro GUI client (the setting is accessible through the Theoretical Model Wizard). If this configuration is set, the API client must submit values to populate the entire theoretical cache.
TheoUpdateComp
Values in the TheoUpdateComp message are identical to those in the above TheoUpdate message, but enables the client to submit a full set of “greeks” as well. The value for MessageID is a long and is client-defined. This value will be returned in the TheoUpdateAck notification.
Syntax
TheoUpdateComp <MessageID> <Update 1> <Update 2> ...
TheoUpdateComp Message Structure
This message structure is functionally identical to the TheoUpdate message structure in that the message begins with one header and one MessageID, and then an unspecified quantity of "Updates" will follow. The "complete" updates (see definition and structure below) contain all values included in the TheoUpdate messages, plus more.
Field | Value(s) | Repeating | Comment |
---|---|---|---|
Header | TheoUpdate | No | Fixed header |
MessageID | Long | No | Client-defined identifier |
Update | An Update | Yes | See Update Structure below |
Each “complete” update is defined as:
<InstrumentID> <UnderlyingPrice> <Theo> <Delta> <Gamma> <Vega> <Theta> <Epsilon> <Zeta> <Rho>
Complete Update Structure
Field | Value | Comment |
---|---|---|
InstrumentID | Long | The InstrumentID |
UnderlyingPrice | Double | Underlying price at time of theo calculation |
Theo | Double/INV | New theo (or INV, if there is no valid theo value for the instrument) |
Delta | Double | Delta of the instrument |
Gamma | Double | Rate of change of delta per unit change in underlying price |
Vega | Double | Rate of change of theo price per unit change in underlying volatility |
Theta | Double | Rate of change of theo price per unit change in time remaining until option expiration |
Epsilon | Double | Average of daily theo price change divided by di erence between yearly high and low prices |
Zeta | Double | Rate of change of delta per unit change in volatility |
Rho | Double | Rate of change of option''s theo price per unit change in interest rate |
TheoUpdateDeltaAdjust
TheoUpdateDeltaAdjust allows clients to send a specific value for a single option at an underlying price with delta, tick size and number of ticks which Metro will use to update the option across several price levels using the delta given to adjust the theoretical prices used. The purpose of the message is to reduce messaging from the client application to the server and from the server to the Metro client. The limitation is that the delta given in the original message will be used at all price levels updated.
When entering ```TheoUpdateDeltaAdjust```, clients should be aware of what underlying source TradeSheets are configured for. Using bid/ask mid point will require the defined TickSize to be in half ticks so all prices that may appear in TradeSheets will be present in the cache.
TheoUpdate Message Structure
Field | Value(s) | Repeating | Comment |
---|---|---|---|
Header | TheoUpdate | No | Fixed header |
MessageID | Long | No | identifier provided by Client |
Update | An Update | Yes | See Update Structure below |
Update Structure
Field | Value(s) | Repeating | Comment |
---|---|---|---|
InstrumentID | Long | No | The InstrumentID |
UnderlyingPrice | Double | No | Underlying price at time of theo calculation |
Theo | Double | No | The new theo |
Delta | Double | No | The delta of the instrument |
TickSize | Double | No | The price increment used to create underlying prices for updates |
NumTicks | Int | No | How many ticks up and down values will be produced |
Syntax
TheoUpdateDeltaAdjust <MessageID> <InstrumentID> <UnderlyingPrice> <Theo> <Delta> <TickSize> <NumTicks>
Example
TheoUpdateDeltaAdjust 1 16378653 150.00 10.00 0.50 .01 10
TheoUpdateAck 1
Theo Update Acknowledgement
This notification is sent to client once a TheoUpdate message has been successfully processed and the values have been placed into the cache. If there was an error processing any individual update in the message, a TheoUpdateNack notification will be sent for each such unsuccessful update.
Syntax
TheoUpdateAck <MessageID>
The MessageID in the notification is what was provided by the user in the TheoUpdate message.
Example
TheoUpdateAck 70124
Theo Update Not Acknowledged
This notification is sent to the client if there was an error processing a theo update. The notification will contain the client-supplied ID of the corresponding (erroneous) TheoUpdate message and the InstrumentID and underlying price of the update that was not successfully processed. Note that if you send a single TheoUpdate message with 10 updates and 1 of the updates was unsuccessful you would receive an Ack notification for the entire message but a Nack for the single unsuccessful update.
Syntax
TheoUpdateNack <MessageID> <InstrumentID> <UnderlyingPrice>
Example
TheoUpdateNack 70124 1212 57