Fidelity Investments had a historic 2018, even as stock markets saw their worst performance in a decade.

For the first time in history, Fidelity's annual income topped $6 billion. It closed 2018 with a 19 percent increase in operating income, totaling $6.3 billion for the year. The Boston-based firm raked in a record $20.4 billion in revenue last year, a roughly 12 percent increase from a year earlier, according to Fidelity's annual report.

The results were helped by diversity in Fidelity's businesses as the firm made "extensive moves" to add product and service offerings across the retail brokerage, workplace benefits, and institutional investing, Fidelity chairman and chief executive Abigail Johnson said in a letter to shareholders.

The strong results highlight success of Fidelity's years-long effort to add new lines of business aside from just stock-picking.

"Fidelity's diverse group of businesses and broad set of investment solutions helped to offset the negative effects that the stock market's decline would have otherwise had on the company's asset levels," Johnson said in the annual shareholder letter.

Markets stumbled late last year with major indexes posting their worst performance in a decade. The S&P 500 lost 6 percent in 2018. For Fidelity, assets under administration declined 1.5 percent at the end of last year, totaling $6.69 trillion. Assets under administration includes the money Fidelity oversees for retirement account and brokerage clients.

For the asset management business, the fourth-quarter turmoil was a "significant detractor to Fidelity's equity performance for the year," Stephen Neff, president of Fidelity Asset Management said in the letter. Still, asset management delivered solid performance. In aggregate, Fidelity said its mutual funds outperformed peers by 66 percent, 72 percent, and 76 percent for the trailing one, three, and five-year periods respectively.

Last summer, the company announced a suite of zero-fee funds for retail investors. They offer zero investment and account minimums, no fees and no domestic money movement fees. From the start of August to the end of last year, clients ushered $2.9 billion of assets into those new "ZERO" funds, Johnson said.

The firm's total customer base also grew last year. Fidelity, which was founded by the Johnson family in 1946, serviced 31.1 million workplace and health care participants in 2018, a 6 percent increase from a year earlier. Its 20.8 million retail clients were up 7 percent from a year earlier, and the 7.1 million accounts managed by intermediaries on Fidelity's clearing and custody platform grew 6.5 percent from year-end 2017.

The family-controlled firm is known for managing retirement plans and mutual funds. But it also spends roughly $2.5 billion per year in technologies like blockchain and artificial intelligence through Fidelity Labs and its Fidelity Center for Applied Technology. In October, it branched out with a new company, Fidelity Digital Asset Services, to offer custody service for cryptocurrencies. The new company implemented its first institutional client in December, according to the shareholder letter.