* H1 profit 16.1 bln sfr vs 7.3 bln sfr loss a year ago
* 12.6 bln sfr in profit from foreign currency positions
* Value of gold reserves rises by 3.5 bln sfr (Adds detail, bullets)
ZURICH, July 31 (Reuters) - The Swiss National Bank (SNB) swung to a first-half profit, helped by gains from foreign currency positions, the bank said on Thursday.
The central bank posted a profit of 16.1 billion Swiss francs ($17.7 billion) for the first six months, of which 12.6 billion came from gains on foreign currency. It had reported a consolidated loss of 7.3 billion for the same period in 2013.
The SNB capped a soaring franc at 1.20 per euro in September 2011 to help stave off recession and the threat of deflation, boosting its foreign currency reserves.
The value of its unchanged gold reserves rose by 3.5 billion francs, the SNB said.
Switzerland’s upper house in March rejected a popular initiative that would prohibit the SNB from selling any of its gold reserves, saying the proposal could hamper the central bank’s ability to fulfill its mandate.
The SNB said euro-denominated assets made up 46 percent of its portfolio at the end of June, down from 47 percent at the end of March, while 27 percent was held in dollars, unchanged from the end of the first quarter, and 9 percent in yen, up from 8 percent.
The SNB, which has been trying to diversify its portfolio, said its holdings of other currencies - including the Swedish and Danish crowns and the Australian and Singapore dollars, and South Korean won - was unchanged at 7 percent. ($1 = 0.9084 Swiss Francs) (Reporting by Joshua Franklin; Editing by David Holmes)