Daily Time-Weighted Returns with Intraday Cash Flows
Summary
The document asks how to calculate daily time-weighted returns for individual securities when trades occur during the day. The proposed calculation divides daily profit and loss plus dividends by the prior day’s price multiplied by the prior holding quantity. The questioner observes that this produces a misleading performance figure on trading days, even when the profit and loss itself is correct.
The reply says the denominator is incorrect and should include the initial portfolio value plus the period’s cash flow. This points to the need to account for external cash flows when measuring time-weighted performance, so purchases and sales do not distort the return attributed to investment performance. The exchange provides only a brief correction and a reference; it does not define the cash-flow sign convention, timing assumptions, treatment of fees, or the full return-linking procedure. Those details must be settled before implementing the calculation in a portfolio system.
Key ideas
- A return formula based only on prior holdings can misstate performance on days with trades.
- The response says to use starting value plus the period’s cash flow in the denominator.
- Time-weighted return calculations need to handle cash flows explicitly to separate trading activity from investment performance.
- The brief answer does not specify cash-flow conventions or a complete daily calculation method.
Tags
Full text
# Calculate the True daily Time Weighted Return
# Calculate the True daily Time Weighted Return
I have an access database with records of securities in my portfolio as well as my trades for each security.
My aim is to calculate the "Daily Time Weighted Return" then down the line, export it and with a second program, geometrically chain-link for a desired period.
I have tried to implement the following formula to calculate the TWR for each security:
In VBA I replicated this in the following way:
```
Day_Return = (Day_PNL + Day_Dividends) / (Previous_Days_Price * Previous_Days_Holding_Qty)
```
What I've noticed is that should I trade a stock during the day, the performance calculation will be incorrect even though the actual P&L is fine.
Could someone help me understand where i'm going wrong, or how I can change my calculation/logic so that performance reflects not only the static performance from one day to the next but also the performance on buys/sells?
Any help will be greatly appreciated, including tips on reengineering this question or clarifying anything. Thank you.
## Answer by dingaglin (score 1)
https://quant.stackexchange.com/a/80546
That's the wrong formula. The denominator should be $v_{i_0} + CF_i$
ref: https://en.wikipedia.org/wiki/Time-weighted_returnShown 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.