partial support for commission syntax?

30 views
Skip to first unread message

Eric Altendorf

unread,
Aug 18, 2023, 4:34:20 PM8/18/23
to bean...@googlegroups.com
I was studying the beancount booking and interpolation code and tests, and came across a test case featuring this syntax, which I don't recall seeing in docs or discussions:

2015-10-02 *
  Assets:Account       10 HOOL {100.00 # 9.95 USD}
  Assets:Other   -1009.95 USD 

...which looks like a notation for commissions, and is part of a (presumably) passing unit test.

Is this actually supported/working?

Martin Blais

unread,
Aug 18, 2023, 4:57:47 PM8/18/23
to Beancount
This works and is not about commissions per se, what it is is a combined {per unit # per posting} syntax for cost. If you have 3 units, {100 # 3} is a per unit cost of 101 per share unit.

Have you tried playing with bean-doctor?

--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/CAFXPr0tU02LrgSKDYCxGC5rkfSSGmpFrEgqPjeAKbuSVMRwx2w%40mail.gmail.com.

Eric Altendorf

unread,
Aug 18, 2023, 5:36:32 PM8/18/23
to bean...@googlegroups.com
On Fri, Aug 18, 2023 at 1:57 PM Martin Blais <bl...@furius.ca> wrote:
This works and is not about commissions per se, what it is is a combined {per unit # per posting} syntax for cost. If you have 3 units, {100 # 3} is a per unit cost of 101 per share unit.

Ohhh, I see.  That's handy.  As I mentioned on the other thread I ended up manually implementing this per-posting-to-per-unit conversion in my importer.  I don't see mention of this syntax either on the syntax documentation page or the trading commissions page (in fact, the trading commissions page explicitly says that such a syntax hasn't been developed yet)...  Is there a way for the community to contribute to  documentation maintenance?


Have you tried playing with bean-doctor?

Only a bit.  Yeah, I could have plugged this into bean-doctor and seen what it says.

FWIW this isn't my main point of interest, I just saw it offhand as I was studying the code.  I am trying to understand the imputation code to see how naturally it would handle imputing the cost basis of an augmentation leg on a (account1: reduction, account2: augmentation) "transfer" transaction.  So far it seems like it shouldn't be too hard......

 

On Sat, Aug 19, 2023, 05:34 Eric Altendorf <erical...@gmail.com> wrote:
I was studying the beancount booking and interpolation code and tests, and came across a test case featuring this syntax, which I don't recall seeing in docs or discussions:

2015-10-02 *
  Assets:Account       10 HOOL {100.00 # 9.95 USD}
  Assets:Other   -1009.95 USD 

...which looks like a notation for commissions, and is part of a (presumably) passing unit test.

Is this actually supported/working?

--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/CAFXPr0tU02LrgSKDYCxGC5rkfSSGmpFrEgqPjeAKbuSVMRwx2w%40mail.gmail.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 beancount+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages