Calculating Value at Risk

Calculate the Value at Risk (VaR) for a sample investment portfolio by running a Monte Carlo simulation in IBM® Spectrum Symphony. A Monte Carlo simulation relies on repeated random sampling to obtain numerical results and is typically computationally intensive. Use this sample simulation to see how IBM Spectrum Symphony can accelerate time-to-results for such workload by breaking down workload tasks and running them in parallel.

Before you begin

The Value at Risk (VaR) Simulation Sample is not supported on Firefox ESR 45 or lower. For a list of supported browsers, see Supported browsers.

About this task

When you calculate VaR, sample workload is submitted from an IBM Spectrum Symphony client to the cluster. This workload runs a Monte Carlo simulation to estimate the maximum loss expected on investments in a set time period (such as a month) with a certain degree of confidence. Modify the Monte Carlo configuration to suit your requirements and vary the maximum number of cores to see how adding cores changes your results.

Procedure

  1. From the cluster management console, go to Workload > Symphony > Applications.
  2. Select Demo7.3.2 in the application list and click Enable to enable the application.
    Tip: To improve your results, set the application to be prestarted in the preStartApplication parameter of the Demo7.3.2 application profile (see Consumer section).
  3. In the application's properties, expand the demonstration section in the Summary tab and click the Monte Carlo Simulation link to launch the sample web portal.

    You can also directly enter the URL of the sample web portal in a supported web browser. For example, enter https://Host_M:8443/demo, where Host_M is the fully qualified name of the cluster management console host.

    The Value at Risk (VaR) Simulation Sample window opens.

  4. If you want to change the sample data used for the simulation, update the equity portfolio. You can change existing equity values, add new equities, or remove existing ones (see Updating equity data to calculate Value at Risk).
  5. In the Monte Carlo Configuration section, check the following parameters:
    • Number of days: Time horizon for the simulation, representing the period over which the loss might be realized. Default is monthly (22 working days).
    • Number of 10K simulations: Number of iterations of each 10K simulation to run. Default is 20 (which translates to 200,000 iterations for each equity).
    • Degree of confidence: Confidence level, expressed in percentage, at which to estimate VaR. Default is 99 percent.
  6. In the Max cores for simulation section, select the maximum number of cores that can be used to run tasks in the computation. Default is 1 core. Set this value to one more than the desired maximum (allowing one extra core to be taken up by the application's parent session). With a higher maximum, workload tasks are distributed on more cores and run in parallel. The higher the number of cores, the faster results can be returned.
    Tip: To make more cores available to the application, you can change the application's resource group in the resourceGroupName parameter of the Demo7.3.2 application profile (see Consumer section).
  7. If the Number of days and Number of 10K simulations are set to a significantly high value, but Max cores for simulation is low, increase the Max time to complete simulation (default is 5 minutes). With fewer cores but more days and more 10K simulations, the calculation requires a longer time to complete. Increase the max time value to prevent the simulation from timing out before it completes.
  8. Click Calculate VaR.
    1. When prompted to log in, enter a user name and password and click Log in. You can use the default credentials for the built-in cluster administrator account (user name Admin, password Admin).
    2. Click Calculate VaR (not required).

    To stop and cancel the simulation anytime, click Cancel VaR simulation.

Results

An index entry for the simulation appears in the Completed Workload Summary table. Look for each equity's VaR in the Value at Risk column of the Value at Risk for Sample Portfolio table.

What to do next

Vary the maximum number of cores and calculate VaR again to compare the results of each simulation. Check the Workload Run Time column in the Completed Workload Summary table to see how extra cores can return results faster.

If the simulation window is inactive for more than an hour, log on when prompted to run more VaR calculations.

Tip: Use the Export Data button to export your simulation results as a comma-separated value (CSV) file.

The Demo7.3.2 sample application is only for demonstration purposes and is not meant for deployment to a production environment. When you are done calculating VaR, disable the application to prevent it from taking up cores that are required for your production workload.