Skip to content

Commit

Permalink
Renamed test folders and fixed bug in plot vol surface
Browse files Browse the repository at this point in the history
  • Loading branch information
domokane committed Jul 31, 2024
1 parent b682b66 commit f04b906
Show file tree
Hide file tree
Showing 348 changed files with 37,566 additions and 37,546 deletions.
4 changes: 2 additions & 2 deletions financepy/market/volatility/equity_vol_surface.py
Original file line number Diff line number Diff line change
Expand Up @@ -708,8 +708,8 @@ def implied_dbns(self, lowS, highS, num_intervals):

dS = (highS - lowS) / num_intervals

disDF = self._discount_curve.df(t)
div_df = self._dividend_curve.df(t)
disDF = self._discount_curve._df(t)
div_df = self._dividend_curve._df(t)

r = -np.log(disDF) / t
q = -np.log(div_df) / t
Expand Down
8 changes: 4 additions & 4 deletions financepy/market/volatility/fx_vol_surface.py
Original file line number Diff line number Diff line change
Expand Up @@ -1042,8 +1042,8 @@ def implied_dbns(self, low_fx, high_fx, num_intervals):

dFX = (high_fx - low_fx) / num_intervals

dom_df = self.domestic_curve.df(t_exp)
for_df = self.foreign_curve.df(t_exp)
dom_df = self.domestic_curve._df(t_exp)
for_df = self.foreign_curve._df(t_exp)

r_d = -np.log(dom_df) / t_exp
r_f = -np.log(for_df) / t_exp
Expand Down Expand Up @@ -1100,8 +1100,8 @@ def plot_vol_curves(self):
f = self.fwd[tenor_index]

for _ in range(0, num_intervals):
sigma = vol_function(vol_type_val, params, f, K, t) * 100.0
strikes.append(K)
sigma = vol_function(vol_type_val, params, f, k, t) * 100.0
strikes.append(k)
vols.append(sigma)
k = k + dk

Expand Down
Loading

0 comments on commit f04b906

Please sign in to comment.