beanquery to get net worth at certain date

2024-04-28 Thread Chary Chary
Dear all,

I just want to double check, that the beanquery I am using to get my net 
wort at certain date is an optimal one

I use the following:

query = f"""
SELECT account, convert(SUM(position),'{currency}',{date_iso}) as amount
where date <= {date_iso} AND account ~ 'Assets|Liabilities'
"""

As you can see, I convert everything to one currency with the exchange rate 
at the date of the report.

it works fine, but I am just wondering whether there is more conical way? 
E.g. using 

BALANCES [AT ] [FROM …]
 

-- 
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/a2c38db0-f814-4541-9f3e-cd05c025398dn%40googlegroups.com.


Re: Introducing Beanpost: A PostgreSQL-Based Experiment for Beancount Users

2024-04-28 Thread Martin Blais
It's not pedantic, it's totally needed at some point
It would be nice to be able to generate accurate statements from both sides
of these transactions.


On Sat, Apr 27, 2024 at 4:59 AM Brian Lalor  wrote:

> Yes, that’s the one! I might be a bit overly pedantic about setting the
> effective date, but it helps reconciling transactions with my bank.
> --
> Brian Lalor (he/him)
> bla...@bravo5.org
>
> On Apr 26, 2024, at 10:58 PM, b...@gerdemann.org wrote:
>
> 
>
> On Apr 26, 2024, at 1:53 PM, Brian Lalor  wrote:
>
>
> There’s a plugin that adds processing for an effective_date field. Maybe
> part of Reds’ suite? I use this extensively. Maybe worth exploring and
> adding explicit support for?
>
>
>
> Hi Brian,
>
> Thanks for sharing this! I wasn't aware of this plugin. Are you referring
> to this one (
> https://github.com/redstreet/beancount_reds_plugins/tree/main/beancount_reds_plugins/effective_date#readme)?
> Beanpost already supports importing and exporting metadata, so it wouldn’t
> be hard to implement this syntax.
>
> However, unlike Beancount, Beanpost doesn't require transactions to occur
> at a specific point in time. This can lead to a situation where money
> "disappears" from your assets while "in transit" between accounts. While
> this is somewhat closer to reality, it might not always be what you want.
> In this case, you could create manual holding transactions, like in the
> example.
>
> Beanpost doesn't have "plugins” yet to do things like this automatically,
> but it's something to consider for the future.
>
> To be honest, I didn't think much about allowing postings to have their
> own dates when I implemented it. This change could be undone if it causes
> more confusion or problems than it solves, but I have seen this feature
> requested for Beancount a few times.
>
> Best regards,
> Ben
>
> --
> 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/5BAF897D-5F22-40FE-B58D-E15D9D404BD5%40gerdemann.org
> .
>
> --
> 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/3A1E6703-508D-4051-87F9-1A51A44AF438%40bravo5.org
> 
> .
>

-- 
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/CAK21%2BhMSJ1x8wXwKUJkgMq%2B_ZmcLL_qAbSFL8ep9-ZUthn1Ctg%40mail.gmail.com.