How to deduct a tax rebate from an roi calculation?

23 views
Skip to first unread message

Nea Zăpadă

unread,
Mar 31, 2023, 8:34:33 AMMar 31
to hledger
Hi,

I'm trying to figure out how to make the roi calculation discount a tax rebate. Say I make a $1000 investment into some tax advantaged investment vehicle. Then my tax authority returns 20% of that, so I get $200. I want the Cashflow to show as $800, because that's the amount that I'm actually risking on that investment. I've taken out the $200 and used it for something else. The value of my investment should still be $1000.

I've tried a few things, but here's an example:


2023/01/01 invest
    Assets:Cash
    Assets:Pebbles                          USD 1000

2023/05/01 tax rebate
    Assets:Cash                              USD 200
    Income:Tax Rebate

2023/07/01 investment income
    Assets:Pebbles                           USD 100
    Income:Pebbles

$ hledger -f example.journal roi --inv Assets:Pebbles --pnl Income:Pebbles
+---++------------+------------++---------------+----------+-------------+---------++--------+--------+
|   ||      Begin |        End || Value (begin) | Cashflow | Value (end) |     PnL ||    IRR |    TWR |
+===++============+============++===============+==========+=============+=========++========+========+
| 1 || 2023-01-01 | 2023-07-01 ||             0 | USD 1000 |    USD 1100 | USD 100 || 21.06% | 21.06% |
+---++------------+------------++---------------+----------+-------------+---------++--------+--------+

In the report above, I'd like Cashflow to be USD 800 and Value (end) to be USD 1100.

What can I change either in the way I'm recording the transactions or the report command in order to get those values?

Thanks!

Simon Michael

unread,
Oct 6, 2023, 12:48:42 AMOct 6
to hle...@googlegroups.com
We never answered this roi question.. would anyone have an idea ?


On Mar 31, 2023, at 13:34, Nea Zăpadă <prinz...@gmail.com> wrote:


--
You received this message because you are subscribed to the Google Groups "hledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hledger+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hledger/b77091f2-5937-4501-8311-fd539c3db8e0n%40googlegroups.com.

the.so...@gmail.com

unread,
Oct 6, 2023, 3:48:07 AMOct 6
to hledger
I don't use ROI, but would it help to include the tax rebate in the same transaction?

That is:

2023/01/01 invest
    Assets:Cash
    Assets:Pebbles                          USD 1000
    Assets:Cash                              USD 200  ; date:2023/05/01
    Income:Tax Rebate

the.so...@gmail.com

unread,
Oct 6, 2023, 3:49:56 AMOct 6
to hledger
Also, should the 'rebate' accounted for as income?  Or is it just a reduction in your tax expense?  (I'd imagine the latter, so I'm a bit surprised to see it being accounted for as the former.)

Dmitry Astapov

unread,
Oct 6, 2023, 3:07:12 PMOct 6
to hle...@googlegroups.com
If the investment vehicle is tax-incentivized, then surely the incentive is added to your investment and not directly to your cash?

How about this:

$ cat pebbles.journal
2023/01/01 invest
    Assets:Cash
    Assets:Pebbles                          USD 1000

2023/05/01 tax rebate
    Assets:Pebbles                          USD 200

    Income:Tax Rebate

2023/07/01 investment income
    Assets:Pebbles                          USD 100
    Income:Pebbles

$ hledger -f pebbles.journal roi --inv Assets:Pebbles --pnl 'Income:(Pebbles|Tax.Rebate)'                                                           +---++------------+------------++---------------+----------+-------------+---------++--------++------------+----------+
|   ||      Begin |        End || Value (begin) | Cashflow | Value (end) |     PnL ||    IRR || TWR/period | TWR/year |
+===++============+============++===============+==========+=============+=========++========++============+==========+
| 1 || 2023-01-01 | 2023-07-01 ||             0 | USD 1000 |    USD 1300 | USD 300 || 69.24% ||     30.00% |   69.24% |
+---++------------+------------++---------------+----------+-------------+---------++--------++------------+----------+

Here tax rebate is accounted for as your profit (for the purpose of pnl / irr computation), and generous IRR/TWR reflects the fact that the tax authority is giving you immediate 20% return on your investment.




--
D. Astapov

Nea Zapada

unread,
Oct 9, 2023, 11:15:21 AMOct 9
to hle...@googlegroups.com

Hey,

The tax incentive is added to my cash account. I claim that back at the end of the year and it does not touch any of my investment accounts. I can then also use it immediately for another investment for example. Also, just to explain my motivation for calculating things this way, I'd like to be able to compare the ROI of a tax-advantaged investment with one that isn't tax advantaged.

Interestingly, the following actually gives me what I want in terms of Cashflow and Value (end), although it doesn't fully make sense to me because, like I said, the tax rebate doesn't touch the investment account in reality:

$ cat pebbles.journal
2023/01/01 invest
    Assets:Cash
    Assets:Pebbles                          USD 1000

2023/05/01 tax rebate
    Assets:Pebbles

    Income:Tax Rebate                       USD -200
    Assets:Cash                              USD 200



2023/07/01 investment income
    Assets:Pebbles                           USD 100
    Income:Pebbles

$ hledger -f pebbles.journal roi --inv Assets:Pebbles --pnl Income

+---++------------+------------++---------------+----------+-------------+---------++--------+--------+
|   ||      Begin |        End || Value (begin) | Cashflow | Value (end) |     PnL ||    IRR |    TWR |
+===++============+============++===============+==========+=============+=========++========+========+

| 1 || 2023-01-01 | 2023-07-01 ||             0 |  USD 800 |    USD 1100 | USD 300 || 74.46% | 74.51% |
+---++------------+------------++---------------+----------+-------------+---------++--------+--------+

You received this message because you are subscribed to a topic in the Google Groups "hledger" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/hledger/jSQToLwVc98/unsubscribe.
To unsubscribe from this group and all its topics, send an email to hledger+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hledger/CAFQUnFhbY9W%3DnGgSQL8GF-Kvfq0PxYJPyEPXRQiNX9HnH30CEg%40mail.gmail.com.

Dmitry Astapov

unread,
Oct 9, 2023, 2:27:21 PMOct 9
to hle...@googlegroups.com
Well, even though it does not go into your Assets:Pebbles, you want to treat it as if it was, for the purpose of ROI computation. So perhaps the easiest way is to model it as passing through the Assets:Pebbles account, before hitting your cash account:

2023/01/01 invest
    Assets:Cash
    Assets:Pebbles                          USD 1000

2023/05/01 tax rebate
    Assets:Pebbles                          USD 200
    Income:Tax Rebate

2023/05/01 tax rebate -> cash
    Assets:Pebbles

    Assets:Cash                             USD 200

2023/07/01 investment income
    Assets:Pebbles                          USD 100
    Income:Pebbles
hledger -f pebbles.journal roi --inv Assets:Pebbles --pnl 'Income:(Pebbles|Tax.Rebate)'
+---++------------+------------++---------------+----------+-------------+---------++--------++------------+----------+
|   ||      Begin |        End || Value (begin) | Cashflow | Value (end) |     PnL ||    IRR || TWR/period | TWR/year |
+===++============+============++===============+==========+=============+=========++========++============+==========+
| 1 || 2023-01-01 | 2023-07-01 ||             0 |  USD 800 |    USD 1100 | USD 300 || 74.46% ||     32.00% |   74.51% |
+---++------------+------------++---------------+----------+-------------+---------++--------++------------+----------+

Reply all
Reply to author
Forward
0 new messages