Dr. Michael Moreno

Quantitative Developer

Code Samples

Black & Scholes formula in VB, Delphi and C++

Quite often, students came to see me having difficulties to compute finance articles. Whether it is a closed formed solutions, a tree, a PDE or Monte Carlo simulations many of them really struggled. In order to help them getting started, I have computed the simple Black & Scholes formula in VB, C++ and Delphi. That will help you to see the differences between the languages too.

The implemented classes I have written are simple: a few properties, some private and public functions with exception handling but no encapsulation or inheritance.

You can download the source codes below:

BS in Delphi (vs. 6 pro)

BSDelphi.zip

BS in VB (vs. 6 Enterprise)

BSVB.zip

BS in C++ (vs. BCB 4 Pro)

BSCPP.zip

Trees (source code in Delphi)

Click here for More Delphi documents