Chevron reported quarterly profit and revenue that fell short of Wall Street's expectations, but the company's stock still rose after the oil major announced it would begin buying back $3 billion of its stock from shareholders each year.

The plan to return cash to investors is another sign that Chevron is moving past a bruising period of low oil prices. The company's profits have steadily improved as commodity prices rebound, and now Chevron says it believes the buyback program is sustainable so long as oil market conditions don't take a dramatic turn for the worse.

Chevron highlighted its improved cash position to underscore its confidence in the buyback program. Cash flow from operations, a key measure of financial health for integrated oil companies, stood at $11.9 billion in the second quarter, up 38 percent from the year-ago period.

"Our cash flow continues to improve with higher upstream margins and volumes, combined with disciplined spending," Chevron's Chairman and CEO, Michael Wirth, said in a statement. "This enables us to initiate share repurchases, which are expected to be $3 billion per year based on our current outlook."

Shares of Chevron ended Friday up 1.6 percent at $125.97, after earlier trading down about 2 percent on the earnings miss.

While Chevron's profit for the second quarter more than doubled from a year ago to $3.4 billion, the company reported earnings per share of $1.78, short of expectations of $2.09 in a Thomson Reuters survey of analysts.

Chevron's revenue also came in light at $42.24 billion, compared with the consensus forecast for $45.59 billion.

Earnings in the company's downstream business — which focuses on refining crude oil into fuels like gasoline — fell 30 percent from a year ago to $838 million. The headline drop was due to a decline in profits in Chevron's international segment, where earnings fell by nearly $380 million from a year ago due to lower profit margins.

Chevron also reported $724 million in charges, higher than during the year-ago period, driven by interest expense.

Profit in Chevron's business that produces oil and gas jumped nearly fourfold from the year-ago period to $3.3 billion. The results got a boost from the recovery in crude prices and higher output from the year-ago period.

Analysts have been focused on Chevron's growing position in U.S. shale fields, particularly the Permian basin underlying Texas and New Mexico. Crude and natural gas production from the region hit 270,000 barrels of oil equivalent per day in the second quarter, up by 90,000 boed from last year.

On Thursday, British rival BP beat Chevron in its bid to purchase miner BHP Billiton's U.S. shale assets. BP scooped up the acreage for $10.5 billion.

Chevron's stock price had been in the red for the year, but swung into the black after Friday's report. Chevron is still underperforming its Big Oil peers in Europe, but it's now outperforming fellow U.S. oil major Exxon Mobil, which also reported disappointing earnings on Friday.