Call it payback for the Big Short. Goldman Sachs Group Inc. ended 2015 with its third straight quarter of shrinking profits, and the investment bank primarily blamed legal costs associated with its role in selling shoddy mortgage securities during the financial crisis eight years ago.

In its latest financial report, released Jan. 20, the bank says noncompensation expenses were $12.36 billion for 2015, a 30 percent jump from 2014, “due to significantly higher net provisions for mortgage-related litigation and regulatory matters.”