Credit Suisse on Thursday posted a net profit of 2 billion Swiss francs ($1.71 billion) for the first quarter, twice as much as expected by analysts, and said it remained optimistic about its prospects.

Switzerland's second-largest bank beat forecasts thanks to a strong performance at its investment banking and wealth management units.

The bank reported trading revenues of 4.9 billion Swiss francs while asset management remained unprofitable.

We remain optimistic about the prospects for Credit Suisse, particularly in the context of the overall industry, Chief Executive Brady Dougan said in a statement.

The bank continued to cut risky positions and was able to boost its capital base to a tier 1 ratio of 14.1 percent of risk-weighted assets.

News that Switzerland's second-largest bank had swung back to profit after a record annual loss in 2008 follows a set of forecast-beating first-quarter results from U.S. banks Goldman Sachs and JP Morgan Chase .

Analysts polled by Reuters had expected Credit Suisse to post a net profit of 948 million Swiss francs.

Credit Suisse's net profit comes in contrast with a forecast of a 2 billion franc loss in the first quarter by larger Swiss competitor UBS , which has been hit harder in the crisis and is still struggling to recover.

Credit Suisse reported 1.4 billion francs of writedowns as it cut its most illiquid assets by a further 31 percent and said its private banking division had net new inflows of 11.4 billion francs, an indication the bank is still attracting wealthy clients despite global pressure on Swiss bank secrecy.

During the quarter we saw our client businesses generate strong revenue growth and gain market share, Dougan added.

The bank said its investment banking business had benefited from generally improved market conditions, lower costs as well as fair value gains of 365 million francs on its own debt.

Credit Suisse, which reports under U.S. Generally Accepted Accounting Principles (GAAP), said it had not taken advantage of a new U.S. accounting rule that allows banks to mark to model certain illiquid assets.

It said it will use it as from the second quarter but does not expect a significant impact on fair value from the rule.

Unlike UBS, Credit Suisse has managed to survive the crisis without government aid and was able to raise 10 billion Swiss francs from investors in the last quarter of 2008 to boost its capital base.

Credit Suisse posted its biggest ever loss, 8.2 billion francs, in 2008 but has said it had a strong start to 2009.

The Swiss bank serves about 700,000 wealthy individuals globally, managing assets worth 646 billion francs at the end of 2008. It gathered 42.2 billion francs of new wealth management assets last year.

($1=1.170 Swiss francs)

(Editing by Greg Mahlich)