Hi Martin, Does Beancount have something like ledger's -X option? It is absolutely a must for me and it has to be able to traverse through several intermediate currencies/commodities. Example: My main currency is EUR but I invest in USD and have stock prices in USD but then I need to have grand total reports in EUR.
On Wed, Nov 18, 2015 at 9:26 PM, Martin Blais <[email protected]> wrote: > On Mon, Nov 16, 2015 at 4:15 AM, Metin Akat <[email protected]> wrote: > >> Hello and thanks for ledger - it's a great piece of software >> >> I have mostly completed my migration from gnucash, including the fancy >> charts (a custom script that parses the outputs of "reg" and inserts them >> into canvas.js >> But for my last report, I run into problems: >> >> ledger -M reg ^Assets -X EUR --format "%d,%a,%t\n" >> >> This prints "changes" of assets on monthly basis. >> Then my custom script parses the CSV and does things like account >> collapsing (to a different level for different charts) and a running total >> (current value of my assets). >> This is all good and I get a very good picture (which is also exact) for >> the grand total of my assets. >> I use "stacked column charts". Here is a good example of what it looks >> like: >> http://canvasjs.com/docs/charts/chart-types/html5-stacked-column-chart/ >> > > Not Ledger, but have you seen these scripts? > > https://bitbucket.org/blais/beancount/src/b79e9b230a16/experiments/compensation/?at=default > > > > Here is the problem though. >> >> All of my assets get reported with their "original" prices and the plot >> is really boring (they don't change over time). >> On top of that I get quite a big "<Adjustment>" lump which brings the >> running total to the correct value, but the adjustment is summed together >> for all the assets. >> >> What I'd like to be able to do is either: >> >> 1. Report the "projected to current prices" change of each account and no >> <Adjustment> entry at all >> > > This is called the "market value". > > > >> 2. Have a separate <Adjustment> per account. Then I can sum this with my >> "original" asset value. >> > > These adjustments are called "unrealized gains". > This is one of the methods to report market value in Beancount, by > inserting auto-generated transactions which reflect the gains to the > balance sheet: > > https://bitbucket.org/blais/beancount/src/tip/src/python/beancount/plugins/unrealized.py?at=default > > > > Both of these would work equally good for me. >> Is there a way to achieve it? >> > > I don't know in Ledger, but in Beancount I provide modules to deal with > this, look for the datatype Holding: > > https://bitbucket.org/blais/beancount/src/b79e9b230a166734f5a2021a88f1e60cc0d28c57/src/python/beancount/ops/holdings.py?at=default&fileviewer=file-view-default > > And reports: > > https://bitbucket.org/blais/beancount/src/b79e9b230a166734f5a2021a88f1e60cc0d28c57/src/python/beancount/reports/holdings_reports.py?at=default&fileviewer=file-view-default > > (Note: If you end up looking at the code in detail, please note I have > some deep changes in-flight that will unify the Holding datatype with the > Position datatype and simplify the API substantially. In branch "booking". > Needs a few months more work to get merged, maybe Xmas time.) > > There's also an exporter to a Google Finance compatible OFX format, so you > can monitor your portfolio intra-day. > (It has a few caveats, notably around investment durations, but I'm > working on addressing those. > Tracking investments is something I personally use daily and care much > about.) > > > -- > > --- > You received this message because you are subscribed to the Google Groups > "Ledger" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- --- You received this message because you are subscribed to the Google Groups "Ledger" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
