(Bloomberg) -- While investors fled U.S. equities last week, they put record money into a market they have shunned for most of the past four years: Spain.

The iShares MSCI Spain Capped ETF attracted almost $238 million in the period ended April 11, the most for any country, according to data compiled by Bloomberg going back to 2002. Traders have poured money into the exchange-traded fund every week in 2014. The $1.9-billion ETF tracking companies from Banco Santander SA to Telefonica SA has gained 5.3% this year, compared with declines in the Standard & Poor’s 500 Index and the Stoxx Europe 600 Index.

Confidence is growing that Prime Minister Mariano Rajoy will make good on his pledge to complete an overhaul of Spain’s economy as the nation that sought a bank bailout in 2012 returns to growth. A manufacturing report this month pointed to the fastest expansion since at least April 2011, and lenders from Santander to Banco Popular Espanol SA are benefiting from European Central Bank President Mario Draghi’s policy to keep interest rates at a record low.

“Spain is a good place to be,” Christoph Riniker, head of strategy research at Bank Julius Baer & Co. in Zurich, said in a phone interview yesterday. Julius Baer Group Ltd. oversees $289 billion. “The important thing is the differential between contraction and the expansion we are seeing now. This is the stage where things matter. There is still room for outperformance of Spain.”

Stock Surge

The benchmark IBEX 35 Index gained 70% from a nine- year low in July 2012 through yesterday, with its companies adding 234 billion euros ($323 billion) in market value, data compiled by Bloomberg show. The gauge rose 1.6%, the most in a month, today. Yields on 10-year Spanish government bonds slipped to 3.09% yesterday, an 8 1/2-year low, from 7.62% in 2012.

Rajoy was forced to ask the European Union for a 41 billion-euro bailout of Spanish lenders in 2012 as their mounting real-estate losses threatened to overwhelm public finances. The prime minister also put in place austerity measures and made it easier to fire employees in a bid to make Spanish companies more competitive.

The nation’s gross domestic product will rise 0.9% in 2014, the first expansion since 2011, and 1.4% in 2015 after contracting 1.2% in 2013, according to the median economist projection in a Bloomberg News survey. The euro-area economy will grow 1.1% this year and 1.5% next, the estimates show.

Assets Growth

The Spain ETF, which tracks the MSCI Spain 25-50 Price USD Index, has boosted assets by more than $1 billion in 2014, data compiled by Bloomberg show. Investors have added $952 million in the fund, putting it on track for its best year ever.

Hays Advisory LLC and Biondo Investment Advisors LLC were among buyers of the ETF, according to regulatory filings in March. Brentwood, Tennessee-based asset-management firm Hays Advisory reported the purchase of 195,665 shares, while Biondo in Milford, Pennsylvania, added 32,509 shares.

Keith Hays, who helps oversee $1.2 billion at Hays Advisory says his company has bought the fund because of recent gains in the Spanish market. His firm follows a quantitative strategy, under which it buys markets gaining momentum as long as they appear cheaply valued.

No Constraints

“Spain falls within those parameters, the strength of the stock market and no valuation constraints,” Hays said by phone yesterday. “When P/Es climb to a certain proprietary level, it becomes a little problematic for us. That’s why we aren’t investing in Ireland or Greece for example.”

The IBEX 35 trades at 15.8 times estimated earnings, according to data compiled by Bloomberg. That compares with 17.4 for Ireland’s ISEQ Index and 25.4 for Greece’s ASE Index.

Stocks fell worldwide last week as investors sold the best performers of the bull market on concern valuations have climbed too high. The S&P 500 tumbled 2.7%, the most since June 2012, and the Stoxx 600 lost 3.1%. The IBEX 35 dropped 4.4% in the period.

“Investor enthusiasm towards Europe’s periphery may be reaching stretched levels,” Francisco Salvador, a strategist at FGA/MG Valores in Spain, said by phone yesterday. “This is clear when looking at bonds’ valuations for countries like Spain. Because of the performance in recent months, Spain is also at the forefront in risks of a correction.”

Bonds Spread

The premium investors demand to hold 10-year Spanish government bonds instead of German notes fell to 160 basis points this month, the lowest since October 2010.

Still, traders returned to Spanish equities last year after the IBEX 35 dropped 51% from its high in January 2010 to the low in July 2012. It climbed 21% in 2013, beating the 17% gain for the Stoxx 600.

Analysts estimate profits at companies in the gauge will rise 2.9% this year to 639.96 euros a share after climbing 9.7% in 2013, data compiled by Bloomberg show. Earnings halved from 2010 to 2012 as non-performing loans at banks surged and domestic consumption dropped.

While confidence grows for Spanish equities, investors are abandoning Brazil and Japan. They withdrew about $380 million from the iShares MSCI Brazil Capped ETF and the Market Vectors Brazil Small-Cap ETF last week for the biggest redemptions among country ETFs, data compiled by Bloomberg show. The Ibovespa Index has fallen 2% this year on growing concern that the country’s policy makers will keep raising interest rates to control inflation.

Japan ETFs

In Japan, investors took out more than $270 million from the WisdomTree Japan Hedged Equity Fund and the iShares MSCI Japan ETF on doubts that Prime Minister Shinzo Abe will fail in pulling Japan out of deflation.

Back in Spain, it’s companies most dependent on local revenue that have led gains in the IBEX 35 this year. Acciona SA has rallied the most in the gauge, adding 37%. The builder of energy, water and transportation projects generates more than half of sales at home, according to data compiled by Bloomberg. Madrid-based Banco Popular has jumped 20%.

Firms including Blackstone Group LP and Goldman Sachs Group Inc. have bought real estate in Spain after home prices fell more than 45% from their 2007 peak. Investment in Spain by funds, private-equity firms and other financial-services companies totaled 13.9 billion euros in 2013, more than double the 2012 amount, according to Madrid-based debt-restructuring firm Irea.

“American players and hedge funds have started to look at the market,” Karim Bertoni, who helps oversee about $3.3 billion at de Pury Pictet Turrettini & Co. in Geneva, said in a phone interview yesterday. “While the economy is still struggling, things are improving. At the same time, rising government bonds help relative equity valuations and support the banking sector.”

Subscribe Now

Access to premium content including in-depth coverage of mutual funds, hedge funds, 401(K)s, 529 plans, and more.

3-Week Free Trial

Insight and analysis into the management, marketing, operations and technology of the asset management industry.