Saturday, November 13, 2010

John Wiegley's ledger program

.ledgerrc

Here are some notes about the .ledgerrc file.

In v2.6.1, there seems to be a bug in that Ledger does not expand tildes for prices-db. So do not write
--price-db ~/docs/ledger/prices.dat
Instead, write the full pathname, e.g.
--price-db /home/mcarter/docs/ledger/prices.dat

Commodities

"Commodities" is a term that Ledger uses that also encompasses equities and mutual funds/OEICs/unit trusts, etc.. Writing commodoties in Ledger can be a bit of a problem. Here's some tips to get you going.

N - suppresses commodity quotes

If your native currency is not $, then Ledger has a habit of trying to download it as a commodity. To prevent this, put the following line in your ledger data file:
N £
Substitute for £ whatever happens to be your currency.

@@ - total cost

Using @ specifies the unit price at which a commodity is purchased. @@ specifies the total cost of the purchase. E.g.

2008/11/08 * Buy some Apple shares

  Assets:Equity:Portfolio    1000 APPL @@ $2000.00
  Bank

 symbol quoting

If you are in the UK, then you may have to qualify the symbols you give. For example, Glaxo shares have the code GSK.L - you can't just use GSK. The dot confuses Ledger, so you should quote the symbol, thusly:

2008/11/08 * Buy some Glaxo shares

  Assets:Equity:Portfolio    1000 "GSK.L" @@ £2000.00
  Bank

OEICS often have digits in them, which also confuses Ledger unless you double-quote them. For example, Fidelity Managed International has the Yahoo code GB0003860789GBP, which you will need to quote:

2008/11/08 * Buy some Fid Man Intl shares
  Assets:Equity:Portfolio    1000 "GB0003860789GBP" @@ £2000.00
  Bank


See also

build - instructions for various platforms
tacc - my Tcl extensions to John Wiegley's program.

Links to external sites

clacct - command-line accountant. It doesn't look particularly powerful, and hasn't been updated since 2003.
CSV2Ledger - reads a CSV file and outputs it in Ledger format. It is useful for converting data from financial institutions into your Ledger. Forum - official place to discuss the program
eqonomize - personal accounting software for KDE. Include securities handling.
Ledger - main webpage to the Ledger program
Projects tagged 'accounting' - Ohloh's list of alternative accounting software you might like to try

No comments: