Skip to content

Commit eda42f2

Browse files
committed
small tweak
1 parent 9a7d5aa commit eda42f2

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

folioflex/portfolio/portfolio.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1540,12 +1540,12 @@ def _get_return_pct(
15401540

15411541
# makes sure that ticker had transactions both negative
15421542
# and positive to calculate return
1543-
dwrr_return_pct = np.NaN
1544-
dwrr_ann_return_pct = np.NaN
1545-
dwrr_div_return_pct = np.NaN
1546-
dwrr_div_ann_return_pct = np.NaN
1547-
mdrr_return_pct = np.NaN
1548-
mdrr_ann_return_pct = np.NaN
1543+
dwrr_return_pct = np.nan
1544+
dwrr_ann_return_pct = np.nan
1545+
dwrr_div_return_pct = np.nan
1546+
dwrr_div_ann_return_pct = np.nan
1547+
mdrr_return_pct = np.nan
1548+
mdrr_ann_return_pct = np.nan
15491549
if return_transactions.empty:
15501550
logger.debug(
15511551
f"There were no transactions for {ticker} to calculate the return"
@@ -1607,13 +1607,13 @@ def _get_return_pct(
16071607
-return_transactions["return_txs"].iloc[0]
16081608
- return_transactions["return_txs"].iloc[-1]
16091609
) / return_transactions["return_txs"].iloc[-1]
1610-
dwrr_ann_return_pct = np.NaN
1610+
dwrr_ann_return_pct = np.nan
16111611
elif dwrr_ann_return_pct > max_percentage:
16121612
logger.warning(
16131613
f"DWRR return for {ticker} is greater than {max_percentage}%"
16141614
)
16151615
dwrr_return_pct = (1 + dwrr_ann_return_pct) ** (days / 365) - 1
1616-
dwrr_ann_return_pct = np.NaN
1616+
dwrr_ann_return_pct = np.nan
16171617
else:
16181618
dwrr_return_pct = (1 + dwrr_ann_return_pct) ** (days / 365) - 1
16191619

@@ -1630,7 +1630,7 @@ def _get_return_pct(
16301630
f"DWRR div return for {ticker} is greater than {max_percentage}%"
16311631
)
16321632
dwrr_div_return_pct = (1 + dwrr_div_ann_return_pct) ** (days / 365) - 1
1633-
dwrr_div_ann_return_pct = np.NaN
1633+
dwrr_div_ann_return_pct = np.nan
16341634
else:
16351635
dwrr_div_return_pct = (1 + dwrr_div_ann_return_pct) ** (days / 365) - 1
16361636

0 commit comments

Comments
 (0)