2017-12-09 22:39:56 Martin Blais <
bl...@furius.ca>:
> There's no way to do this right now, unless you resort to some Python (but it's doable with Python for sure, as long as
> you have frequent enough price directives, you have all the required data already).
Ah I see. I have enough price directives.
> See the net-worth-over-time.py script, for example.
>
Thanks for pointing out a way. I looked into the script, along with the
beancount.plugins.unrealized pluin, and wrote a quick script to compute
the unrealized PnL day by day. Here is the script for anyone with similar
needs:
https://gist.github.com/wzyboy/427808e3fab4e75eb4b007c530884132
The script is very crude: it does not consider your actual holdings on a
certain date (because I do not know how to get the balance of a commodity on a
certain date, efficiently). Instead, it just compares your current holdings
with the market value of your holdings on a certain date.
--
Zhuoyun Wei