Stress Testing API Explorer by RiXtrema API Explorer
Introduction to RiXtrema Stress Testing WS API
RiXtrema Stress Testing WS API has two versions : SOAP-based API and REST API

URL for SOAP-based version - https://rixtrema.net/RixtremaWSTest/StressTestingAPI.asmx?WSDL

Base URL for REST API version - https://rixtrema.net/RixtremaWSTest/StressTestingRestAPI.aspx

 A REST API call will have the following general form:https://rixtrema.net/RixtremaWSTest/StressTestingRestAPI.aspx?Action=ACTION[&format=FORMAT]

ACTION is a function name.
FORMAT could be either "json" or "xml". Default is "json".

REST API will receive parameters and return result in defined format.
Function parameters should be passed with POST HTTP method as a request content
Authentication
All RiXtrema Stress Testing API methods require authentication. There are three ways to pass member credentials:

  • SOAP Header via WS-Security
  • HTTP Header via a custom field "RiXtremaCredentials"
  • GET parameters Username, Password, IntegratorKey

In order to authenticate calls to APIs, it is necessary to pass the token:

  •  SOAP Header  public StressTestingAPI.StressTestingAPI wsStressTestingServer;
      public StressTestingAPI.APILoginHeader StressTestingHeader;
    
      wsStressTestingServer = new StressTestingAPI.StressTestingAPI();
      StressTestingHeader = new StressTestingAPI.APILoginHeader();
    
      StressTestingHeader.IntegratorKey = "{integrator_key}";
      StressTestingHeader.Username = "{name}";
      StressTestingHeader.Password = "{password}";
    
      wsStressTestingServer.APILoginHeaderValue = StressTestingHeader;
  •  HTTP Header (XML)  request.Headers.Add("RiXtremaCredentials", "<RiXtremaCredentials><Username>{name}</Username><Password>{password}</Password><IntegratorKey>{integrator_key}</IntegratorKey></RiXtremaCredentials>");

  • or in JSON format

  •  HTTP Header (JSON)  request.Headers.Add("RiXtremaCredentials", "{'Username':'{name}','Password':'{password}','IntegratorKey':'{integrator_key}'}");
  •  GET parameters https://rixtrema.net/RixtremaWSTest/StressTestingRestAPI.aspx?Action=GetStressTest&Username={name}&Password={password}&IntegratorKey={integrator_key}    

An Integrator Key is a Unique Identifier for each RiXtrema integration. It is used (and required) for all API calls (SOAP or REST) to any RiXtrema service. Having an Integrator Key lets RiXtrema "tag" each API call from all integrations, and helps provide both an additional layer of security and helps RiXtrema support our partners.
GetScenariosList
Method returns array of predefined scenarios
Description: RiXtrema risk experts have created dozens of stress scenarios for your use. They range from scenarios that have happened in the past like "Stock & Credit Collapse (2008-like)" or forward looking scenarios such as "Euro Meltdown". We also include scenarios that mimic Federal Reserve stress tests that are required for banks, but you can show them to the users of your app.

  •  SOAPScenario_Item[] GetScenariosList();

  •  RESTURL  BaseURL?Action=GetScenariosList

     Result types  public class Scenario_Item
      {
        public int ID;
        public string Name = "";
        public string Type = "";
        public string Type2 = "";
        public string Type3 = "";
        public string Description = "";
        public string Region = "";
        public string Keywords = "";
        public string Degree = "";
        public string Shocks = "";
      }

    int ID - Identifier of scenario.
    string Name - Scenario name
    All other fields describe scenario in details

Predefined scenarios are created by the RiXtrema research and advisory team and represent value added to our clients. The list is updated monthly based on the current situation, so that advisors can see what risk managers in large asset management firms are thinking about.

Key scenarios have Description field starting with "Key scenario"

Example Response Body
 XML  <StressTestingRestAPI Result="Success">
    <Scenarios>
      <Scenario_Item ID="1" Name="US Default" Type="Political" Type2="" Type3="" Description="" Region="US" Keywords="Budget; Obamacare; Government Shutdown" Degree="Severe" Shocks="Protracted US Gov't Shutdown leads to US technical default (US Equities down 20%; Insurance stocks down 35%; US 30 year rate down 50 bps)" />
      <Scenario_Item ID="2" Name="Rates Rise - Investment Boom" Type="Macro" Type2="" Type3="" Description="This scenario is modeled to represent a typical annual return in an environment with strong demand for funds at the long end of the yield curve. We do not know or forecast for how many years that investment boom will last if it does occur. Returns are in nominal terms. For more detail, see Scenario Definitions at the bottom of the screen." Region="US" Keywords="Interest Rate; Yield; Curve" Degree="Severe" Shocks="Interest rate rise that is driven by GDP growth and investment boom, as opposed to inflation" />
      ...
      ...
    </Scenarios>
  </StressTestingRestAPI>
 JSON{
  "StressTestingRestAPI": {
    "Result": "Success",
    "Scenario_Item": [
      {
        "ID": "1",
        "Name": "US Default",
        "Type": "Political",
        "Type2": "",
        "Type3": "",
        "Description": "",
        "Region": "US",
        "Keywords": "Budget; Obamacare; Government Shutdown",
        "Degree": "Severe",
        "Shocks": "Protracted US Gov't Shutdown leads to US technical default (US Equities down 20%; Insurance stocks down 35%; US 30 year rate down 50 bps)"
      },
      {
        "ID": "2",
        "Name": "Rates Rise - Investment Boom",
        "Type": "Macro",
        "Type2": "",
        "Type3": "",
        "Description": "This scenario is modeled to represent a typical annual return in an environment with strong demand for funds at the long end of the yield curve. We do not know or forecast for how many years that investment boom will last if it does occur. Returns are in nominal terms. For more detail, see Scenario Definitions at the bottom of the screen.",
        "Region": "US",
        "Keywords": "Interest Rate; Yield; Curve",
        "Degree": "Severe",
        "Shocks": "Interest rate rise that is driven by GDP growth and investment boom, as opposed to inflation"
      },
  ...
  ...
      {
        "ID": "104",
        "Name": "Fed 2015 Scenario - Severe",
        "Type": "Financial",
        "Type2": "Global",
        "Type3": "",
        "Description": "Key Scenario This is event is modeled now through end of 2015 based on Federal Reserve projections",
        "Region": "Global",
        "Keywords": "",
        "Degree": "Extreme",
        "Shocks": "Fed released 2015 scenarios. In the severely adverse scenario the equity market is down 58% through the end of 2015 and VIX goes to 48. Corporate BBB spreads are at 6.2% (increase of < 2%), while treasury rates are going down to 1.5% & .4% for the 10 year and 5 year rate respectively. Deflation mixed with a stock drop is the worst possible environment for all asset classes."
      }
    ]
  }
}
GetStressTest
Method returns results for each portfolio in each scenario
Description: Use this function to see likely performance of a portfolio in any scenario. RiXtrema engine calculates the expected losses or gains for any portfolio under any scenario. Pass one of the scenarios names from the GetScenariosList and find the loss your portfolio is likely to experience in that scenario with "LOSSES" argument. The function also return Long Term Return forecast for a portfolio with argument "LTR", returns average yield with argument "YIELD". The function also returns a Crash Rating, a measure of riskiness that is calculated from 1 to 100, with 100 being the most risky and crash rating of Dow Jones Industrials between 65-72.

  •  SOAPpublic StressTestPortfolioResult[] GetStressTest(eStressTestType type, int[] scenarioIDs, bool onlyKeyScenarios, StressTestPortfolio[] portfolios);

  •  RESTURL  BaseURL?Action=GetStressTest

    eStressTestType type - type of calculations

    • LOSSES - Loss of portfolio in a given scenario
    • LTR - Long Term Annualized Return
    • YIELD - dividend yield
    • CRASHRATING - Crash rating is a number 1 to 100 that indicates a riskiness of the portfolio.

    • Calculation:
      • Sum three largest losses that a portfolio incurs among all stress scenarios.
      • Compare it to the table which maps the sum of three losses to the crash rating. Mapping is done through assigning losses to bins. The bins are calculated as follows. We calculate the crash test for MSCI Emerging Markets Index for all scenarios. We sum up its three biggest losses and assume this to be the crash rating of 90. Everything above 90 is extremely risky investments such as individual emerging market stocks or leveraged funds. For ratings between 1 and 90, we simply take the sum of three biggest losses for MSCI Emerging Markets and divide it by 90. Thus, the difference between any two sequential ratings is the sum of three biggest losses for MSCI Emerging Markets divided by 90.


    int[] scenarioIDs - (Only for LOSSES type) - Array of IDs of predefined RiXtrema scenarios. List of scenarios can be obtained with GetScenariosList method

    bool onlyKeyScenarios - for LOSSES type user can request results only for key scenarios

    StressTestPortfolio[] portfolios - Set of user portfolios with name and set of Positions with ID. It could be ISIN, CUSIP, SEDOL or other industry recognizable ID. And for each position Weight (in dollars or %) or Shares amount should be defined.

 Parameter types public class StressTestPortfolio
  {
    public string Portfolio;
    public PortfolioItem[] Positions;
  }

  public class PortfolioItem
  {
    public string ID;
    public double weight;
    public double shares;
  }

 Result types  public class StressTestPortfolioResult
  {
    public string Portfolio;
    public ScenarioResult[] ScenarioResults;
    public PortfolioItemResult[] Positions;
  }
  public class ScenarioResult
  {
    public int ID;
    public string Name;
    public double Value;
  }
  public class PortfolioItemResult
  {
    public string ID;
    public string RiXtremaID;
  public double weight;
    public double shares;
    public ScenarioResult[] ScenarioResults;
  }
Samples
 C# sample code  eStressTestType type = eStressTestType.LTR;
  bool onlyKeyScenarios = false;
  StressTestPortfolio[] portfolios = new StressTestPortfolio[2];

  portfolios[0] = new StressTestPortfolio();
  portfolios[0].Portfolio = "Portf1";
  portfolios[0].Positions = new RixtremaWS.StressTestingAPI.PortfolioItem[3];
  portfolios[0].Positions[0] = new RixtremaWS.StressTestingAPI.PortfolioItem(){ID= "MSFT", weight = 12, shares = 0 };
  portfolios[0].Positions[1] = new RixtremaWS.StressTestingAPI.PortfolioItem(){ID= "GOOG", weight = 22, shares = 0 };
  portfolios[0].Positions[2] = new RixtremaWS.StressTestingAPI.PortfolioItem(){ID= "IBM", weight = 32, shares = 0 };

  portfolios[1] = new StressTestPortfolio();
  portfolios[1].Portfolio = "Portf2";
  portfolios[1].Positions = new RixtremaWS.StressTestingAPI.PortfolioItem[3];
  portfolios[1].Positions[0] = new RixtremaWS.StressTestingAPI.PortfolioItem(){ID= "MSFT", weight = 0, shares = 4 };
  portfolios[1].Positions[1] = new RixtremaWS.StressTestingAPI.PortfolioItem(){ID= "GOOG", weight = 0, shares = 5 };
  portfolios[1].Positions[2] = new RixtremaWS.StressTestingAPI.PortfolioItem(){ID="USD Cash",weight=0,shares = 32};

  StressTestPortfolioResult[] _result=wsStressTestingServer.GetStressTest(type,null,onlyKeyScenarios,portfolios);
 JavaScript sample codevar request = {
            "Request": {
                "stressTestType": "LTR",
                "stressTestPortfolio": [{
                    "portfolio": "Portf1",
                    "portfolioItem": [{
                        "id": "MSFT",
                        "weight": "12",
                        "shares": "0"
                    }, {
                        "id": "GOOG",
                        "weight": "22",
                        "shares": "0"
                    }, {
                        "id": "IBM",
                        "weight": "32",
                        "shares": "0"
                    }]
                }, {
                    "portfolio": "Portf2",
                    "portfolioItem": [{
                        "id": "MSFT",
                        "weight": "0",
                        "shares": "4"
                    }, {
                        "id": "GOOG",
                        "weight": "0",
                        "shares": "5"
                    }, {
                        "id": "USD Cash",
                        "weight": "0",
                        "shares": "32"
                    }]
                }]
            }
        };

        $.ajax({
         type: 'POST',
         url: 'https://rixtrema.net/RixtremaWSTest/StressTestingRestAPI.aspx?Action=GetStressTest&Username={name}&Password={password}&IntegratorKey={integrator_key}',
         data: JSON.stringify(request),
         success: function(data) {}
        });
      
 PHP sample code<?php
// Input your Credentials info here:
$email = "{name}";                          // your account email
$password = "{password}";                   // your account password
$integratorKey = "{integrator_key}";        // your account integrator key

// construct the authentication header:
$header = "<RiXtremaCredentials><Username>" . $email . "</Username><Password>" . $password . "</Password><IntegratorKey>" . $integratorKey . "</IntegratorKey></RiXtremaCredentials>";

$url = "https://rixtrema.net/RixtremaWSTest/StressTestingRestAPI.aspx?Action=GetStressTest&format=json";
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_HTTPHEADER, array("RiXtremaCredentials: $header"));

$data = array("Request" => array(
  "stressTestType" => "LOSSES",
    "onlyKeyScenarios" => "true",
      "stressTestPortfolio" => array(
        array("portfolio" => "Portf1",
          "portfolioItem" => array(
             array(
                "id" => "MSFT",
                "weight" => 12,
                "shares" => 0
             ),
             array(
                "id" => "GOOG",
                "weight" => 22,
                "shares" => 0
             ),
             array(
                "id" => "IBM",
                "weight" => 32,
                "shares" => 0
             )
          )
        ),
        array("portfolio" => "Portf2",
          "portfolioItem" => array(
             array(
                "id" => "MSFT",
                "weight" => 0,
                "shares" => 4
             ),
             array(
                "id" => "GOOG",
                "weight" => 0,
                "shares" => 5
             ),
             array(
                "id" => "USD Cash",
                "weight" => 0,
                "shares" => 32
             )
          )
       )
      )
  )
);

$data_string = json_encode($data);

curl_setopt($curl, CURLOPT_POSTFIELDS, $data_string);

$json_response = curl_exec($curl);

$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);

if ( $status != 200 ) {
    echo "error calling webservice, status is:" . $status;
    exit(-1);
}

$response = json_decode($json_response, true);

curl_close($curl);
?>
Example Request Body
 XML<Request>
  <stressTestType>LTR</stressTestType>
    <stressTestPortfolio portfolio='Portf1'>
        <portfolioItem id='MSFT' weight='12' shares='0' />
        <portfolioItem id='GOOG' weight='22' shares='0' />
        <portfolioItem id='IBM' weight='32' shares='0' />
    </stressTestPortfolio>
    <stressTestPortfolio Portfolio='Portf2'>
        <portfolioItem id='MSFT' weight='0' shares='4' />
        <portfolioItem id='GOOG' weight='0' shares='5' />
        <portfolioItem id='USD Cash' weight='0' shares='32' />
    </stressTestPortfolio>
</Request>
 JSON{
  "Request": {
    "stressTestType": "LTR",
    "stressTestPortfolio": [
      {
        "portfolio": "Portf1",
        "portfolioItem": [
          {
            "id": "MSFT",
            "weight": "12",
            "shares": "0"
          },
          {
            "id": "GOOG",
            "weight": "22",
            "shares": "0"
          },
          {
            "id": "IBM",
            "weight": "32",
            "shares": "0"
          }
        ]
      },
      {
        "portfolio": "Portf2",
        "portfolioItem": [
          {
            "id": "MSFT",
            "weight": "0",
            "shares": "4"
          },
          {
            "id": "GOOG",
            "weight": "0",
            "shares": "5"
          },
          {
            "id": "USD Cash",
            "weight": "0",
            "shares": "32"
          }
        ]
      }
    ]
  }
}
Example Response Body
 XML<StressTestingRestAPI Result="Success">
  <StressTestPortfolioResult Portfolio="Portf1">
    <ScenarioResults>
      <ScenarioResult ID="0" Name="Long Term Annualized Return" Value="5.185" />
    </ScenarioResults>
  </StressTestPortfolioResult>
  <StressTestPortfolioResult Portfolio="Portf2">
    <ScenarioResults>
      <ScenarioResult ID="0" Name="Long Term Annualized Return" Value="198.496" />
    </ScenarioResults>
  </StressTestPortfolioResult>
</StressTestingRestAPI>
 JSON{
  "StressTestingRestAPI": {
    "Result": "Success",
    "StressTestPortfolioResult": [
      {
        "Portfolio": "Portf1",
        "ScenarioResults": {
          "ScenarioResult": {
            "ID": "0",
            "Name": "Long Term Annualized Return",
            "Value": "5.185"
          }
        }
      },
      {
        "Portfolio": "Portf2",
        "ScenarioResults": {
          "ScenarioResult": {
            "ID": "0",
            "Name": "Long Term Annualized Return",
            "Value": "198.496"
          }
        }
      }
    ]
  }
}
GetAssetStressTest
Method returns shock effects for each asset in each scenario.
Description: This is similar to the GetStressTest function, but instead of returning forecasted gains and losses in a scenario for a given portfolio, this function returns gains or losses for a given asset. Use it, for example, when you want to find out how Google would do if a "Euro Meltdown" scenario occurred.

  •  SOAPpublic StressTestAssetResult[] GetAssetStressTest(eStressTestType type, int[] scenarioIDs, bool onlyKeyScenarios, string[] assets);

  •  RESTURL  BaseURL?Action=GetAssetStressTest

    eStressTestType type - type of calculations

    • LOSSES - Loss of portfolio in a given scenario
    • LTR - Long Term Annualized Return
    • YIELD - dividend yield
    • CRASHRATING - Crash rating is not allowed for this method


    int[] scenarioIDs - (Only for LOSSES type) - Array of IDs of predefined RiXtrema scenarios. List of scenarios can be obtained with GetScenariosList method

    bool onlyKeyScenarios - for LOSSES type user can request results only for key scenarios

    string[] assets - list of Assets ID. It could be ISIN, CUSIP, SEDOL or other industry recognizable ID.

 Result types  public class StressTestAssetResult
  {
    public string ID;
    public string RiXtremaID;
    public ScenarioResult[] ScenarioResults;
  }
Samples
 C# sample code  eStressTestType type = eStressTestType.LTR;
  bool onlyKeyScenarios = false;
  StressTestPortfolio[] portfolios = new StressTestPortfolio[2];
  string[] assets = new string[3] { "goog", "ibm", "fdt us" };

  StressTestAssetResult[] assetsResult=wsStressTestingServer.GetAssetStressTest(eStressTestType.LOSSES, null, true, assets);
Example Request Body
 XML<Request>
  <onlyKeyScenarios>true</onlyKeyScenarios>
  <stressTestType>LOSSES</stressTestType>
  <asset>goog</asset>
  <asset>ibm</asset>
  <asset>fdt us</asset>
</Request>
 JSON{
  "Request": {
    "onlyKeyScenarios": "true",
    "stressTestType": "LOSSES",
    "asset": [
      "goog",
      "ibm",
      "fdt us"
    ]
  }
}
Example Response Body
 XML<StressTestingRestAPI Result="Success">
  <StressTestAssetResult ID="goog" RiXtremaID="GOOG US EQUITY">
    <ScenarioResults>
      <ScenarioResult ID="7" Name="Emerging Markets Hard Landing" Value="-23.813" />
      <ScenarioResult ID="10" Name="Rates Rise: Inflation" Value="53.849" />
      <ScenarioResult ID="79" Name="Euro Meltdown" Value="-22.802" />
      <ScenarioResult ID="80" Name="Rates Rise - Fed Unwinds" Value="-16.86" />
      <ScenarioResult ID="82" Name="Stocks Up 30%" Value="35.281" />
      <ScenarioResult ID="97" Name="Iraq & Ukraine Wars Energy Shock" Value="-33.256" />
      <ScenarioResult ID="100" Name="Stock & Credit Collapse (2008-like)" Value="-50.785" />
      <ScenarioResult ID="102" Name="Fed 2015 - Baseline" Value="7.302" />
      <ScenarioResult ID="103" Name="Fed 2015 Scenario - Adverse" Value="-25.125" />
      <ScenarioResult ID="104" Name="Fed 2015 Scenario - Severe" Value="-62" />
    </ScenarioResults>
  </StressTestAssetResult>
  <StressTestAssetResult ID="ibm" RiXtremaID="IBM US EQUITY">
    <ScenarioResults>
      <ScenarioResult ID="7" Name="Emerging Markets Hard Landing" Value="-19.98" />
      <ScenarioResult ID="10" Name="Rates Rise: Inflation" Value="40.125" />
      <ScenarioResult ID="79" Name="Euro Meltdown" Value="-20.624" />
      <ScenarioResult ID="80" Name="Rates Rise - Fed Unwinds" Value="-11.558" />
      <ScenarioResult ID="82" Name="Stocks Up 30%" Value="29.472" />
      <ScenarioResult ID="97" Name="Iraq & Ukraine Wars Energy Shock" Value="-28.914" />
      <ScenarioResult ID="100" Name="Stock & Credit Collapse (2008-like)" Value="-41.246" />
      <ScenarioResult ID="102" Name="Fed 2015 - Baseline" Value="6.211" />
      <ScenarioResult ID="103" Name="Fed 2015 Scenario - Adverse" Value="-16.923" />
      <ScenarioResult ID="104" Name="Fed 2015 Scenario - Severe" Value="-52.982" />
    </ScenarioResults>
  </StressTestAssetResult>
  <StressTestAssetResult ID="fdt us" RiXtremaID="FDT US EQUITY">
    <ScenarioResults>
      <ScenarioResult ID="7" Name="Emerging Markets Hard Landing" Value="-21.658" />
      <ScenarioResult ID="10" Name="Rates Rise: Inflation" Value="51.994" />
      <ScenarioResult ID="79" Name="Euro Meltdown" Value="-30.7" />
      <ScenarioResult ID="80" Name="Rates Rise - Fed Unwinds" Value="-17.736" />
      <ScenarioResult ID="82" Name="Stocks Up 30%" Value="33.9" />
      <ScenarioResult ID="97" Name="Iraq & Ukraine Wars Energy Shock" Value="-29.351" />
      <ScenarioResult ID="100" Name="Stock & Credit Collapse (2008-like)" Value="-52.045" />
      <ScenarioResult ID="102" Name="Fed 2015 - Baseline" Value="5.978" />
      <ScenarioResult ID="103" Name="Fed 2015 Scenario - Adverse" Value="-21.488" />
      <ScenarioResult ID="104" Name="Fed 2015 Scenario - Severe" Value="-67.13" />
    </ScenarioResults>
  </StressTestAssetResult>
</StressTestingRestAPI>
 JSON{
  "StressTestingRestAPI": {
    "Result": "Success",
    "StressTestAssetResult": [
      {
        "ID": "goog",
        "RiXtremaID": "GOOG US EQUITY",
        "ScenarioResults": {
          "ScenarioResult": [
            {
              "ID": "7",
              "Name": "Emerging Markets Hard Landing",
              "Value": "-23.813"
            },
            {
              "ID": "10",
              "Name": "Rates Rise: Inflation",
              "Value": "53.849"
            },
            {
              "ID": "79",
              "Name": "Euro Meltdown",
              "Value": "-22.802"
            },
            {
              "ID": "80",
              "Name": "Rates Rise - Fed Unwinds",
              "Value": "-16.86"
            },
            {
              "ID": "82",
              "Name": "Stocks Up 30%",
              "Value": "35.281"
            },
            {
              "ID": "97",
              "Name": "Iraq & Ukraine Wars Energy Shock",
              "Value": "-33.256"
            },
            {
              "ID": "100",
              "Name": "Stock & Credit Collapse (2008-like)",
              "Value": "-50.785"
            },
            {
              "ID": "102",
              "Name": "Fed 2015 - Baseline",
              "Value": "7.302"
            },
            {
              "ID": "103",
              "Name": "Fed 2015 Scenario - Adverse",
              "Value": "-25.125"
            },
            {
              "ID": "104",
              "Name": "Fed 2015 Scenario - Severe",
              "Value": "-62"
            }
          ]
        }
      },
      {
        "ID": "ibm",
        "RiXtremaID": "IBM US EQUITY",
        "ScenarioResults": {
          "ScenarioResult": [
            {
              "ID": "7",
              "Name": "Emerging Markets Hard Landing",
              "Value": "-19.98"
            },
            {
              "ID": "10",
              "Name": "Rates Rise: Inflation",
              "Value": "40.125"
            },
            {
              "ID": "79",
              "Name": "Euro Meltdown",
              "Value": "-20.624"
            },
            {
              "ID": "80",
              "Name": "Rates Rise - Fed Unwinds",
              "Value": "-11.558"
            },
            {
              "ID": "82",
              "Name": "Stocks Up 30%",
              "Value": "29.472"
            },
            {
              "ID": "97",
              "Name": "Iraq & Ukraine Wars Energy Shock",
              "Value": "-28.914"
            },
            {
              "ID": "100",
              "Name": "Stock & Credit Collapse (2008-like)",
              "Value": "-41.246"
            },
            {
              "ID": "102",
              "Name": "Fed 2015 - Baseline",
              "Value": "6.211"
            },
            {
              "ID": "103",
              "Name": "Fed 2015 Scenario - Adverse",
              "Value": "-16.923"
            },
            {
              "ID": "104",
              "Name": "Fed 2015 Scenario - Severe",
              "Value": "-52.982"
            }
          ]
        }
      },
      {
        "ID": "fdt us",
        "RiXtremaID": "FDT US EQUITY",
        "ScenarioResults": {
          "ScenarioResult": [
            {
              "ID": "7",
              "Name": "Emerging Markets Hard Landing",
              "Value": "-21.658"
            },
            {
              "ID": "10",
              "Name": "Rates Rise: Inflation",
              "Value": "51.994"
            },
            {
              "ID": "79",
              "Name": "Euro Meltdown",
              "Value": "-30.7"
            },
            {
              "ID": "80",
              "Name": "Rates Rise - Fed Unwinds",
              "Value": "-17.736"
            },
            {
              "ID": "82",
              "Name": "Stocks Up 30%",
              "Value": "33.9"
            },
            {
              "ID": "97",
              "Name": "Iraq & Ukraine Wars Energy Shock",
              "Value": "-29.351"
            },
            {
              "ID": "100",
              "Name": "Stock & Credit Collapse (2008-like)",
              "Value": "-52.045"
            },
            {
              "ID": "102",
              "Name": "Fed 2015 - Baseline",
              "Value": "5.978"
            },
            {
              "ID": "103",
              "Name": "Fed 2015 Scenario - Adverse",
              "Value": "-21.488"
            },
            {
              "ID": "104",
              "Name": "Fed 2015 Scenario - Severe",
              "Value": "-67.13"
            }
          ]
        }
      }
    ]
  }
}
GetAssetBeta
Method returns Beta for each asset in list.
Description: Beta is a typical measure of how any given asset moves in relation to the overall market. This function returns forecasted future beta of an asset. You can find out beta of a stock or fund vs. the world equity market. Beta of 1.5 means that for a sample 10% move in the equity market, this asset will move 15%.

  •  SOAPpublic AssetItemResult[] GetAssetBeta(string[] assets);

  •  RESTURL  BaseURL?Action=GetAssetBeta

    string[] assets - list of Assets ID. It could be ISIN, CUSIP, SEDOL or other industry recognizable ID.

 Result types  public class AssetItemResult
  {
    public string ID;
    public string RiXtremaID;
    public double Value;
  }
Samples
 C# sample code  string[] assets = new string[3] { "goog", "ibm", "fdt us" };

  AssetItemResult[] assetsResult = wsStressTestingServer.GetAssetBeta(assets);
Example Request Body
 XML<Request>
  <asset>goog</asset>
  <asset>ibm</asset>
  <asset>fdt us</asset>
</Request>
 JSON{
  "Request": {
    "asset": [
      "goog",
      "ibm",
      "fdt us"
    ]
  }
}
Example Response Body
 XML<StressTestingRestAPI Result="Success">
  <AssetItemResult ID="goog" RiXtremaID="GOOG US EQUITY" Value="0.989" />
  <AssetItemResult ID="ibm" RiXtremaID="IBM US EQUITY" Value="0.901" />
  <AssetItemResult ID="fdt us" RiXtremaID="FDT US EQUITY" Value="1.29" />
</StressTestingRestAPI>
 JSON{
  "StressTestingRestAPI": {
    "Result": "Success",
    "AssetItemResult": [
      {
        "ID": "goog",
        "RiXtremaID": "GOOG US EQUITY",
        "Value": "0.989"
      },
      {
        "ID": "ibm",
        "RiXtremaID": "IBM US EQUITY",
        "Value": "0.901"
      },
      {
        "ID": "fdt us",
        "RiXtremaID": "FDT US EQUITY",
        "Value": "1.29"
      }
    ]
  }
}
GetPortfolioBeta
Method returns Beta for each portfolio in list.
Description: This function is analogous to GetAssetBeta, but returns a forecasted beta of a portfolio. If beta of a portfolio is forecasted to be 2, then for every 10% loss in the world equity market - it is likely to lose 20%.

  •  SOAPpublic PortfolioResult[] GetPortfolioBeta(StressTestPortfolio[] portfolios);

  •  RESTURL  BaseURL?Action=GetPortfolioBeta

    StressTestPortfolio[] portfolios - Set of user portfolios with name and set of Positions with ID. It could be ISIN, CUSIP, SEDOL or other industry recognizable ID. And for each position Weight (in dollars or %) or Shares amount should be defined.

 Parameter types  public class StressTestPortfolio
  {
    public string Portfolio;
    public PortfolioItem[] Positions;
  }

  public class PortfolioItem
  {
    public string ID;
    public double weight;
    public double shares;
  }

 Result types  public class PortfolioResult
  {
     public string Portfolio;
     public double Value;
  }
Samples
 C# sample code  StressTestPortfolio[] portfolios = new StressTestPortfolio[2];

  portfolios[0] = new StressTestPortfolio();
  portfolios[0].Portfolio = "Portf1";
  portfolios[0].Positions = new RixtremaWS.StressTestingAPI.PortfolioItem[3];
  portfolios[0].Positions[0] = new RixtremaWS.StressTestingAPI.PortfolioItem(){ID="MSFT",weight=12,shares=0};
  portfolios[0].Positions[1] = new RixtremaWS.StressTestingAPI.PortfolioItem(){ID="GOOG",weight=22,shares=0};
  portfolios[0].Positions[2] = new RixtremaWS.StressTestingAPI.PortfolioItem(){ID="IBM",weight=32,shares=0};

  portfolios[1] = new StressTestPortfolio();
  portfolios[1].Portfolio = "Portf2";
  portfolios[1].Positions = new RixtremaWS.StressTestingAPI.PortfolioItem[3];
  portfolios[1].Positions[0] = new RixtremaWS.StressTestingAPI.PortfolioItem(){ID="MSFT",weight=0,shares=4};
  portfolios[1].Positions[1] = new RixtremaWS.StressTestingAPI.PortfolioItem(){ID="GOOG",weight=0,shares=5};
  portfolios[1].Positions[2] = new RixtremaWS.StressTestingAPI.PortfolioItem(){ID="IBM",weight=0,shares=32};

  PortfolioResult[] _portfolioResult = wsStressTestingServer.GetPortfolioBeta(portfolios);
Example Request Body
 XML<Request>
    <stressTestPortfolio portfolio='Portf1'>
        <portfolioItem id='MSFT' weight='12' shares='0' />
        <portfolioItem id='GOOG' weight='22' shares='0' />
        <portfolioItem id='IBM' weight='32' shares='0' />
    </stressTestPortfolio>
    <stressTestPortfolio portfolio='Portf2'>
        <portfolioItem id='MSFT' weight='0' shares='4' />
        <portfolioItem id='GOOG' weight='0' shares='5' />
        <portfolioItem id='USD Cash' weight='0' shares='32' />
    </stressTestPortfolio>
</Request>
 JSON{
  "Request": {
    "stressTestPortfolio": [
      {
        "portfolio": "Portf1",
        "portfolioItem": [
          {
            "id": "MSFT",
            "weight": "12",
            "shares": "0"
          },
          {
            "id": "GOOG",
            "weight": "22",
            "shares": "0"
          },
          {
            "id": "IBM",
            "weight": "32",
            "shares": "0"
          }
        ]
      },
      {
        "portfolio": "Portf2",
        "portfolioItem": [
          {
            "id": "MSFT",
            "weight": "0",
            "shares": "4"
          },
          {
            "id": "GOOG",
            "weight": "0",
            "shares": "5"
          },
          {
            "id": "USD Cash",
            "weight": "0",
            "shares": "32"
          }
        ]
      }
    ]
  }
}
Example Response Body
 XML<StressTestingRestAPI Result="Success">
  <PortfolioResult Portfolio="Portf1" Value="62.278" />
  <PortfolioResult Portfolio="Portf2" Value="3012.963" />
</StressTestingRestAPI>
 JSON{
  "StressTestingRestAPI": {
    "Result": "Success",
    "PortfolioResult": [
      {
        "Portfolio": "Portf1",
        "Value": "62.278"
      },
      {
        "Portfolio": "Portf2",
        "Value": "3012.963"
      }
    ]
  }
}