fava-portfolio-returns icon indicating copy to clipboard operation
fava-portfolio-returns copied to clipboard

In-Item Exchanges taken into account?

Open fdw opened this issue 1 year ago • 6 comments

Hey, I have another question: Is it possible that transactions which should have a net-0-balance are wrongly taken into account as cash flows? I have a stock which was merged with another (so the value didn't change), but the relative value halved at that date. If the exchange transaction is understood as an influx of money, this makes sense, but it's still wrong. Have you seen this behavior before?

fdw avatar May 04 '24 09:05 fdw

To be honest I never tested it with a stock merge (never occurred in my private ledger so far), only with stock splits. Does beangrow handle this properly?

andreasgerstmayr avatar May 06 '24 22:05 andreasgerstmayr

Good question... How would I test that? I'm running everything in Docker and couldn't find a way to interact with beangrow directly.

fdw avatar May 07 '24 16:05 fdw

beangrow-returns ledger.beancount beangrow.pbtxt output

should generate PDF reports and save them in the output folder. If you've installed it in docker, maybe try docker exec <container> beangrow-returns ...

andreasgerstmayr avatar May 09 '24 22:05 andreasgerstmayr

Unfortunately, that crashes with an error:

Traceback (most recent call last):
  File "/app/bin/beangrow-returns", line 8, in <module>
    sys.exit(main())
  File "/app/lib/python3.9/site-packages/beangrow/compute_returns.py", line 100, in main
    reports.write_price_directives(path.join(output_prices, "prices.beancount"),
  File "/app/lib/python3.9/site-packages/beangrow/reports.py", line 411, in write_price_directives
    days_late = (required_date - actual_date).days
TypeError: unsupported operand type(s) for -: 'datetime.date' and 'NoneType'

Do I need to set more parameters?

fdw avatar May 10 '24 17:05 fdw

That sounds like an error in beangrow or a malformed ledger, maybe you can open an issue for beangrow.

andreasgerstmayr avatar May 25 '24 14:05 andreasgerstmayr

fava-portfolio-returns works fine with this ledger, however. Is this expected?

fdw avatar May 30 '24 13:05 fdw

This seems to be solved with the rewrite as well. Thank you very much!

fdw avatar Feb 19 '25 16:02 fdw