Risk Reporting and Portfolio Optimizations

This application note shows the use of EnFuzion with BARRA Aegis Automation Assistant, a utility that automates the production of risk reporting and portfolio optimizations. The Automation Assistant can be run from a batch file and uses text files for input, which means it's well suited to be run by EnFuzion. This application note shows how easily EnFuzion was used to

  • distribute the Automation Assistant files evenly over its existing network of workstations
  • reschedule jobs that fail on one machine on another
  • utilize idle desktop machines

What is BARRA Aegis Automation Assistant (AAA)?
The BARRA Aegis System is an equity risk management software package that enables portfolio managers, analysts, researchers, and traders to achieve a competitive edge in managing equity securities and derivatives. The BARRA Aegis Automation Assistant (AAA) is an easy-to-use tool that automates common tasks in the BARRA Aegis System. It can be run as a Windows application to create batch files that generate reports or run portfolio optimizations.

In this example, an investment firm produces risk reports for its portfolios and publishes them on a password-protected section of its Web site. The BARRA Aegis Automation Assistant automates the process and produces the HTML reports. Length of execution time becomes an issue when higher performance is required, such as when the company runs reports for 10,000 private clients simultaneously, or when 100 portfolio reports need to be updated every five minutes during regular trading hours. This performance problem can be solved efficiently with EnFuzion.

Because the Automation Assistant is a serial application, the reports are generated on a single PC. One solution to the performance problem is to split the files up depending on the number of portfolios. However, this option has several disadvantages:

  • A constant development and maintenance effort is required to split up the files into smaller components.
  • The application's runtime is determined by the longest running Automation Assistant file. If the developer does not distribute the files evenly, performance can be significantly compromised.
  • There is no failover; if one of the machines fails, the application will not fully execute.

How did using EnFuzion help solve the problem?
EnFuzion enabled the investment company to distribute the files evenly over its existing network of workstations. Jobs that fail on one machine are rescheduled on another. In addition, EnFuzion's advanced scheduling options take advantage of idle desktop machines, such as those running screen savers.

Setting up EnFuzion for the Automation Assistant
Setting up EnFuzion for the Automation Assistant requires three steps. The entire process takes less than 10 minutes. In the following example, EnFuzion will be used to create batch reports. EnFuzion can also be used to speed multiple portfolio optimizations.


Step One. Create an Automation Assistant file

  1. Start the Aegis Automation Assistant and create a batch case for a single portfolio.
  2. Add an entry that generates the risk/return report as an HTML file for the latest download date. This example uses the German equity model.
  3. After clicking the Add Automation menu item, enter the required information.
  4. Select Risk Report Only as the Automation Type. These are standard BARRA portfolios. Select the dax.por as a proxy for all of the portfolios that are used to generate reports with EnFuzion. Now select LATEST as the start and end date, so Automation Assistant creates an up-to-date report.


  1. To specify the report to generate with the Automation Assistant, click on the Risk Report Settings button.
  2. Create a single report (the Risk Return report) for the portfolios. Choose HTML format because the reports appear on the Web site. Save the Risk/Return report to a location that is available on all PCs, C:\TEMP.

    After clicking OK, the Automation Assistant screen should look like this:

  1. Save the newly created Automation Assistant Batch Case as job.aaa.

Step Two. Set up the Automation Assistant File for EnFuzion
EnFuzion can pass parameters to an application by the command line. Unfortunately, this feature is not available with the Automation Assistant. Instead, EnFuzion passes parameters to Automation Assistant through standard text files. The AAA files used by Aegis Automation Assistant are text files. For example, this is what the job.aaa file looks like in Notepad:

EnFuzion can pass parameters to an application by the command line. Unfortunately, this feature is not available with the Automation Assistant. Instead, EnFuzion passes parameters to Automation Assistant through standard text files.

The AAA files used by Aegis Automation Assistant are text files. For example, this is what the job.aaa file looks like in Notepad:


  1. First, replace the specific portfolio, dax.por, with a placeholder for other portfolios. With EnFuzion, placeholders are indicated by ${name}, where name is the name of a variable. Use the variable, ${portfolio}.por, for the portfolio placeholder.
  2. To replace the specific portfolio with the placeholder, open the job.aaa file in Notepad. Find dax.por and replace it with the placeholder, ${portfolio}.por. The resulting file looks like this:

  1. Save this file with a new name, job.txt. Because this batch file is a template for EnFuzion and not a regular Automation Assistant batch file, use the .txt file extension.

Step Three. Create an EnFuzion plan for Automation Assistant
EnFuzion contains Preparator, a graphical wizard that integrates EnFuzion and Automation Assistant. No coding is required to run Automation Assistant from EnFuzion. Start the enfreparator and click Next > in the Wizard's Welcome dialog box to advance to the next step.

Specify the Parameters
In this example, there is a single parameter: portfolio. The portfolio name is the variable name selected to be replaced with an actual portfolio file name.

  1. Enter portfolio in the Name field; this is the same name specified as the portfolio placeholder in Step 2.
  2. Enter Portfolios as the label that is shown in the Generator.
  3. Because portfolio names are the Text data type and in this example Automation Assistant will run simultaneously with different portfolios, specify Select Many in the Text row.


Now, specify the options for the portfolios that should be used by EnFuzion. For convenience, set up the EnFuzion plan file to allow entering the portfolio name without the .por extension.

  1. Enter dax, mdax, cdax, dax100, mscigr and faz (all available portfolios) as possible values, then choose dax and mdax as the default selections.
  2. After entering the data, click Apply to add the parameter to the plan. The Parameter Description dialog is cleared to allow entering a second parameter. Because there are no other parameters, click Next > in the Parameter Description dialog to advance to next step.


Copy the template
The next step in the Wizard is preprocessing. This option is not required, so click Next > to advance to the Input Files dialog. In this step, tell EnFuzion which files are required on each computer to perform the task. For this example, there are two assumptions: both Aegis Automation Assistant and EnFuzion are installed on all PCs on the network and the portfolios and model data are available on a shared drive. Next copy the AAA file that specifies the job to run. This is the generic template file job.txt created in Step 2.

  1. Enter job.txt as the input file for EnFuzion to copy to each computer. If job.txt had not been copied to the EnFuzion directory, it would be necessary to specify the file's complete path in the Input File field.
  2. Click Apply to add this entry to the script.
  3. Click Next > to advance to the next step.


Create the AAA batch file
The previous step copied the job template job.txt to the computer. Now, it is necessary to generate the specific job file, job.aaa, on each computer. For each job, EnFuzion needs to replace the parameter ${portfolio}with one of the portfolio names (dax, mdax, ...).

  1. The resulting aaa file is called job.aaa. To perform this task with EnFuzion, specify job.txt in the Source File on Node field and job.aaa in the destination file field as shown in the following dialog:

  1. Click Apply to apply these entries to the plan file.
  2. Click Next > to go to the next step because EnFuzion does not need to substitute parameters in any other file.

Run BARRA Aegis Automation Assistant
The Aegis Automation Assistant can be run in a batch mode from the command line using the /r option.

  1. Enter the complete path to the application together with the name of the batch file and the /r option in the User Command field.
  2. Click Apply to add the code to the script, then Next > to proceed to the next step.


Collect the results
As specified in the job.aaa file, the Automation Assistant saves the resulting report in the directory C:\temp. Now, send the results from the PCs on the network to the PC acting as the Root machine for publishing on the Web. EnFuzion needs to know the names of these files and where to put them.

  1. Create a directory called output in the EnFuzion directory of the Root computer. The output directory is the location to which the files will be copied.
  2. Enter :C:\temp\${portfolio}*.html in the Source File on node field. This expression describes all the portfolio files on the temp directory.
  3. Click Apply, then click Next > to advance to the final step.


Show the results
This step copies the files over to a directory on a Web server. The Post-processing dialog makes it possible to specify a series of commands that run on the Root computer after all the results have been collected. For example, one could copy all the reports back to the Root machine.

For this example, open Windows Explorer to show the output directory containing all the reports.

  1. In the Command field, enter Explorer Output. This command launches Explorer for the output directory.
  2. Click Apply, then click Next >.
  3. Click OK to finish using the wizard.


The plan file
The EnFuzion Preparator generates a plan file that is used to generate the jobs that are distributed over selected PCs in the corporate network. Understanding this file format is not necessary. However, EnFuzion's batch language is simple and offers some advanced options that are not available in Preparator.


  • Save the file with the name aaa.pln

Running Automation Assistant with EnFuzion
The previous section describes how to interface EnFuzion with the BARRA Aegis Automation Assistant. This procedure is usually required only once per application or specific task that is being accelerated with EnFuzion.

From now on, running the BARRA Aegis Automation Assistant with EnFuzion involves just two steps:

  1. Run the Generator to enter current job parameters.
  2. Run the Dispatcher to execute the jobs over the network.

Generator: Enter new parameters
When selecting the Generator from the Dispatcher, the Generator appears with the plan file currently open in the Preparator. It is also possible to start the Generator by clicking enfGenerator in the EnFuzion directory. In this case, it is necessary to load the plan file by entering aaa.pln in the dialog that appears after choosing File | Load.

The following screen appears after loading the aaa.pln file. all available portfolios are displayed as options. The default portfolios are selected when loading the files.


  • Select all five portfolios and save the resulting configuration as a run with the name aaa.run.

This example generates five reports with a maximum speedup of a factor of five assuming that five PCs are used to distribute the job. In reality, there can be hundreds or thousands of portfolios with a much larger potential for increased performance.

Dispatcher: Execute the job
It is possible to run the Dispatcher from the Generator's File menu. Dispatcher can also be started by clicking the enfdispatcher program in the EnFuzion directory. In this case load the run file aaa.run to proceed.

After loading the file, the following Dispatcher window appears. The five squares represent five jobs. Clicking the Start button activates EnFuzion. When activated, EnFuzion distributes jobs over all the idle PCs in your network. If there are five available PCs, the five gray blocks turn black, indicating that the five portfolio reports are produced simultaneously. The results come in rapidly and the black squares turn white, indicating completed jobs.



This example does not show how EnFuzion can run on a heterogeneous platform. Since the BARRA Aegis Automation Assistant is only available on Windows platforms, Windows NT PCs are required as the computational platform. However, one could also activate EnFuzion from a highly redundant UNIX-based Web server that would distribute the jobs on a farm of Windows NT PCs. The failover capabilities of EnFuzion ensure that all jobs are completed, even in the unlikely case that some of the Windows NT workstations fail during the execution of the application.

This example shows how easily you can use EnFuzion to accelerate your computationally intensive financial applications. No other clustering solution is as flexible and as easy to deploy. The BARRA Aegis Automation Assistant is a good example of a powerful real-world application used by financial managers around the world. Other applications, such as Excel or SAS programs, can be used as easily.

Further information

This application note describes some basic capabilities of EnFuzion. It uses EnFuzion 6.0 release. You can find out more about using EnFuzion from the user manual or on the Axceleon Web site at www.axceleon.com.

Copyright © 2002 Axceleon Inc. All Rights Reserved