Skip to content
All library documents

Using Internal Rate of Return for Trades with Unequal Holding Periods

Article Quant Q&A · Author: user1130176

Summary

The document addresses how to summarize a sequence of trading gains and losses when positions occupy capital for different lengths of time. It recommends using the internal rate of return (IRR) on actual dollar cash flows rather than averaging return per day. Days without transactions should be represented in the cash-flow timeline. If cash flows alternate between outflows and inflows more than once, the IRR equation can have multiple roots, so candidate roots need to be checked; a software routine may return only one root. Modified IRR is mentioned as an alternative that assumes a specified reinvestment rate.

The response distinguishes realized performance from opportunity cost. IRR can reflect cash interest or margin costs through the cash balance, but it cannot capture every foregone investment because alternatives and available rates differ by investor. Opportunity costs should be estimated prospectively as hurdle rates, then compared with realized outcomes. The discussion does not provide a worked calculation for the sample holdings or settle how to model risk-adjusted alternatives, so IRR is a cash-flow performance measure rather than a universal opportunity-cost adjustment.

Key ideas

  • Unequal holding periods call for a cash-flow measure such as internal rate of return rather than an average of daily returns.
  • Use actual dollar cash flows across the timeline, including zero-flow days.
  • Multiple switches between inflows and outflows can produce multiple IRR roots that require checking.
  • Modified IRR assumes a reinvestment rate.
  • Opportunity cost depends on the investor’s available alternatives and is best treated prospectively as a hurdle rate.

Tags

Full text
# How to compute estimate performance with variable returns and days held


# How to compute estimate performance with variable returns and days held












I have a trading strategy that results in a number of holdings, each of which has a variable number of days held, and obviously, return. So, for example, suppose I run a Monte Carlo simulation, and on average I get the following holdings:

```
return: 0.01, days held: 5
return: -0.005, days held: 10
return: 0.04, days held: 2
return: 0.002, days held: 7
```

Assuming that each holding has a fixed percentage of capital allocated to it, how would I go about computing an estimated annual yield, assuming a fixed amount of cash. You can see, for example, that the 2nd holding not only loses money, but it also holds up capital for 10 days. It's not sufficient to simply compute return / day and average them, because of this opportunity cost implication.

Is there an analytical solution to this computation?

## Answer by Dave Harris (score 1)

https://quant.stackexchange.com/a/39244

You are looking for the internal rate of return. You do have to be careful with it because there will be one root for every time a cash flow switches from an outflow to an inflow and back so if you had an outflow followed by an inflow followed by an outflow you may have two roots. If that is the case, you have to test both roots. You would use the actual dollar values and not returns. Days with no transactions would have zeros. Don't use an inbuilt function such as IRR in Excel as it is not guaranteed to be the true IRR, but instead the first root it found. It runs a search routine and offers you the chance to guess.

You can also do the modified internal rate of return, which assumes you have a fixed reinvestment rate.

EDIT There is no automatic algorithm to account for opportunity costs because there cannot be a market for opportunity costs as they are the things you did not do. In the absense of transactions, no market could form. Additionally, opportunity costs are purely subjective.

By chance, I used to belong to a credit union that happened to have the highest deposit rates in the United States of any financial institution as observed by Bank Rate Monitor in a particular set of weeks. As I was a member, my "risk free" rate was higher than almost any person in the US as it is backed by the full faith and credit of the United States. Unless you happened to live in that county, as it was a geographic credit union, then you could not avail yourself of those rates. As they happened to sit near the corprate investment grade bond rates, it was illogical for me to buy corporate bonds, up to the limit allowed. For a person in a low rate region, their opportunity costs are different.

Likewise, if one of your opportunities is a particular piece of real estate, most individuals will not have those same choices.

Even if, somehow, your opportunity costs were limited to traded assets, you could not use realized returns to measure your opportunity costs as you did not know them at the time you made your choice. You would have to perform estimates on your alternatives and then measure your excess gain given the change in risk.

Now, if your cash investments receive interest or you pay on margin, then the IRR will carry your opportunity costs in it in the implicit change in the amount of cash available at crediting dates. It will not fully reflect your total set of subjective opportunity costs.

You do need to remember, opportunity costs are forward facing and not retrospective. You should be calculating your opportunity costs before the transaction happens.

If you are working prospectively, then your hurdle rate should be your opportunity cost. You can then compare the realizations to your planned rate.

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.