IBM Cloud API Docs

Introduction

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.

Methods

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

Request

Specifies the input parameters to generate a scenario file.

  • curl --request POST --url https://fss-analytics.mybluemix.net/api/v1/scenario/generate_predictive --header 'accept: text/csv' --header 'content-type: application/json' --header 'x-ibm-access-token: REPLACE_KEY_VALUE'
  • HttpResponse<String> response = Unirest.post("https://fss-analytics.mybluemix.net/api/v1/scenario/generate_predictive")
      .header("accept", "text/csv")
      .header("content-type", "application/json")
      .header("x-ibm-access-token", "REPLACE_KEY_VALUE")
      .asString();
  • import http.client
    
    conn = http.client.HTTPSConnection("fss-analytics.mybluemix.net")
    
    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 = res.read()
    
    print(data.decode("utf-8"))
    

Response

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.