Validating a Black-Scholes Options Pricer Against Excel
Summary
The document asks how to check code that calculates European option prices with the Black-Scholes analytical method. The author has considered comparing outputs with online option-pricing tools but is unsure whether those tools use the same method, making them uncertain reference points for a direct check.
The response suggests comparing the implementation's values with Excel functions as a quick check, or sharing the code for review. No test cases, input values, expected prices, or validation results are provided. The recommendation is consequently only a basic cross-check: it does not establish that the spreadsheet function uses identical assumptions or conventions, nor does it explain how to test edge cases, numerical accuracy, or implementation errors.
Key ideas
- The code being checked computes European option values using the Black-Scholes analytical method.
- A suggested quick check is to compare outputs with Excel functions.
- Code review is offered as another way to identify potential issues.
- The document provides no test inputs or results and does not establish equivalence between pricing implementations.
Tags
Full text
# Testing Black Scholes Analytical Options Pricer # Testing Black Scholes Analytical Options Pricer I've written some code to calculate European option prices using the Black-Scholes analytical method. Can somebody recommend a good way to test that code? I have looked at option pricers online like IVolatility. However, I'm not sure if they use the method I am trying to test. ## Answer by tagoma (score 3, accepted) https://quant.stackexchange.com/a/7662 An easy and fast way is checking your values against Excel functions. See, the picture below. Or, maybe you could post your code and people will have a look at it. Or, maybe you could post your code and people will have a look at it.
Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.