Young investors have made out like bandits in the bear market, as they'll reap the benefits of buying in at low stock prices for as long as they last. Those close to or already in retirement, however, have a lot to be nervous about, with everything from trying to keep their jobs to repairing their broken portfolios weighing on their minds.

Investors between age 40 and 55 share traits from both of these groups. But if you're in this age range and play your cards right, you have more than enough time to get yourself back on track for a happy retirement.

The best of both worlds
Although middle-aged investors aren't necessarily in as enviable a position as their younger counterparts, people this age have a bunch of things going for them right now:

  • You've probably been investing for a while, so you know the ropes and may already have in place a solid plan of attack for your investments.
  • While the losses you've taken in the past year may be fairly sizable, they pale in comparison to what people closer to retirement have seen.
  • You still have 10 to 25 years left before you'll start wanting to draw money out of your retirement accounts, so you have enough time to wait out a bear market and reap the rewards of smart investing.
  • Unlike younger investors with entry-level jobs, you're probably further in your career by now and earn more money, with more to put aside toward savings.

But you've got to take the right steps in order to continue on the path to success. If you're wondering what to do next with your investments -- or need to put together a new portfolio pronto -- then look closely at these topics.

Complete your portfolio
Investing can be like nutrition. When you're young, you can pretty much get away with eating whatever junk food you want. But age eventually catches up with you, and you have to watch what you eat in order to prevent future problems.

Similarly, middle-aged investors need balance in their portfolios. If you've gorged on high-risk, high-reward stocks, then you haven't suffered any permanent damage, but it's time to start broadening your investing. And if you don't own any stocks or stock funds yet, you should make sure to get a broad selection now.

Demand cash
When was the last time you saw a growth stock like Apple (NASDAQ:AAPL) or Research In Motion (NASDAQ:RIMM) pay a dividend? If you think the answer is never, you're only half right. While the BlackBerry maker has never made a quarterly payment, Apple used to -- from 1987 to 1995. Since then, though, shareholders haven't gotten a penny.

Dividend income is a valuable thing to have, especially as you get closer to retirement. The payments give you more cash to invest, and can also act as a buffer to help you weather market turbulence. Healthy dividend-paying companies like Caterpillar (NYSE:CAT) and Merck (NYSE:MRK) haven't completely avoided the losses the stock market has seen, but they helped soften the blow.

Go beyond stocks
Often, young investors allocate all their money to stocks. With time on their side, they figure they can afford to take maximum risk.

As you get older, though, you need to start thinking about diversifying beyond stocks. Bonds were the saving grace for many investors last year -- and they can help you for years to come.

Bonds don't have to be boring, though. Beyond ultrasafe Treasuries, you can sometimes pick up better yields in corporate bonds. Here are a few examples:

Issuer

S&P Bond Rating, Coupon Rate, Maturity

Current Yield

JPMorgan Chase (NYSE:JPM)

A+, 6.3%, April 2019

6.02%

Altria Group (NYSE:MO)

BBB, 9.7%, Nov. 2018

7.62%

ConocoPhillips (NYSE:COP)

A, 4.6%, Jan. 2015

3.88%

Source: The Wall Street Journal.

Those yields are all significantly higher than comparable Treasuries. And while even blue-chip companies have been vulnerable to default lately, they're all well-known companies with decent prospects for the foreseeable future.

As you get closer to retirement, your portfolio should ideally start getting more conservative. By taking the right steps toward cutting down risk, you can get yourself back into position for a comfortable financial future.

Read more about a healthy retirement: