I am trying to calculate the IRR of an investment for YTD, 1 Year, 3 Years, and 5 Years using the trade buy and sell amounts as well as the dividends (that take place over various days during those time periods). The problem that I am having is that I am not using the investment start date and there is no investment end date because we are still invested in the stock. How would I go about calculating the IRR for those time periods if I been invested in the stock over 5 years and have not sold it yet.
First, just as a precautionary note it's important to point out that, with equities, the further out your projections are, the less you can count of them to remain accurate. Thing of firing an arrow at a target - if you're off by only 0.1 degrees, and the target is close, then you'll still hit the center. However, if you're off by 0.1 degrees, then you'll be further from center as the target gets further away. The same with equities - there are no models which are exactly perfect, and so the further away your estimated time horizon, the less accurate your calculations are going to be. For some equities, such as base consumer goods (i.e.: the figurative "soups, soaps, and cereals"), many companies maintain relatively steady dividends and growth rates, particularly for the large blue-chip companies like P&G, but eve they can surprise, however. If you're a long-term investor, the important thing is the value of the underlying stock, and whether your calculations indicate that it is under- or over-valued; whether the current stock price is calculated to be over or under the company value per share. If you're a trader (you're making investing decisions on market movements, rather than company valuation), then you shouldn't really be worried about long-term return calculations on a single equity, because you want to be more flexible in managing your portfolio. Again, just a precautionary note, since your approach to investing determines prudence of these sorts of calculations.
That being said, the method for calculating IRR for 1 year is the same as estimating IRR for 100 years. Bought and sold dates don't really matter, but you need to set clear start and end dates for the calculation. Basically, what you're really worried about isn't the amount of returns you've actually cashed-in, but you're realized return over a period of time. So, let's say you plan to own a stock at least between the years 2010 - 2110, but you're only concerned for the moment with your IRR between 2013 (now) and the year 2020. Well, you'd use your expected dividends rate and your expected equity value growth rate over that period, just as you'd normally use your bought and sold values. The actually act of buying and selling really doesn't matter as much as the change in value over that period of time.
Hopefully that helps.