On 17/02/2021 09:28, David Karapetyan wrote:
>
> Hello,
>
> Firstly, I wanted to compliment you on this brilliant project (and your
> excellent documentation in particular on double-entry accounting, useful
> particularly for people already working in technical fields). I had a
> question about balance assertions for investment accounts. Specifically,
> suppose I have the following two (and only two transactions) for Fidelity:
>
> Assets:US:Fidelity:SPAXX 10 USD
> Assets:US:Fidelity:FNILX 20 USD
This is not valid Beancoutn syntax. However, completing it in the most
straightforward way:
2020-02-17 * "Foo"
Assets:US:Fidelity:SPAXX 10.00 USD
Assets:US:Fidelity:FNILX 20.00 USD
Assets:Openings
these are two postings on a transaction, not two transactions. However,
I don't think semantics is part of your problem :-)
> I would like to do a balance assertion on the sum of these accounts in
> time, i.e.
>
> 2020-01-01 balance Assets:US:Fidelity 30 USD
This works out of the box (as long as you remember to open the
Assets:US:Fidelity account):
2020-02-17 open Assets:Openings
2020-02-17 open Assets:US:Fidelity
2020-02-17 open Assets:US:Fidelity:SPAXX
2020-02-17 open Assets:US:Fidelity:FNILX
2020-02-17 * "Foo"
Assets:US:Fidelity:SPAXX 10.00 USD
Assets:US:Fidelity:FNILX 20.00 USD
Assets:Openings
2020-02-18 balance Assets:US:Fidelity 31.00 USD
Can you post a self contained minimal example where it does not work?
Cheers,
Dan