As we quickly approach the end of 2013, looking back at how your portfolios performed over the last 12 months is not only rewarding if we outperformed the overall market, but also an excellent learning experience. While the ups and downs of the daily market can become overwhelming, a longer-term view of how a stock has performed can put things in perspective and even help you in the future when new issues arise.

With that in mind, let's take a look at how Wal-Mart (WMT 0.48%) performed during 2013 and talk about a few issues the company overcame along the way. Year to date, shares of Wal-Mart are up 12.5%, while the Dow Jones Industrial Average (^DJI -1.04%) is up 21.5%. But as you can see below, Wal-Mart's shares closely followed the ups and downs of both the Dow and the S&P 500, and were nearly beating the two heading into the start of the third quarter of the year.

WMT Chart

WMT data by YCharts.

Wal-Mart's problems in 2013
The year started out bad for Wal-Mart, with the company's bribery scandals making breaking news in January. The problems, which started in Mexico in 2012, quickly surfaced around the world in India, Brazil, and China, and while the bulk of this news broke in 2012, more details and the aftermath of the scandal emerged in 2013.

Another problem the company dealt with this year was a series of problems with manufacturers' working conditions. A garment factory fire in Bangladesh during 2012 started the conversation, and the issue kept arising in 2013. In April a garment factory in Bangladesh collapsed, and in October another factory caught fire, and all along the way customers were reminded that these locations produced products for the world's largest retailer, Wal-Mart.

The bad publicity continued for the company when its own employees began fighting for higher salaries, as they said the hourly wages for a full time, 40-hour-a-week employee were not enough to live on in the U.S. Rallies and protests gained attention as workers pushed for higher wages, with most saying they made less than $22,000 a year.

In addition to all that, the company faced problems this year with inventory. Hordes of customers and analysts noted that shelves were empty in stores around the country, and many criticized the company for bad customer service. Wal-Mart executives even addressed this issue in a quarterly conference call, stating that they would be hiring more employees and increasing part-time workers' hours to help address store conditions and improve stocking.

But in the face of all these serious public-relations issues, shares still rose more than 14% this year, while the company is expected to increase sales by 1.9% -- which is more impressive than it sounds for a company of Wal-Mart's size. When that is compared to the company's closest competitor, Target (TGT -0.62%), which is expected to do just $73 billion in sales this year, that expected 1.9% -- or $9 billion -- increase translates to 12% of Target's total revenue. Furthermore, analysts expect Wal-Mart to increase earnings per share from $5.02 in 2012 to $5.17 in 2013, which again would be impressive considering the company's size.

Final thoughts
As I started this review, I noted that reviewing a company's past can teach an investor some important things. At times in 2013 it would have seemed that Wal-Mart was heading down the tubes, and even now, when reviewing all the bad publicity the company dealt with this year, one could argue that the company is heading in the wrong direction in terms of business ethics.

While those issues may keep some investors at bay or cause them to sell shares, the fact of the matter is that Wal-Mart is alive and not only kicking, but growing its sales and earnings considerably for its owners. The company is big enough to sustain a few blows, which is why the stock still managed to gain almost 13% in 2013. Now, moving forward, if the issues continue and management doesn't clean up its act, the company certainly may suffer -- but current shareholders should at least give the company a little more time before heading for the hills. And lastly, if Wal-Mart managed to perform this well in a difficult year, imagine how much it could grow if the world's largest retailer had an issues-free 2014?