Wedbush Securities has upgraded shares of Micron Technology (NASDAQ: MU) to outperform from neutral, saying the worst is over for the company.

We believe the worst of times for the company is likely in the rear view mirror, analyst Betsy Van Hees wrote in a note to clients.

Memory chip maker Micron Technology, on Wednesday, reported its second consecutive quarterly loss, hurt by lower sales and deteriorating margins. For the first quarter, the Boise, Idaho-based company reported a net loss of $187 million or 19 cents per share, compared to a profit of $155 million or 15 cents per share for the year-ago quarter. Net sales for the first quarter fell 7 percent to $2.09 billion due to lower NAND prices.

We think DRAM, which has been the biggest drag on Micron's profitability, has finally reached a bottom here in FQ2 (Feb) likely returning to profitability in FQ3 (May), driven by stable DRAM prices and increasing unit demand trends as the hard disk drive (HDD) industry begins to recover from the impact of the Thailand floods, said Van Hees.

We think with the DRAM market at a trough, considerable tailwinds for NAND (i.e. SSDs, smartphones, and tablets) demand in 2012, and the stock trading at 0.7x tangible book value, that the risk/reward here is compelling; and we recommend investors buy shares of Micron, the analyst added.

Van Hees also increased price target of Micron Technology stock to $8 from $7. Shares of Micron Technology closed Wednesday's regular trading session at $5.54.