How-To Calibrate American Options Really Fast in C++
tastyhedge.com
tastyhedge.com
Error
calibrateEuropean(
f64 v, // option price
f64 s, // stock priceBasically `Error` is an alias to `std::string`. This way code is more meaningful as returning just std::string is too generic.
It's also my convention to report errors as return arguments in this particular codebase, instead of throwing exceptions for example.