Energy is the rare bright spot in a year of market turmoil. It's currently the only sector in the S & P 500 that's in the green, according to FactSet. Surging oil and gas prices this year have been one supportive factor, and while they pared some gains recently — they are still higher than they were a year ago. When it comes to major oil stocks, ExxonMobil and Chevron are two names that may come to mind. Both companies posted solid third-quarter earnings last month. And Goldman Sachs said in a Nov. 2 note that the two stocks "still represent 36% of the market cap of our Americas Oil & Gas coverage, and therefore getting the spread between the stocks right can be highly important to alpha generation for investors." The investment bank works out which of the two "deserves the premium." Three factors The following are the factors that set one stock above the other, according to Goldman. Upstream growth projects: Exxon has a stronger set of such projects, according to the investment bank, which highlighted in one example the big opportunities the oil giant has in Guyana. Exxon recently said it made two new discoveries in the South American country, potentially adding more supply ahead. Chevron, on the other hand, needs to "better outline" its growth projects beyond the Tengiz field in Kazakhstan — one of the world's biggest oil fields — as well as the Permian Basin in the United States. Historical Trends: Over the past 10 years, Exxon has traded at a premium to Chevron on a key set of financial metrics, said Goldman. That includes the enterprise value compared to debt-adjusted cash flow (EV/DACF) ratio — a valuation metric for firms in the oil and gas sector. It reflects the amount of debt a firm has, as well as the after-tax cost of that debt. Refining earnings: Goldman says there's a greater chance of refining earnings surprising to the upside at Exxon, rather than at Chevron, given the relative scale of Exxon's refining business. The winner Goldman says that Exxon warrants the premium, giving it a "buy" rating and price target of $121 — or over 6% upside. The stock has already soared nearly 80% year-to-date. According to Factset, 54% of analysts covering the stock gave it a buy rating, with an average upside of 2.4%. It gave Chevron a neutral rating, with a price target of $184 — relatively unchanged from its last closing price of $185.34 on Tuesday. Half of analysts covering the stock gave it a buy rating, with an average upside of 1.1%, according to FactSet. — CNBC's Michael Bloom contributed to this report.