Skip to content

Commit a68b79a

Browse files
committed
fixes cash_flow problem
1 parent 67641e0 commit a68b79a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

climada/trajectories/trajectory.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,9 +204,8 @@ def _calc_npv_cash_flows(
204204
)
205205
tmp.index = df.index
206206
df = tmp.copy()
207-
start = pd.Timestamp(start_date)
208207
df["discount_factor"] = (1 / (1 + df["rate"])) ** (
209-
(df.index - start).days // 365
208+
(df.index.year - start_date.year)
210209
)
211210

212211
# Apply the discount factors to the cash flows

0 commit comments

Comments
 (0)