Shares of Pure Storage (PSTG) - Get Report rose 14.9% to $15.93 Thursday after the flash-storage company beat Wall Street's second-quarter earnings expectations, even as it lowered its guidance and announced its chief financial officer's departure.

The Mountain View, California-based company reported a loss of $66 million, or 26 cents a share, compared with a loss of $60 million, or 26 cents a share, a year ago. Adjusted earnings for the most recent quarter came to 1 cent a share. Analysts were expecting Pure Storage to report a loss of 4 cents a share.

Sales totaled $396.3 million, up from $308.9 million a year ago and beat Wall Street's call for $393 million in sales. Pure Storage added more than 450 new customers in the second quarter, the company said, the highest number in any second quarter in its history. 

Pure Storage reduced its guidance a second time and is now calling for annual 2020 revenue of $1.645 billion to $1.715 billion, down from earlier guidance of $1.7 billion to $1.77 billion.

The company also said Chief Financial Officer Tim Ritters will leave Pure Storage in the fall after five years in the position. He will stay on during the search for a replacement. 

In addition, price target cut to $19 from $23 at Oppenheimer cut its price target on the company's stock to $19 from $23 a share.

Lake Street analyst Eric Martinuzzi also lowered his price target to $19 from $22 a share. He said in a note to investors that NAND flash memory component cost declined faster than expected and that Pure Storage believes its prudent to take into account competitor commentary about macro softness, even though the company was not hurt by macro weakness in the second quarter.

While the lowered guidance is understandable, Martinuzzi said this was second downward revision for the company in as many quarters.

BTIG analyst Edward Parker lowered his price target on Pure Storage to $20, but kept his buy rating, saying the company's buyback program provides evidence of strong fundamentals.

Save 57% With Our Labor Day Sale. Join Jim Cramer's Action Alerts PLUS investment club to become a smarter investor! Click here to sign up!