diff --git a/tests/conftest.py b/tests/conftest.py index 12af643..926e140 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -106,7 +106,7 @@ def init_portfolio_values(): first_date="2015-01", last_date="2020-01", inflation=True, - rebalancing_period="year", + rebalancing_period="annually", symbol="pf1.PF", ) diff --git a/tests/test_portfolio.py b/tests/test_portfolio.py index 42d9fcb..4ea7892 100644 --- a/tests/test_portfolio.py +++ b/tests/test_portfolio.py @@ -142,6 +142,9 @@ def test_dividends(portfolio_dividends): def test_dividend_yield(portfolio_dividends): assert portfolio_dividends.dividend_yield.iloc[-1] == approx(0.0396, abs=1e-2) +def test_dividends_annual(portfolio_dividends): + assert portfolio_dividends.dividends_annual.iloc[-1].sum() == approx(32.778668, rel=1e-3) + def test_risk(portfolio_rebalanced_month): assert portfolio_rebalanced_month.risk_monthly == approx(0.02233, rel=1e-1)