Martin, thanks!
I actually found the solution, the query is like that: select SUM(CONVERT(COST(position),"USD",*date*)) WHERE account ~ "Income" With such query the conversion happens with the exchange rate of the transaction date. I think the bean-query is really amazing thing! On Tuesday, June 9, 2020 at 11:18:30 AM UTC+2, Martin Michlmayr wrote: > > * Chary Chary <[email protected] <javascript:>> [2020-06-09 01:58]: > > is this correct, that beancount does not have possibility to convert > > to commodity (currency) at a historical rate (at a rate, which > > commodity had at a date of transaction)? > > Someone might have a bette answer but... if you do a simple conversion > (@@), beancount doesn't keep track of the date or the rate. If you > want to keep the historical rate around, you have to use a cost, i.e. > the 10.00 EUR {1.13 USD} syntax, and then you can use SUM(COST(position)) > to get the historical cost. > > I'm not sure if there's a better way. > > I'm sure someone will mention "trading accounts" as a solution but I > don't know how they work. > > -- > Martin Michlmayr > https://www.cyrius.com/ > -- 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 on the web visit https://groups.google.com/d/msgid/beancount/9dc8ac51-eefa-4abd-aeaa-de48d6036647o%40googlegroups.com.
