You probably know this already, but a query similar to this will give you 
the market value for a single point in time:
SELECT root(account, 3), convert(sum(position), "EUR", 2019-12-31) where 
date <= 2019-12-31 and account ~ "^Assets:Invest" 

You might need slightly different queries for your Banks and Pension 
accounts. Given all of that, the way I would produce the monthly graph is 
to write a very trivial python script to run this and your other queries 
and iterate across time. That will give you flexibility as you fine tune 
your report.

As for your “over-time asset group allocation”, beangrow 
<https://github.com/beancount/beangrow> is what I use for that. Rather than 
an asset allocation problem, I view it as a rate-of-return problem: how 
does my top-level rate-of-return (IRR) break down over my accounts and 
tickers? Is that what you are ultimately wanting, or did I perhaps not 
fully understand it?
​

On Monday, August 28, 2023 at 4:10:45 AM UTC-7 Denis I wrote:

> Hi all,
>
> a beancount newbie here. Given that I have a standard assets accounts 
> structure:
> - Assets:BankA:Checking EUR
> - Assets:BankB:Checking USD
> - Assets:BrokerA:APPL APPL
> - Assets:BrokerA:GOOG GOOG
> - Assets:BrokerA:... (more shares, some potentially sold and closed)
> - Assets:BrokerB:RSU
> - Assets:Pension CHF
>
> Is there a way to build a *monthly* graph that'd show *EUR* *market 
> values*:
> - a line per each bank account
> - a *single line per broker* - e.g. Assets:BrokerA and Assets:BrokerB
> - a line for Assets:Pension
> - (optionally) a line for total assets
>  
> What I tried:
>
> 1. Looking at extensions 
> like fava-dashboards, fava-portfolio-returns, fava_investor, beangrow - 
> these seem to offer either point-in-time asset allocation structure or a 
> single portfolio over time graph.
>
> 2. Custom query similar to `SELECT year, month, root(account, 2) as 
> account, convert(units(sum(position)), "USD") AS Market WHERE account ~ 
> "Assets:"` - the results do not sum up to the fava balancesheet report - I 
> think that in that case postings contribute only to the respective months 
> when they were done - which is not a full balance at a given month.
>
> 3. Hacking fava code - the "at market value" backend call returns 
> aggregated <date;currency;value> tuples, one could try to create fake 
> currencies like BrokerAUSD, but that'd require providing an explicit price 
> information for these (tying them to USD would aggregete them to USD in the 
> graph)
>
> At this point I suspect that such a graph does not make sense or not 
> useful for some (yet unknown to me) reason. My naive goal with such 
> over-time asset group allocation is to understand what contributed to the 
> growth/decline of my net assets over time - be it passive savings, 
> passive/active investments or etc. Is there a better way to achieve that?
>
>
>

-- 
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 beancount+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/017e09c1-d523-426d-bae0-b1b1c7488821n%40googlegroups.com.

Reply via email to