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.
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.
ID of the risk factor
Example:
undefined
Ratio of the new to old values of the risk factor
Example:
undefined
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"))