Hi, I've been using Beancount to track trading activities. With "beancount.plugins.unrealized" plugin enabled, I can see a few special transactions inserted for unrealized PnL. The special transactions are always inserted as the last transactions in the journal.
I am wondering if there is a BQL or something to compute the unrealized PnL day-by-day. Id est, if I close the position on Nov 25, the PnL is X USD; if I close the position on Nov 26, the PnL is Y USD. I have tried: select date, account, position, balance from close on 2017-XX-XX clear where account ~ 'Unrealized'; but it does not work as expected. Is that because the plugin runs before the "CLOSE" syntax takes effect? Currently the only way I can think of, is to comment out / remove latest "price" entries from price database to force Beancount to compute unrealized PnL for a different date. -- Zhuoyun Wei -- 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 [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/20171201182525.GA30869%40xenien.wzyboy.org. For more options, visit https://groups.google.com/d/optout.
signature.asc
Description: PGP signature
