Skip to content

Commit

Permalink
consider ASSET_DIVIDEND transactions when computing return
Browse files Browse the repository at this point in the history
When computing the returns of an asset, transactions of type
ASSET_DIVIDEND are not considered. That makes the return rate computed
by beangrow substantially different to rates reported by fund managers.

I could not find any justification as to why these transactions are
ignored when computing the return rates, and this seems to confuse me as
well as other users. See beancount#23 and beancount#26

At least with this small patch, users get a chance to try and see if
they get the result they expected.
  • Loading branch information
Damien Riegel committed Sep 10, 2024
1 parent 56f1c2a commit a59039f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions beangrow/investments.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,12 @@ def produce_cash_flows_general(entry: data.Directive,
posting.meta["flow"] = cf
flows.append(cf)

elif category == Cat.ASSET and has_dividend:
cf = CashFlow(entry.date, convert.get_weight(posting), has_dividend,
"dividend", account)
posting.meta["flow"] = cf
flows.append(cf)

return flows


Expand Down

0 comments on commit a59039f

Please sign in to comment.