Go to Deriscope's documentation start page


Setting TimeDependent = true within the FDModel when pricing an option under the FDBermuden method may lead to an error issued from QuantLib complaining about a negative time.
This error occurs when the first exercise date equals today's date.
It is due to the limited computer accuracy whith which the time step dt = T/N is calculated. During the backward iteration, one starts at time T and then at each step subtracts dt. After N steps, one expects to reach 0, but due to the limited machine precision, dt may be slightly bigger than T/N, which results in falling below 0 at the end of the last step.

Click on
download to download an xml file that contains an Excel formula that demonstrates this issue.

You may then reproduce the issue in spreadsheet by clicking on Go -> Load Excel Formula from Text File or one of its variations and choose the xml file downloaded in the step above.