Hi, after learning about the virtues of trading accounts, I'm thinking about using them in my journal, because I cannot find any other way to track currency exchange gains and losses. But I've found that cash flow reports do not make much sense (to me).
Consider the following example from an old thread: http://thread.gmane.org/gmane.comp.finance.ledger.general/1652 -----------8<-----------8<-----------8<----------- 2011/01/01 Opening balance Assets:Canadian_Cash 200 CAD Equity:Initial_Capital 2011/01/02 Exchange Assets:Canadian_Cash -120 CAD Assets:US_Cash 100 USD Income:Currency P 2011/01/03 USD 1.30 CAD 2011/01/03 Buy food Assets:US_Cash -40 USD Expenses:Food 40 USD {= 1.3 CAD} Income:Currency 2011/01/05 Exchange Assets:US_Cash -60 USD Assets:Canadian_Cash 75 CAD Income:Currency 2011/01/07 Buy food Assets:Canadian_Cash -20 CAD Expenses:Food P 2011/01/08 USD 1.45 CAD -----------8<-----------8<-----------8<----------- The following command ledger bal --collapse --dc --related canadian_cash produces this output: 100 USD 60 USD 40 USD Assets 0 200 CAD -200 CAD Equity 20 CAD 0 20 CAD Expenses 120 CAD 75 CAD 45 CAD Income -------------------------------------------- 140 CAD 100 USD 275 CAD 60 USD -135 CAD 40 USD whereas I think I should see something like this: 100 USD 60 USD 40 USD Assets 0 200 CAD -200 CAD Equity 20 CAD 0 20 CAD Expenses -------------------------------------------- 20 CAD 100 USD 200 CAD 60 USD -180 CAD 40 USD which is what I get from the “naïve” version of the example above: -----------8<-----------8<-----------8<----------- 2011/01/01 Opening balance Assets:Canadian_Cash 200 CAD Equity:Initial_Capital 2011/01/02 Exchange Assets:Canadian_Cash -120 CAD Assets:US_Cash 100 USD P 2011/01/03 USD 1.30 CAD 2011/01/03 Buy food Assets:US_Cash -40 USD Expenses:Food 52 CAD 2011/01/05 Exchange Assets:US_Cash -60 USD Assets:Canadian_Cash 75 CAD 2011/01/07 Buy food Assets:Canadian_Cash -20 CAD Expenses:Food -----------8<-----------8<-----------8<----------- How do you generate cash flow reports with trading accounts? And I have another related question: what is the difference between {=X} and @=X? They are not functionally equivalent, as the documentation says. For example, why are the following two cash flow reports different? To me, only the second seems correct. -----------8<-----------8<-----------8<----------- 2013/10/01 Opening Assets:Checking 100,00 EUR Equity:Opening 2013/10/02 Make fuel Expenses:Car:Fuel 200,00 LTL Assets:Checking -58,34 EUR {=3,4538 LTL} Income:Currency -----------8<-----------8<-----------8<----------- ledger bal --collapse --dc --related checking 0 100,00 EUR -100,00 EUR Equity 200,00 LTL 0 200,00 LTL Expenses 58,34 EUR 0 58,34 EUR Income -------------------------------------------- 58,34 EUR 200,00 LTL 100,00 EUR -41,66 EUR 200,00 LTL -----------8<-----------8<-----------8<----------- 2013/10/01 Opening Assets:Checking 100,00 EUR Equity:Opening 2013/10/02 Make fuel Expenses:Car:Fuel 200,00 LTL Assets:Checking -58,34 EUR @=3,4538 LTL Income:Currency -----------8<-----------8<-----------8<----------- ledger bal --collapse --dc --related checking 0 100,00 EUR -100,00 EUR Equity 200,00 LTL 0 200,00 LTL Expenses 1,49 LTL 0 1,49 LTL Income -------------------------------------------- 201,49 LTL 100,00 EUR -100,00 EUR 201,49 LTL Life -- --- 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/groups/opt_out.
