On Mon, 14 Sep 2015 at 03:39 Michael Toomim <[email protected]> wrote:

> I need a FIFO algorithm to calculate capital gains. Since ledger doesn't
> support this,
>

I'm not sure what you mean, have you seen this section of the manual?
http://ledger-cli.org/3.0/doc/ledger3.html#Commodity-prices

Ledger doesn't explicitly do FIFO cost basis calculations, but if you
maintain each "lot" of a commodity that you buy, you can specify that lot
when selling and Ledger can calculate the gains automatically. (I *think*
that ledger may assume a FIFO order when you sell a commodity, but I'm not
positive.)


> *2. Exporting all csv data to python*
> So maybe I can just filter transactions from python. Unfortunately, the
> csv export still exports postings, and I need to see them grouped by
> transaction.
>
> For instance, these transactions:
>
> 2014-1-1 bought food
>     Expenses:food    $4
>     Assets:cash
>
> 2014-1-1 bought food
>     Expenses:food    $4
>     Assets:cash
>
>
Are these examples of the assets that you'd like to calculate capital gains
for, or just examples for the CSV export?

-- 

--- 
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.

Reply via email to