this is how I view it: I always start with the perspective of "never sell." That's my default orientation. But then I look at the specific situation, and there are many factors to consider. @Manch Hon listed some very valid ones. Running out of depreciation may also be another factor, although I'm not there yet.
I'll add some other factors:
1- financing. Prior to 2008 it was easy to pull 90% cash out with low doc loans. So if you had quality properties that appreciated you gained little by selling. After 5% commissions and 1% transfer tax, I may as well not sell and take out a refi at 90% LTV. Of course those good ole days are gone, but I do see that lenders are loosing lending requirements on a regular basis, so it's getting easier to keep properties and leverage them, which is always my preferred modus operandi.
2- a 1031 exchange may work well. But keep in mind that in a competitive market, you need to be able to find an exchange property in the timeframe necessary. That is not always possible when the market is tight, and you may miss the best deals by not being able to be flexible with your offer. Maybe a reverse 1031 exchange would make things easier.
3- Since I view my investments more like SFH's (once my 2-4's are condo converted) my model is more like the SFH investor who keeps good homes in appreciating areas. It's different than multi unit buyers who at some point consolidate to buy a bigger building for better effencies, centralized management, etc.
4- but at the end of the day, to me it's always about proper leverage and future appreciation potential. That, and avoiding hassles. Selling is a major hassle, not to mention the SIGNIFICANT tax issues involved. Another challenge is keeping your balance sheet in check, and not sustaining major cash flow losses. Low doc loans are over, and I need to show good yearly income to get future loans, so that effects my willingness to take on major developments, which always show big losses.
5- Avoiding major developments (where you're sitting on an empty bldg. and relying on city planning approvals of 1+ years) is the biggest change in my strategy this RE cycle. We are also still in the early-mid cycle IMO, so I can still chase rehab-to-cash flow deals. But that will probably end soon when prices escalate further. My perspective on the cycle is: 2012-13 was early, 14-15 is mid, and 16-17 is late. Now we are seeing a lot of slower moving larger players buying and entitling big projects, and the Johnny comes lately investors starting to pay a premium. I wouldn't be surprised if next year is the last year to buy anything, but that depends on the supply/demand and appreciation rate in your specific market. To me at least, it looks like San Francisco prices have slowed down this year, after crazy increases in 2013. But let's see what the summer brings.