Margin Service API - Optimize - Calculate

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.   

Entity

Optimize

Action

Calculate

URL

/optimize

HTTP Method

POST

Parameter Input

No

XML Input

Yes

Multiple Output

No

Synchronous

No







Request

XPath

Name

Type

Required

Notes

XPath

Name

Type

Required

Notes

/marginReq@reqUserId

Requesting User ID

String

No



/marginReq/margin@portfolioId

Portfolio ID

String

Yes



Response

XPath

Name

Type

Required

Notes

XPath

Name

Type

Required

Notes

/marginRpt@status

Status

Async Status

Yes



/marginRpt/margin@id

ID

String

Yes



/marginRpt/margin@portfolioId

Portfolio ID

String

Yes



/marginRpt/margin@updateTime

Update Time

Date/Time

Yes



/marginRpt/error@code

Error Message

String

No



/marginRpt/error@msg

Error Message

String

No



Errors

Code

Description

Message

Code

Description

Message

400

Bad XML syntax or missing content. More information will be provided in the error message.



403

Returned if the user does not have permission to perform calculations on the portfolio



406

Returned 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"

500

The 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>



How was your Client Systems Wiki Experience? Submit Feedback

Copyright © 2024 CME Group Inc. All rights reserved.