In the spirit of conservatism (gives egoism a kick), I decided to try out a variation of 'smallcaps' suggestion as follows,
1 Jan 12 : + (Mkt Value of Stocks on 31 Dec11)
<Date> : <CashFlow>
31 Dec 12 : - (Mkt Value of Stocks on 30 Jun 12)
CashFlow = <Total SELL> + <Total DIV> - <Total BUY>
There are actually 4 different scenarios depending on your Profitabilty (Profit or Loss) + CashFlow (Net Inflow or OutFlow) and the <Date> will have to be adjusted to give a more conservative result.
Case 1 : Profitable Year
(a) <Total SELL> + <Total DIV> MORE THAN <Total BUY>
In this case, I'd use <DATE> = End Period eg. 31 Dec 12
(b) <Total SELL> + <Total DIV> LESS THAN <Total BUY>
In this case, I'd use <DATE> = Beginning Period eg. 1 Jan 12
Case 2 : Loss Year
(a) <Total SELL> + <Total DIV> MORE THAN <Total BUY>
In this case, I'd use <DATE> = Beginning Period eg. 1 Jan 12
(b) <Total SELL> + <Total DIV> LESS THAN <Total BUY>
In this case, I'd use <DATE> = End Period eg. 31 Dec 12
Hope I got the above right! Spending time to play around with this XIRR thingy is going to affect my real XIRR...
My thoughts on the 'conservertism' aspects of using XIRR. As posted by 'swakoo' and 'corydorus', it depends on what you are trying to measure or benchmark against.
In the 1st approach where I recognised all stocks related transactions (buy/sell/div) as cashflows and I don't have any cash balance at any one time, what I hoped to measure is Stocks Investment / Trading performance. Here, we're assuming a 100% efficiency usage of cash but which in real life, is unlikely possible.
This is where the conservative approach as suggested by 'smallcaps' comes in. I used a variation and computed a minimum 'Working Capital' from <Sell + Div - Buy> which I introduced as a cashflow item. Depending on whether you'd been making a Nett Profit or Loss, as described above, we can recognise this 'Working Capital' cashflow at the beginning or end of period for maximum conservativeness. You can also put it in the middle of the period if you want to tread on middle ground...
Still, we are kind of assuming a 100% efficiency in 'Working Capital' deployment here and which in real life is also unlikely. What happens to our other Free Cash while we wait for the ideal price to come along? Very likely, it's earning <1% bank interest in the bank.
For those who really wants to be super conservative or like in my case, I was wondering how well I'm managing my total assets, you may have to factor in this as an idle cashflow item. For eg. in my case, I tested it out by putting this 'Idle Cash' at both the beginning and end of period as opposite cashflow. An easier way is to just scale down the original XIRR with an 'Idle Cash' factor (in my case, I track my monthly cash balance and on average, ~5%, so, I could just use XIRR * 0.95).
So, ya, depends on what you're trying to measure, there're many variations. Ultimately, it ought to help us to better understand how and what we are doing, so that we can improve further... I hope!