* Valuation gains of around 4.7 bln Sfr on forex holdings
* Gains of about 1.4 bln Sfr on gold holdings
* SNB still unlikely to shift franc cap - analyst
* To distribute 1 bln Sfr to cantons and federal government (Adds background on reserves, analyst comments)
By Martin de Sa'Pinto
ZURICH, Jan 17 The Swiss currency's cap against the euro helped the country's central bank post a profit for the second year running, with its currency reserves gaining in value as upward pressure on the franc eased.
The Swiss National Bank said profits were 6 billion Swiss francs ($6.5 billion) in 2012, underpinned by valuation gains of around 4.7 billion francs from its foreign currency positions and 1.4 billion on its gold holdings.
The SNB capped a soaring franc at 1.20 per euro in September 2011 to help stave off recession and the threat of deflation. The cap has been under less stress in recent weeks as pressure on the euro has eased.
"If the SNB sold francs and bought euros just above 1.20 (francs per euro) in large amounts, like we are led to believe, then significant profits will have been made," said Tony Nyman, analyst at Informa Global Markets.
The franc hit its weakest level in over a year on Thursday, trading at more than 1.24 per euro.
The SNB's foreign currency reserves have ballooned since the onset of the euro zone crisis. It intervened heavily in the markets in an initially unsuccessful attempt to stop the franc's rapid appreciation and later to defend the cap it had imposed.
But after peaking at almost 430 billion francs, or over 70 percent of annual output in September, SNB reserves have begun to retreat slowly. Some traders have said the central bank may look to sell some of its reserves into franc weakness.
Despite the franc's weakening, analysts said the SNB was unlikely to track that by moving the cap any time soon.
"The weakening of the franc could continue for a month or two, but at some point the global economic situation may worsen, putting stress on European bonds and pushing investors back towards the franc," said bank Sarasin economist Alessandro Bee.
"The Swiss economy was pretty resilient at 1.20 and if financial pressure returns in Europe, the level is likely to be tested again. With our fair value estimates at 1.32, a cap at 1.25 would be much harder to defend than 1.20."
The central bank said the stabilisation fund of toxic assets from UBS, the country's largest bank which had to be bailed out in 2008, had also contributed to profits, without saying how much.
Overall profits fell 54 percent from 2011, when currency gains totalled 8 billion and gains on gold holdings 5 billion francs.
The SNB said it would distribute 1 billion francs in dividends to the cantons and the federal government. Switzerland's 26 cantons, or states, are the central bank's biggest shareholders.
Thursday's SNB data was preliminary. The bank will release final results in the spring.
($1 = 0.9304 Swiss francs) (Reporting by Martin de Sa'Pinto; Editing by Ruth Pitchford)