Page tree
Skip to end of metadata
Go to start of metadata
The calculate optimize request performs an optimize calculation on an existing portfolio. Optimize in this context specifically refers to the CME Optimizer algorithm/tool, which identifies appropriate interest rate listed derivative products which can offset CME-clearing OTC IRS product, thereby producing portfolio margin efficiencies.

For more information regarding the Optimizer deployable software see here. For more information about CME's portfolio margin program for interest rate products see here.

Description

The request allows the client to calculate an optimized allocation of interest rate futures in an existing portfolio containing both CME-cleared OTC interest rate swaps and interest rate futures which was added to CME CORE (Add Portfolio and Update Portfolio).

The user must specify the unique CME CORE assigned portfolio identifier in the request URL. Once the user has submitted the above, the server will queue up the request for execution after which it is submitted to the Optimizer for processing a request identifier and status that are returned. If the portfolio does not exist, if the portfolio does not contain a valid combination of products (IRS or delta ladder + futures), if referenced transactions do not exist, or if there are other errors an error message/code will be returned.   

EntityOptimize
ActionCalculate
URL/optimize
HTTP MethodPOST
Parameter InputNo
XML InputYes
Multiple OutputNo
SynchronousNo




Request

XPathNameTypeRequiredNotes
/marginReq@reqUserIdRequesting User IDStringNo
/marginReq/margin@portfolioIdPortfolio IDStringYes

Response

XPathNameTypeRequiredNotes
/marginRpt@statusStatusAsync StatusYes
/marginRpt/margin@idIDStringYes
/marginRpt/margin@portfolioIdPortfolio IDStringYes
/marginRpt/margin@updateTimeUpdate TimeDate/TimeYes
/marginRpt/error@codeError MessageStringNo
/marginRpt/error@msgError MessageStringNo

Errors

CodeDescriptionMessage
400Bad XML syntax or missing content. More information will be provided in the error message.
403Returned if the user does not have permission to perform calculations on the portfolio
406Returned if the user's portfolio does not contain a valid combination of products (IRS or delta ladder + futures)msg="Cant Optimize portfolio; must contain Future and Options trade and either Delta Ladder trade or IRS trade"
500The server was not able to process the request. More information (if available) will be provided in the error message.

Examples

Basic

This example requests that a portfolio with ID 12345678 be optimized.  The unique ID of the margin request is returned along with the portfolio identifier.

Request
POST {{API_URL}}/optimize
<core:marginReq xmlns:core="http://cmegroup.com/schema/core/1.6">
	<margin portfolioId="12345678"/>
</core:marginReq>
Response
<ns2:marginRpt xmlns:ns2="http://cmegroup.com/schema/core/1.6" status="PROCESSING">
    <margin portfolioId="12345678" id="1234567"/>
</ns2:marginRpt>