Skip to content →

Check N = 3 before you check N = infinity

?

In implementing models, one of the most common mistakes I’ve made, and seen others make, is to check them sloppily.

For example, suppose you can write a binomial or lattice or Monte Carlo solution for the Black-Scholes model, and then check that for a very small lattice spacing it agrees with Black-Scholes solution to a high degree of accuracy for a bunch of different strikes, expirations, etc. The temptation is to say that everything is OK. But that just tells you that the average of all your calculations is roughly OK. There could still be logical errors in your algorithm that aren’t showing up in this average case.

Therefore, it’s good to run the program for N=3, say, and print out every intermediate number, and check each one with a calculator. It’s amazing how often you can have a small mistake that doesn’t show up in your simple gross tests until much later, when you do calculate something a little stranger.

Constant self-criticism, as the Red Guards used to say, and constant looking over your own shoulder.

Since everyone else is apparently beginning to put photos in their blog, I must too. This one is Central Park on an early spring evening, taken with my Treo’s camera. I used to despise picture-taking cell phones, but they have their uses.

Published in Finance Models