This project was written for Financial Market Modeling (Modelowanie Rynkow Finansowych).

The main idea of the project is to implement two most important algorithms for European option pricing: Black-Scholes-Merton and Binomial Tree.

Both of those algorithms have two versions: one on the CPU (standard way of computation) and one on the GPU. Version on the GPU is usually much faster then CPU. The application gives a lot of options so that user can compare not only algorithms but also GPU vs CPU implementations.

Go to Computations for Option Pricing to understand patterns and algorithms for option pricing.

Go to Sample Screens to see some screenshots of the application.

Application was developed on Notebook with GeForce 8600M GT, Core2Duo 2.2 ghz, Windows 7

to run the app you need:

- latest graphics drivers with OpenGL 3. support
- OpenCL driver, through NVidia Computing SDK
- Windows System: XP, Vista or Seven

GUI description:

- Compute Panel - press Compute button when you change options params
- performance - presents time and number of options per second for each algorithm
- ratios - how much faster is one algorithm over the second one
- error - errors between algorithms, calculated as SUM_DIFF / SUMM_ALL

- Option Panel - select variuous option params and number of options to be calculated
- binomial steps - how much steps should Binomial algorithm use
- bin on GPU steps - the same as above but for the GPU implementation

- Graph Panel - select params for the diagram, press Update after you change something. All panels can be moved, resized and adjusted in different ways.

Mouse:

- press right mouse button to rotate the diagram
- press middle mouse button and move it vertically to zoom the diagram
- press key 'S' and use left mouse button to select a quat on the grid. Then in the top left corner of the window you will see params for that quat.

Keyboard:

- press ESC to close the application
- press 'H' to show/hide whole GUI
- press 'S' for selection

The project is based on the BEF engine. BEF creates facade on Windows and OpenGL, so that in quite easy steps one can create application based on those technologies. BEF creates window, manages input, swaps buffers, creates texture, shader, mesh managers.

BEF was designed for 3D applications in mind, but after several small changes it was easy to create more "static" application like for drawing diagrams...

The project consists of three important parts: "Option Generator", "Pricing Algorithms" and "Graph3D".

Options::GenParams is used to represent variuos params for options. Usually program creates NxN options so that each option differs by two params. That way we can calculate price of option that have, let say, fixed strike price and different expiration time and asset price.

Application has four algorithms for option pricing:

- Black Scholes Merton on CPU
- Black Scholes Merton on GPU
- Binomial Tree on CPU
- Binomial Tree on GPU

GPU implementations are made using OpenCL. See BinomialOptions.cl and BlackScholesMerton.cl.

When user presses Compute button all of those algorithms are executed. That way we can see and compare differences between them.

Graph class is used to draw a 3D graph based on call or put price. Aditionally user can select one quad ot the grid and see exact computed params for it.

This project was build with the help of:

Generated on Fri Feb 26 10:08:23 2010 for BEF Option Pricing by 1.6.3