Skip to content

Commit f8ca1cc

Browse files
authored
Update VolSurface.py
Fix bug in flooring the ttm when extrapolating small ttm var
1 parent 364109a commit f8ca1cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fypy/volatility/VolSurface.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def from_pricer(pricer: StrikesPricer,
9696
return ModelVolSurfaceSlices(slices=slices)
9797

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

102102
@property

0 commit comments

Comments
 (0)