Issue #417: Allow negative prices (blais/beancount)

31 views
Skip to first unread message

Javier

unread,
Jan 26, 2020, 5:09:04 AM1/26/20
to bean...@googlegroups.com
New issue 417: Allow negative prices
https://bitbucket.org/blais/beancount/issues/417/allow-negative-prices

Javier:

Could negative commodity prices be allowed? Some financial assets/contracts, like swaps, may have a negative entry price.



For instance, allow negative prices for the following asset-class



```
2020-01-01 commodity SWAP-T10
asset-class: "swap"

; Should not throw any warning
2020-01-01 * "Enter swap"
Assets:Broker:SWAP-T10 1 SWAP-T10 {-1234.56 USD,
2020-01-01} @ -1234.56 USD
Assets:Broker:USD 1234.56 USD
```




soubra

unread,
Jan 27, 2020, 6:02:01 PM1/27/20
to Beancount
Would this not work for you?

```

2020-01-01 commodity SWAP-T10
  asset-class: "swap"

; Should not throw any warning
2020-01-01 * "Enter swap"
    Assets:Broker:SWAP-T10     -1 SWAP-T10 {1234.56 USD,
2020-01-01} @ 1234.56 USD

    Assets:Broker:USD          1234.56 USD
Reply all
Reply to author
Forward
0 new messages