POLL: do you use negative prices ?

21 views
Skip to first unread message

Simon Michael

unread,
Jun 9, 2022, 1:30:33 PM6/9/22
to hledger
In your data, do you have any negative transaction prices (costs), like:

2022-01-01
    a        A 1
    b        B 1 @ A -1

or negative market prices, like:

P 2022-01-01 B  A -1

?

Secondly, do you know of any reason to keep supporting them ? I'm wondering about disallowing them to simplify things and save time. Recent discussion for context:


Andreas Pauley

unread,
Jun 10, 2022, 5:21:11 AM6/10/22
to Hledger Group
Hi Simon,

I don't use negative prices, so personally I wouldn't mind if hledger only supported positive values.

Kind regards,
Andreas

Henning Thielemann

unread,
Jun 10, 2022, 6:16:55 AM6/10/22
to Hledger Group

On Fri, 10 Jun 2022, Andreas Pauley wrote:

> I don't use negative prices, so personally I wouldn't mind if hledger
> only supported positive values.

Forbidding negative prices can act as a safety measure.

Francesco Ariis

unread,
Jun 10, 2022, 6:25:10 AM6/10/22
to hle...@googlegroups.com
Il 10 giugno 2022 alle 12:16 Henning Thielemann ha scritto:
> Forbidding negative prices can act as a safety measure.

Indeed indeed, type safety.
I am very curious to see if there is even a single hledgerist using
negative prices in their workflow, for sure that is not me
—F

Simon Michael

unread,
Jun 10, 2022, 6:35:46 AM6/10/22
to hledger
I heard a few people in chat saying negative prices do actually exist/have possible uses, and in fact there's https://en.wikipedia.org/wiki/Negative_pricing

We do in fact currently support them basically correctly AFAICT, andhttps://github.com/simonmichael/hledger/issues/1870 is currently leaning towards continuing that.

Reply all
Reply to author
Forward
0 new messages