Login  Register

QL examples

Posted by Maxim Sokolov on Jul 09, 2001; 10:39pm
URL: http://quantlib.414.s1.nabble.com/QL-examples-tp1742.html

Hi!

 

I believe that examples should be nontrivial, interesting and useful for library testing. What do you think?

 

To start with I’ll write two examples:

 

BSM European Option Test:

      Goal: tests errors of the solutions using different methods.

 

Computes and compares European call value using BSM formula, Monte-Carlo and Finite-Differences method, displays relative error.

Tests put-call parity.

 

Hedging error example:

Goals: shows usage of the QL for experimental study.

 

Computes profit/loss of the short European option position due to discrete hedging.

 

It would be nice to receive your example ideas.

 

Best wishes,

 

Maxim