Chart from Morgan Stanley:
More info on NBER’s business cycle dating procedure: www.nber.org/cycles/recessions_faq.html
Edit: Just to clarify, the NBER announces the recession by identifying the peak month (i.e. the end of the previous expansion and the start of the recession). This occurs several months after that peak month.
For example, the NBER officially called the previous recession in December 2008, by identifying December 2007 as the peak month. Just like in most previous recessions, the time of their announcement was a pretty good time to buy.