Fix unused tol variable in SVI notebook (issue #226)#235
Open
Bortlesboat wants to merge 1 commit intodomokane:masterfrom
Open
Fix unused tol variable in SVI notebook (issue #226)#235Bortlesboat wants to merge 1 commit intodomokane:masterfrom
Bortlesboat wants to merge 1 commit intodomokane:masterfrom
Conversation
The EquityVolSurface.check_calibration() method only accepts a single argument (verbose: bool), but the notebook previously called it with (False, tol). The call was fixed to check_calibration(False) but the unused tol = 1e-4 assignment was left behind. Remove it. Closes domokane#226
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tol = 1e-4assignment inEquityVolSurfaceConstructionSVI.ipynbcell 12EquityVolSurface.check_calibration()method signature ischeck_calibration(self, verbose: bool)— it does not accept atolparameter (unlike the FX/Swaption vol surface variants which do)equitySurface.check_calibration(False, tol)which raisedTypeError: EquityVolSurface.check_calibration() takes 2 positional arguments but 3 were givencheck_calibration(False)in a prior commit, but the deadtol = 1e-4variable definition was left behind — this PR cleans it upCloses #226
Test plan
EquityVolSurface.check_calibrationsignature accepts only(self, verbose: bool)equitySurface.check_calibration(False)with no unused variablescheck_calibrationcalls — they are all correct