Defense makes sense in this market: Goldman's Kostin

Based on squeezed margins and record-high stock valuations this year, Goldman Sachs Chief U.S. Equity Strategist David Kostin says it's time to play defense.

"Defense makes sense," Kostin told CNBC's "Squawk on the Street" Thursday. "Basically, it's a tough market."

Eighty percent of fund managers are trailing the benchmark, Kostin said. So when picking stocks, he recommended that managers focus on a yield-based strategy to counter record-high valuations.

"The core of it and where you generate the win ultimately, is getting the dividends," Kostin said.

Stock valuations are higher than they have been in 40 years, according to Kostin, which adds to downside risk.

"Its' a very difficult starting point," Kostin said. "It doesn't mean the market can't go higher but the probability is you would get a lower valuation."

There are a few "rare gems" in the market, though, that have outperformed tough market conditions.

"You have a couple of companies where there is expansion in margins, which is very rare," Kostin said, pointing to companies like Honeywell and Cisco, with above-average dividend yields and dividend growth. "Those stocks ought to do better," he said, adding that domestic-focused companies might also outperform in a tough environment.

Wage inflation and a strong dollar have been key factors during earnings season. Retail results are off to a lackluster start with Macy's reporting Wednesday. The company lowered its sales and earnings outlook after posting its fifth straight quarter of decline. The stock is down nearly 20 percent this week.

Industrial companies also count wages as a significant part of the cost structure, and are seeing the effects of wage inflation in their margins, leading to some negative earnings revisions, Kostin said.

But other sectors stand to benefit from what's the hurting consumer discretionary sector.

"The beneficiaries would be from technology where labor costs are a relatively small portion of their sales," Kostin said.

Still, not all tech companies had a great quarter.

"35 out of 53 tech companies had margin declines," Kostin said. "That's a key metric we've been focusing on for a while, so margin is a concern."

Economic data is suggesting U.S. growth is improving at a "modest level," Kostin said. Political risk abroad, including a British exit from the European Union and uncertainty from domestic politics, have all been cause for worry in the markets.

He mentioned some positive tailwinds including a growing economy, increased loan demands, and companies like IBM "hiring left and right."

"There have been some pockets of optimism but not a lot," Kostin said. "You have ebbs and flows."