Nvidia co-founder and CEO Jensen Huang attends an event during the annual Computex computer exhibition in Taipei, Taiwan May 30, 2017.

Wall Street rarely talks about its mistakes, but BMO Capital Markets admitted in a note to clients that it messed up with its bearish call for Nvidia shares.

The firm's analyst raised his rating for the chipmaker to market perform from underperform, saying his predictions and forecasts were way off base.

"We have been reluctant to change our view, but now recognize that our underperform call did not work out," BMO's Ambrish Srivastava wrote in a note to clients Sunday.

"Our negative stance to date was based largely on our view that the gaming business would see a marked deceleration in CY17 vs. CY16. However, the diversity in the business with wins at Nintendo, and help from the cryptocurrency market, has enabled the business to sustain at a higher level than what we were modeling."



Nvidia shares closed at an all-time high Friday, a day after it reported stronger-than-expected third-quarter earnings results. The stock is up 102.5 percent year to date through Friday compared with the S&P 500's 15 percent gain. That performance ranks No. 4 in the entire S&P 500.

Srivastava raised his price target for Nvidia shares to $200 from $135. The new target is 7.5 percent below Friday's closing price.

About 19 percent of Nvidia's sales are in its data center segment, where its cards are used for machine learning and artificial intelligence applications.

"NVIDIA has done a very good job in capitalizing on the demand for AI/ML, and primarily on the training side, where the company really has no competition," Srivastava wrote. "While we are ourselves believers in the secular trend to heterogeneous computing, we have been wrong on the tailwind for NVIDIA's business in this market."

Srivastava lowered his rating for the company's shares to underperform from market perform on Feb. 23. Nvidia stock is up 115 percent since the downgrade through Friday.

"Additionally, NVIDIA has also demonstrated a far higher amount of leverage in its model than we had been anticipating. The recently-reported quarter was an example of the earnings power in the model," he wrote.

Nvidia stock traded down 1.3 percent on Monday.