Jeff Bezos, Chairman and CEO of Amazon, speaks at the George W. Bush Presidential Center's Forum on Leadership in Dallas, Texas, U.S., April 20, 2018. Rex Curry | Reuters

As investors dumped tech stocks in the fourth quarter of 2018 on concerns of rising interest rates, an emerging trade war with China and a looming government shutdown, Amazon followed suit and loaded up on low-risk government bonds. Amazon increased its U.S. government and agency securities holdings by a record $6.8 billion in 2018, ending the year with $11.7 billion worth of the debt, the most ever, according to the company's annual report. That's more than double the amount Amazon had in the previous year and the most as a percentage of total cash, equivalents and marketable securities (28 percent) since 2010. "Any time there is uncertainty in the market, putting excess cash into 'risk-free' investments seems like a prudent business decision," said W. Brooke Elliott, an accounting professor at the University of Illinois at Urbana-Champaign. The category of government and agency securities includes Treasury notes, like two-year and 10-year bonds, and securities issued by government-sponsored enterprises like Fannie Mae and Freddie Mac. Amazon has historically allocated a much lower portion of its available cash to government debt than have tech rivals like Google and Facebook, which put roughly half their cash and short-term investments in U.S. government securities, and Microsoft, which committed 80 percent to Treasurys and agency notes last year.

But 2018 was unique for Amazon because the company more than tripled its net profit to over $10 billion, producing an unusually large amount of money to invest. Its $41 billion in cash and short-term investments at the end of 2018 was seventh most among nonfinancial companies in the S&P 500 companies, according to S&P Global Market Intelligence. Operating cash flow improved last year from $18.4 billion to $30.7 billion, in large part due to slower spending. The bulk of Amazon's purchases of government and agency securities came late in 2018, coinciding with the most tumultuous part of the year for the stock market and broader economy. During that period, Amazon only moderately increased its purchase of equity securities, corporate debt and asset-backed securities. That points to some pessimism about corporate performance in certain sectors, said Anup Srivastava, an accounting professor at Dartmouth's Tuck School of Business. "Arguably, Amazon expects higher corporate turmoil than is currently priced in corporate securities," Srivastava said. An Amazon spokesperson declined to comment. Parking cash in relatively safer government-related debt reduces risks for Amazon as it gears up for what's expected to be another heavy investment cycle. The company continues to build out its network of data centers for Amazon Web Services and plans to start staffing up at HQ2 this year. Finance chief Brian Olsavsky hinted during the company's earnings call this month that investments could increase in 2019. There was another reason for Amazon to buy more government debt: rising rates. The yield on the 10-year climbed to 3.2 percent in October and November from 2.7 percent in April, and the two-year yield reached close to 3 percent, after hovering just above 2 percent early in the year.

Source: CNBC