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,