Image source: Getty Images

As you save up your hard earned money for your long term future, there is one stock in particular that you do not want to buy as part of your retirement portfolio. That stock is one that is likely incredibly easy for you to get your hands on, might even be included as part of your compensation package, and which your boss might actively encourage you to own.

That stock you should avoid buying for your retirement? The very company that employs you. To be clear, you'll likely end up with some shares -- perhaps even a significant stake -- as you work throughout your career. In addition, employee ownership is a great way to better align the interests of employees with the interests of owners. Still, as important as that alignment is, it's not enough of a reason to put your retirement at risk by investing in your employer's stock as part of your retirement plan.

What's the worst that can happen?

The primary risk is this: If the company struggles and has to let you go, you're out of work. Chances are pretty good that if the company is struggling enough to let people go, its share price reflects those problems. As a result, if you are overinvested in your employer's stock at the time you lose your job, you are at risk of losing both your job and your savings.

The risk is real. There were over 25,000 corporate bankruptcy filings in the United States in the 12 months ending June 30, 2016. The majority of those -- over 15,000, in fact -- were Chapter 7 bankruptcies, which are designed to shut down the company and liquidate its remaining assets. If you had the misfortune of being employed by one of those now bankrupt companies, you likely saw your job evaporate, along with any value you thought you had in that company's stock.

When is it OK to own your employer's stock?

Image Source: Getty Images

Despite the risks associated with owning your employer's stock, there can be very good reasons to be a shareholder. For instance, many start-up companies are cash strapped and can't afford to pay market-based salaries for their early employees. A stock- or options-based compensation package can help those newer companies survive to become bigger businesses -- and ultimately reward those early employees that accepted that form of compensation.

In addition, many companies foster employee ownership through Employee Stock Ownership Plans. Those plans can help both the company and the employees by better aligning their interests and by reducing turnover and job churn among employees.

Another frequently offered benefit is an employer match in a 401(k) plan, and those matches often come in the form of company stock. And of course, executive compensation plans often feature stock and/or options in the company as well.

Whatever the reason or driver, if your company offers to hand you its stock or offers you a substantial discount for purchasing it, it's OK to take the company up on those offers. Turning down "free money" is rarely a good idea. It's also OK to own a reasonably sized portfolio position if it's a company whose stock you'd be willing to own even if you didn't work there.

Just be sure you understand the rules or restrictions the company has with regards to how and when you can sell those discounted or free shares that you're getting. Also, be vigilant about diversifying when you are able to do so -- it's not disloyalty to your employer, and chances are good that the company's executives are doing so as well.

How to tell if you have too much of a good thing

Owning shares of your employer's stock can be a great way to receive some of the ownership rewards of your hard work. And if your company does well -- thanks in part to you, of course -- as a shareholder, you'll do well too. But if your retirement plan depends on your employer doing well for decades to come, then chances are you've got too much of your cash tied up in that company's stock.

As a reasonability check, ask yourself what happens to you in your retirement if your employer joins the 25,000-plus companies that filed for bankruptcy over the past year.

If your answer involves eating pet food or living out your golden years in a cardboard box under an overpass, then you've got too much invested in your employer's stock. If instead you can answer that question with something along the lines of "well, it'd sting a bit, but I'd still wind up comfortable thanks to my other investments," then chances are you've found a reasonable balance in your plan.

Your employer can be a great place to work, and it might even be a decent company to own. But when it comes to investing for your retirement, the risks are simply too high for you to rely too heavily on that particular stock to see you through. So make sure your retirement plan involves enough investments outside of your company's stock to protect yourself from the risks of its failure. That way, you'll still have a plan that lets you retire comfortably, while benefiting from the rewards of your work.