Stocks turned green by mid-afternoon as rising tensions between Russia and Turkey pushed crude oil higher. The energy sector was the best performer in the U.S. markets. Crude oil closed with its biggest one-day gain in three weeks as investors bet on a possible stop in oil trade between Turkey and Russia and the likelihood of decreased output in the region. Earlier, Turkey shot down a Russian fighter jet which it claimed had intentionally invaded its airspace. Palo Alto Networks (PANW) moved higher after beating quarterly estimates thanks to strong demand for cyber security systems. Billings, which are a measure of future sales, also exceeded estimates. TheStreet's Keris Lahiff reports from New York.