Hi folks, I'm getting into ledger-cli a bit more, and I have started to put together some scripts for use with ledger-cli. I hope to add a test suite and so forth in due course.
You can check tacc out from here: http://github.com/blippy/tacc/tree/master EXAMPLE 1: You can work out internal rates of return with a command like: tclsh acc.tcl "set-gopt END 2008/06/31 ; puts [flow-stats [wif-stdin]]" << EOF 2008/01/01 -100.00 2008/12/31 160.00 EOF which will give an output of IRR% 60 CRR% 26 PROFIT 60.00 This shows the IRR and profit for the flows. The CRR is a "current rate of return", which is a return based on the current calendar period. EXAMPLE 2: Or, with a simple change in the command arguments, you can hook it in with ledger: tclsh acc.tcl "puts [flow-stats [get-ledger-flows $MyEquityAccount]]" and obtain details of the performance of your portfolio. PROGRAMMABILITY: It's all just valid Tcl, so you can perform queries interactively by sourcing acc.tcl, or write your own scripts when the command-line gets too bloated. Enjoy.
