VBA AND OTHER LANGUAGES: DIFFERENT PROGRAMS FOR DIFFERENT USES

One component of this text that differentiates it from other simulation texts is the use of Visual Basic for Applications (VBA), which is an object-oriented language appropriate for working with Excel for smaller, simpler macros. VBA's main advantages are in its simplicity and its ability to use worksheet and application objects to manipulate the output, which is usually (but not always) also an Excel worksheet or object. For shorter, ad hoc projects and when flexibility is valued over computational horsepower, VBA is generally as easy to work with as other languages, and the ability to have calculations done in the Excel worksheet and then read by the code can save a massive amount of programming time.

However, VBA is considered by many to be insufficiently powerful for Monte Carlo simulations due to its speed and persistent questions about random number generation. In general, we believe that random number generation in the 2010 version of Excel does not have the same problems seen in previous versions of Excel. But the speed question is still an issue for modelers working in real time.

As a result, a large proportion of Monte Carlo–related models are done in C++, a general-purpose programming language. C++ programs can be built to handle extremely large amounts of data and calculations and can be integrated effectively into Excel workbooks. The main issues with C++ are the amount of time it takes to program and most finance professionals' unfamiliarity with the language, whereas many financiers have some knowledge of VBA and many are very familiar with Excel.

In practice, most of the work done in finance is handled through these two languages or in languages that are proprietary to individual firms. VBA is generally used for applications that either do not need to be in real time or smaller projects where the computational needs are secondary to the ability to change the way things work quickly.

In 2010, the Securities and Exchange Commission proposed in release 33–9117 that most issuers of asset-backed securities (ABS) make code available to investors so that the buyers of the securities could simulate future cash flows themselves. The SEC proposed:

[T]o require the filing of a computer program (the “waterfall computer program,” as defined in the proposed rule) of the contractual cash flow provisions of the securities in the form of downloadable source code in Python . . . would be required to allow the user to programmatically input information from the asset data file that we are proposing to require as previously described. We believe that, with the waterfall computer program and the asset data file, investors would be better able to conduct their own evaluations of ABS and may be less likely to be dependent on the opinions of credit rating agencies.

The SEC chose Python because it is an open-source language (meaning that the code can be accessed by anyone). Python is a general-purpose language, and in this way it is much more similar to C++ than it is to VBA. However, we do not believe it has been widely used in finance applications. While the SEC proposed this rule in 2010, no requirements for the filing of a program had been instituted in the United States at time of publication.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset