This is a post from staff writer Robert Brokamp of The Motley Fool. Robert is a Certified Financial Planner and the adviser for The Motley Fool’s Rule Your Retirement service.

When you think of your portfolio, visions of stocks, bonds and cash likely dance in your head. Generally, the mix of those investments is based on some measure of risk tolerance, with a little bit of time horizon calculation thrown in, and — voila! — you have yourself a nice portfolio pie.

While that’s a fine start, those two factors probably deserve a bit more consideration than they’re given. Plus, there are a few other variables that might influence what other investments you buy. Permit me to elaborate…

When you’ll need the money

The conventional wisdom is that the farther you are away from your investment goal, the more risk you can take. While that’s generally true, discussions of investment time horizon usually focus on one point in time, and that’s usually when someone will retire. However, a retiree won’t need all the money all at once. She’ll take a bit out the first year — let’s say 4 percent, since that’s the safe withdrawal rate that most studies hover around (though there’s plenty of debate about it) — but the rest will remain invested. Then she’ll take out a bit the next year, and then a bit three years later, and so on… for decades. Retirement isn’t a single financial goal, but a series of 30 or so (depending on life expectancy) progressively longer goals that must be met each subsequent year.

These goals must meet two criteria: 1) The money must last as long as the retiree does, and 2) provide income that keeps up with inflation. The implication is that retirees should still have money in stocks, since a portfolio dominated by bonds and cash would have trouble accomplishing both of those criteria.

The reality of risk

If you visit a financial adviser or use some kind of asset allocation software, you’ll be asked a series of questions that will attempt to determine your risk tolerance. What this is really asking is how much of a decline you can stand before you panic and sell. However, thanks to the Great Recession, you already know the answer to that question. From October 2007 to March 2009, the S&P 500 fell more than 50 percent. Did you sell your stocks, hold on, or buy more? If you just couldn’t take that big of a drop, then you need to have something that will hold up the next time the market tanks — and there will be a next time, we just don’t know when.

Risk and time horizon intersect at another portfolio decision point, and that is how flexible you are with your goals. If you absolutely need a certain amount of money at a specific time, then you need to invest in less volatile investments such as cash or short-term bonds. But then to reach those goals, you’ll have to save more since you’ll earn very little in the way of returns. However, if the timing of your goal is more flexible, you can invest more in stocks and possibly accomplish your goal sooner – or, if the market disappoints, later. The more you invest in stocks, the more you broaden the range of possible future values of your portfolio, for better and for worse.

Other sources of retirement income

You might be among the lucky minority that will receive a defined-benefit pension (i.e., a monthly retirement check for the rest of your life, courtesy of your employer). Or you might decide to purchase such a benefit yourself in the form of an income annuity. Maybe you own some property and receive rents every month. Whatever the source, a reliable stream of retirement income can factor into an asset allocation.

Retirees whose total retirement expenses are covered by a pension (or other income) can take more risk since a market downturn likely won’t change their lifestyle or require them to go back to work. For those who rely on their portfolio for at least some of their income, they have to play it safer. Retirees should keep at least five years’ worth of expenses out of the stock market. That might be safe enough for some investors, especially those who have a pension as a safety net. For those whose pension doesn’t cover much, then the portfolio should be closer to a traditional mix of stocks, bonds and cash.

However, all this depends on how safe that income stream is. Just as bond issuers occasionally go bankrupt, there’s a chance the company behind your “guaranteed” retirement income will go belly-up. Pensioners need to regularly assess the financial viability of their pension provider. Even many state and local government pensions are underfunded, to the tune of $3 trillion across all government plans, according to ratings agency Moody’s. Just ask the pensioners of Detroit, who are currently facing potential cuts. Private pensions are backstopped by the Pension Benefit Guaranty Corp. (PBGC), but it only insures benefits up to a certain amount ($57,477 for plans terminating in 2013). Plus, the PBGC itself is underfunded by more than $20 billion. Government pensions are backed by the power to raise taxes, which will lead to some heated debates as more and more Boomers retire and strain government budgets. As for annuities, make sure the insurance company sending the checks is rated A or higher by Moody’s, Fitch and S&P.

Your human capital

If you’re still working, you’re a living, breathing money machine. Every workday, you exchange your hours for dollars. Some experts think those dollars should be taken into account when you allocate the dollars in your portfolio.

Your ability to earn (and grow) a paycheck is known as your “human capital.” It can include your skills, education, network, charisma, and other traits that you can turn into a paycheck. But not all paychecks are created equal. Some are relatively stable and secure, others are more variable and unpredictable.

Finance professor Moshe Milevsky has written about this quite a bit, often asking this question: “Are you a stock or a bond?” (In fact, that’s the title of one of his books.) If your job is safe and your income steady and reliable, you’re more like a bond and can take more risks with your assets. On the other hand, if your job and compensation are very sensitive to the health of the economy, you might play it safer to mitigate the risk that your paycheck and portfolio are down significantly at the same time.

You also don’t want too much of your human capital and your investment capital reliant on the same company, or even industry. This most obviously applies to workers who own company stock. One rule of thumb is that investors should have no more than 5 percent of their portfolios in one stock. But if that one stock is in the company that also puts food on your table, then even 5 percent might be too much since you don’t want your paycheck and a large portion of your portfolio to disappear in case your company becomes the next Blockbuster Video, Circuit City, Lehman Brothers, or other company that once seemed on top of the world but is now gone or barely breathing.

Your adviser diversity

Your portfolio was built on a foundation of education, judgment and advice. Investments made it into your accounts thanks to the decisions of one or more people who think they know a thing or two about investing. One of those people may be a financial adviser, who recommended that you buy certain stocks or funds. Others could be the managers of the funds you own, who decide what the fund itself should own. Then, of course, there’s you – the person who plays the role of portfolio bouncer, standing at the front door and deciding who gets to come in and who gets thrown out.

Here’s the thing about people: They’re not perfect… and that includes you (as smart and good-smelling as you are). Even the world’s greatest investors make mistakes, and some turn out to be not as great as we all thought. The investing world is full of examples of once-great funds or fund managers who lost their touch — assuming they had it in the first place, and their “outperformance” wasn’t really “dumb luck.”

To mitigate this “everyone’s fallible” risk, make sure you’re incorporating a diversity of analyses and opinions into your portfolio.