On 05/09/25 19:09, 'Alen Šiljak' via Beancount wrote:
On Friday, 5 September 2025 at 6:50:47 pm UTC+2 [email protected] wrote:
This is by design.
Thanks for the tip. I understand the concern there and the desire to
keep the core engine exact. But, the practical use cries for something
that is a bit more convenient.
For example, I have BAM, which is pegged to EUR by constitution, and I
have last week's EUR/USD rate because for me that's good enough. Based
on this data, it certainly is possible to find a simple way BAM -> EUR -
> USD, to express any report in any of these currencies. If there was a
HUF involved, and it included rates to EUR and USD, there would be
multiple way to calculate.
Taking the latest, or the first occurrence produces some result. If it
was possible to see and understand the chain, that would help in some
odd case. But once a user understand the principle and has correct
records, this approach produces a very practical result - it uses last-
known exchange rates to perform rate calculations.
This is certainly something that a middleware (a plugin?) should be able
to do. I was looking already for an existing one but was unable to find
anything. Hope I find something before going down the rabbit hole of
writing one from scratch.
Here https://github.com/beancount/beancount/issues/255 there are more
details. There is also a link to code in beancount that computes the
transitive prices
https://github.com/beancount/beancount/blob/v2/beancount/core/prices.py#L138
If someone has a good idea about how to expose that I'd be happy to add
it to beanquery.
Cheers,
Dan
--
You received this message because you are subscribed to the Google Groups
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/beancount/713a00c8-d027-42f0-ad8c-2f639c76317b%40grinta.net.