Skip to content

Commit f6a0138

Browse files
authored
Merge branch 'master' into dev
2 parents d988838 + c651547 commit f6a0138

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

okama/assets.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -561,6 +561,7 @@ def get_cagr(self, period: Optional[int] = None, real: bool = False) -> pd.Serie
561561
CNYUSD.FX -0.017922
562562
dtype: float64
563563
"""
564+
# TODO: add "real" attribute
564565
df = self._add_inflation()
565566
dt0 = self.last_date
566567
if period is None:

okama/portfolio.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,11 @@ def describe(self, years: Tuple[int] = (1, 5, 10)) -> pd.DataFrame:
531531
else:
532532
row = {"portfolio": value}
533533
else:
534-
row = {x: None for x in df.columns} if hasattr(self, "inflation") else {'portfolio': None}
534+
row = (
535+
{x: None for x in df.columns}
536+
if hasattr(self, "inflation")
537+
else {"portfolio": None}
538+
)
535539
row.update(period=f"{i} years", rebalancing="1 year", property="CAGR")
536540
description = description.append(row, ignore_index=True)
537541
# CAGR for full period (rebalanced 1 year)

0 commit comments

Comments
 (0)