Interactive SuperComputing


 

Success Stories

Financial Modeling – Monte Carlo Analysis

The Challenge
Monte Carlo analysis is a cornerstone for implementing financial models in the industry. These simulations have many advantages, including the ease of implementation and applicability to multi-dimensional problems commonly encountered in finance. Option pricing can be represented as expectations and Monte Carlo analysis is very attractive and commonly used. An example is an Asian Option Call, which is a financial contract dependant on the average security price over discrete dates in the future. The asset price at some time, t, in the future follows the classic Black-Scholes model as follows

where r is the risk-free rate of return, ó is the volatility of the asset price and dWt is the increment of standard Brownian motion. The price of this option is a function of the strike price, K, and option maturity, T, shown as follows

where the average asset price is

The combination of these equations does not have a closed form solution. To solve this pricing problem, a Monte Carlo simulation is used.

However, for risk management, hedging, and stress testing of a portfolio, the price sensitivity as a function of changes to model inputs, the "Greeks" as they are commonly known, becomes quite valuable. One Greek of interest is vega; the option price sensitivity to changes in the securities volatility, which is as follows


The price and vega calculation using Monte Carlo techniques is very time consuming for several reasons. For simulation accuracy, many Brownian motion trajectories are used for price determination. For each option simulation, there are several contract dates during the option maturity; monthly dates for an annual contract. In addition, an accurate picture of price volatility is achieved by rerunning the simu lation w ith many different values for the volatility, ó. The option trader faced with minimizing risk to their client-base and portfolio may look to have this price and volatility analysis before making trades or in post-closing analysis. For very large, multi-commodity portfolios, analysts frequently wait hours for model simulations affecting their ability to respond in real-time to a dynamic market or to complete risk analysis before the next day of trading.

Click the Images to Enlarge
 

Star-P Solution
With Star-P, analysts can quickly take advantage of the power and speed of task parallel computation to implement Monte Carlo analyses. By maintaining existing Monte Carlo MATLAB®® code, quantitative analysts can parallelize their simulation with minimal code modification avoiding the need to recode in C/C++ or FORTRAN with MPI extensions.

An example of Asian Option Pricing using MATLAB® is shown in Figure 1. This Monte Carlo function is used to analyze price volatility by initializing the option maturity, T, the range for the pricing volatility, ó (sigma in Fig. 1), the number of contract dates within T, and the number of trajectories, Num_Traj, to solve, which determines the approximation error. Larger Num_Traj results in smaller Monte Carlo approximation errors.



To run the MATLAB® analysis in serial, the analyst can simply loop over the dao function from Figure 1.




Simple Task-Parallel Computing
In the MATLAB® environment, the analyst gains ready access to task parallel computation by calling the Monte Carlo function directly by using the ppeval command. With the following simple change to the serial MATLAB® code, replace the serial loop above, performance gains approaching the number of parallel processors can typically be achieved.


 

Summary and Metrics

  • Large multi-commodity portfolios can be rapidly simulated, enabling real-time trading response to market dynamics
  • Minimal modification of MATLAB® code to take advantage of powerful parallel computing
  • High-speed parallel processing, scalability approaching the number of processors
  • No need to program in C/C++ with MPI to take advantage of parallel computation


Back to Success Stories >