Monte Carlo in Esperanto

KRISHNA KUMAR PRESENTS A SIMPLE PARSER ADDITION IN EXCEL/VBA TO YOUR MONTE CARLO ARMORY

This article shows how a simple parser environment in Excel/VBA could be used to perform single and multi-dimensional Monte Carlo. The clsMathParser is a class for math expression evaluation in Excel/VBA. We show that a host of vanilla and exotic derivatives can be priced easily in this framework. The parser allows separation of concernand natural language expression of structured product payoffs.We provide test results for 1-dimensional and multi-dimensional options and sample spreadsheets.

“Let me try to explain to you, what to my taste is characteristic for all intelligent thinking. It is, that one is willing to study in depth an aspect of one’s subject matter in isolation for the sake of
its own consistency, all the time knowing that one is occupying oneself only with one of the aspects.

We know that a program must be correct and we can study it from that viewpoint only; we also know that is should be efficient and we can study its efficiency on another day [. . .] But nothing
is gained—on the contrary—by tackling these various aspects simultaneously. It is what I sometimes have called “the separation of concerns’’

Edsger W. Dijkstra

1 Introduction

Every few months there is a new thread on the Wilmott forum with a new spin on the age-old computer language debate. Although the thread title is different each time, C++ vs Fortran, Ada vs Java, the discussions are typical of the debate: heated and inconclusive.

Language preferences and superiority of one environment over the other are hard to decide. There has been an attempt in the past at benchmarking languages using standardized test suites [1], and more recently Bagley’s shootout.

Today, there are about a dozen active programming languages in use, of which C, C++ and Java seem to dominate the Street. But in terms of reuse and rapid development tools there is much work still to be done.

2 Domain Specific Languages

Computer Scientists spend a significant amount of their time creating languages that are specific to a problem domain (Domain Specific Languages, or DSL’s). A DSL is a specific formal language that is formed using a limited set of symbols with a set of predefined rules. DSL’s are similar to high-level languages, they often allow us to express in the operating lexicon of the problem domain, “mathematics”. Although DSL remains an active area of research and it has been repeatedly shown to improve productivity and speed, DSL use remains rare. Although many banks appear to have made custom ports of high-level languages there is a disconnect between the model abstraction, conceptual basis and actual implementation.

In terms of high-level tools there are commercial products that provide a high-level language environment and “automagically” generate and compile code for a target language environment based on a domain-specific notation. Although very promising, the average Quant developer/Financial Engineer is not likely to use these tools.

Logged-in members can download the article by clicking the link under all the Related Posts below. To log in or register visit here.

Related Posts

Order Statistics for Value at Risk Estimation and ... We apply order statistics to the setting of VaR estimation. Here techniques like historical and Monte Carlo simulation rely on using the k-th heaviest...
Monte Carlo Methods in Quantitative Finance Generi... We describe how we have designed and implemented a software architecture in C++ to model one-factor and multifactor option pricing problems. We pa...
Automatic Differentiation for the Greeks The sensitivities of the value of an option to the model parameters, a.k.a. “the Greeks,” are crucial to understanding the risk of an option posit...
Forecasting the Yield Curve with S-Plus Methods capable of forecasting the entire yield curve based on a time series extension of the Nelson-Siegel model Nelson and Siegel (1987) were su...
Amaranthus Extermino On September 19, 2006 the hedge fund Amaranth Advisors of Greenwich, Connecticut announced that it had lost $6 billion, about two thirds of the $9...
Poker as a Lottery Doyle Brunson , two-time winner of the World Series of Poker main event, has likened a poker tournament to a lottery in which more skilled players...
Building Your Wings on the Way Down Ray Bradbury famously defined “living at risk” as jumping off a cliff and building your wings on the way down. Too many financial risk managers wh...
Internal LGD Estimation in Practice Driven by a competitive market and motivated by the new Basel Capital Accord (Basel II), banks have put a lot of effort into development and impro...
110830_kumar