Facebook CEO Mark Zuckerberg speaks during the F8 Facebook Developer Conference on April 30, 2019 in San Jose, California.

Justin Sullivan | Getty Images

Facebook, Alphabet, and Microsoft stocks each hit all-time highs on Monday as investors turned away from cyclical stocks and returned to growth.

Facebook rose up to 4% and closed 3.4%. Alphabet closed 4.2% after gaining 4.6%, while Microsoft closed 2.8%. It was even up 3.1%.

The gains were driven by general market sentiment, fueled by strong US employment growth last month. The tech-heavy Nasdaq Composite gained 1.7% while the Dow Jones Industrial Average rose 373.06 points to an all-time high.

The colleagues from the technology companies were also strengthened early Monday. Apple’s shares rose 2.6% while Amazon rose 2.4%.

Tesla continued to have production and delivery numbers that far exceeded expectations. The company’s stock rose up to 7%.

The alphabet was also likely improved after the Supreme Court sided with Google versus Oracle in a longstanding copyright battle over the software used in Android. Morgan Stanley wrote in a note Monday that its analyst Brian Nowak said the Google parent company was “a preferred choice with EBITDA ~ 13x ’22 with multiple positive drivers – Dark Horse Travel Trade, rising YouTube trends, continuing Google Cloud Platform top line traction and potential margin up with Opex discipline. “

Subscribe to CNBC on YouTube.