The Predictive Market Scenarios service generates a predictive financial market scenario based on a change to a specified risk factor. This analysis is most commonly used to generate an alternate state of market conditions that can be used as input parameters to financial pricing models. For example, you can use this service to determine how interest rates, FX rates, and equity prices may react to a 5% decline in the price of oil. This scenario can then be applied to an investment portfolio using the financial models contained within the Simulated Instrument Analytics service.

Error handling

This API uses standard HTTP response codes to indicate whether a method completed successfully. A 200 response always indicates success. A 400 type response is some sort of failure, and a 500 type response usually indicates an internal system error.


Generate a scenario

This operation generates a scenario file in CSV format based on a given risk factor and the change to that factor. Use this operation to create a scenario to be applied to an investment portfolio using the Simulated Instrument Analytics service.

POST /api/v1/scenario/generate_predictive

Specifies the input parameters to generate a scenario file.

  • curl --request POST --url --header 'accept: text/csv' --header 'content-type: application/json' --header 'x-ibm-access-token: REPLACE_KEY_VALUE'
  • HttpResponse<String> response ="")
      .header("accept", "text/csv")
      .header("content-type", "application/json")
      .header("x-ibm-access-token", "REPLACE_KEY_VALUE")
  • import http.client
    conn = http.client.HTTPSConnection("")
    headers = {
        'accept': "text/csv",
        'content-type': "application/json",
        'x-ibm-access-token': "REPLACE_KEY_VALUE"
    conn.request("POST", "/api/v1/scenario/generate_predictive", headers=headers)
    res = conn.getresponse()
    data =

Status Code

  • Successful operation. Returns the generated scenario CSV file.

  • Invalid request format.

  • Request not authenticated.

  • Requested method not allowed.

  • An internal error has occured.

No Sample Response

This method does not specify any sample responses.