Value At Risk
Overview
The Value at Risk example has two main parts.
First, using Visual Basic, we wrote an ActiveX DLL and installed it on our server. This DLL references the @RISK Developer's Kit ActiveX library, and contains all the model logic for simulating the percent return of our investment with and without the effect of the put. It also contains code for generating progress and output graphs, and the formatted table of statistics that you see in the example's result window.
Second, we wrote a sequence of web pages to retrieve the
model's input parameters from the user, to dynamically show
the progress of the simulation, and to display the output
results. One of the web pages in the sequence uses VBScript
to call our DLL, passing it the model parameters specified
by the user. When the simulation is complete, the results
page combines together the statistics and graphs generated
by the DLL into a nicely formatted page, suitable for display.
RDKX_ValueAtRisk.DLL
This DLL contains only a single publicly accessible method,
called Simulate. The function
takes as arguments all the input model parameters, as well
as an output directory to which it will write graphs and results.
The Simulate method performs the following five steps:
1. Initializes the RDK
2. Sets up the Model
3. Runs the Simulation
4. Generates the Results
5. Shuts Down the RDK
The function generates three files in the output directory specified, "HISTOGRAM.JPG", "CUMULATIVE.JPG," and "STATISTICS.HTML". The files are combined together by the calling .ASP page to make the final page that is displayed to the user.
There are two code modules that make up the RDKX_ValueAtRisk.DLL
form goes here