Skip to content

Commit

Permalink
Update VolSurface.py
Browse files Browse the repository at this point in the history
Fix bug in flooring the ttm when extrapolating small ttm var
  • Loading branch information
jkirkby3 authored Apr 13, 2024
1 parent 364109a commit f8ca1cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fypy/volatility/VolSurface.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def from_pricer(pricer: StrikesPricer,
return ModelVolSurfaceSlices(slices=slices)

def model_vol(self, x: Union[float, np.ndarray], T: float) -> Union[float, np.ndarray]:
T = min(1e-07, T)
T = max(1e-07, T)
return np.sqrt(self.model_var(x, T) / T)

@property
Expand Down

0 comments on commit f8ca1cc

Please sign in to comment.