aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--python/pnl_explain.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/python/pnl_explain.py b/python/pnl_explain.py
index 4020fbaf..6e02eda7 100644
--- a/python/pnl_explain.py
+++ b/python/pnl_explain.py
@@ -18,7 +18,7 @@ def get_index_pv(
conn: connection,
strategies: Union[Tuple[str], None] = None,
):
- dr = pd.bdate_range(start_date, end_date, freq=bus_day)
+ dr = pd.bdate_range(start_date, next_business_day(end_date), freq=bus_day)
if strategies is None:
return pd.DataFrame(0.0, index=dr, columns=["pv", "upfront", "accrued"])
pvs = []
@@ -70,7 +70,7 @@ def get_swaption_pv(
conn: connection,
**kwargs,
):
- dr = pd.bdate_range(start_date, end_date, freq=bus_day)
+ dr = pd.bdate_range(start_date, next_business_day(end_date), freq=bus_day)
pv = []
daily = []
dates = []