ZURICH—Switzerland got a lot wealthier in 2017, thanks to its central bank’s emergence as a major money manager with a nearly $800 billion portfolio of foreign stocks and bonds.

The Swiss National Bank said Tuesday it expects to report a record annual profit of 54 billion Swiss francs ($55 billion) for last year—a staggering sum equal to 8% of the country’s gross domestic product. By comparison, if the Federal Reserve were to run a profit of similar scale relative to the U.S. economy, it would be about $1.5 trillion. The Federal...