beancount/beangrow

compute_returns.py particially ignores -e END_DATE directive

Opened this issue · 0 comments

gety9 commented

simple.beancount

plugin "beancount.plugins.auto_accounts"
plugin "beancount.plugins.implicit_prices"

2005-01-01 commodity AAA

2021-07-12 * "Buy; AAA"
  Assets:Investing:CSchwab:AAA            579 AAA {68.82 USD, 2021-07-12}
  Assets:Investing:CSchwab:Cash     -39846.78 USD

2021-08-01 price AAA                    61.32 USD
2021-09-01 price AAA                    64.56 USD

conf-simple

investments {
  investment {
    currency: "AAA"
    asset_account: "Assets:Investing:CSchwab:AAA"
    cash_accounts: "Assets:Investing:CSchwab:Cash"
  }
}
groups {
  group {
    name: "AAA"
    investment: "Assets:Investing:CSchwab:AAA"
  }
}

executing compute_returns.py -e 2021-09-01 simple.beancount conf-simple simple we get
e-2019-09-01
Top left box returns (-36.70) and Cash flows date (2021-09-01) are using cut off date as expected.

But last year return (2021) and rolling returns are calculating using date on which command is executed, which is not intuitive.

Plus it makes beangrow require price points counted from day of execution of command which are shown in prices.beancount (2021-09-15, 2021-06-15, etc) which you need to put into your beancount file. And this DAY part of date will always vary. (unless you can always run your command on same day each month) It makes things a bit untidy.

If one makes the rule that his beancount should contain prices for commodities on 1st of each month
2021-07-01, 2021-08-01, 2021-0901, etc then by having fully functional -e 2021-XX-01 you will not see new dates in prices.beancount and won't need to update your main beancount file.