The phrase "Don't put all your eggs in one basket" is another way of saying that no one should risk all of their resources on any single idea, venture, or asset. Put simply, if all your eggs are in one basket, and the basket breaks or spills, then you'll lose all your eggs.

It's especially important to follow that advice in your financial life by diversifying your investments across different types of assets and securities. Ideally, diversification lowers risk in a portfolio while still enabling returns high enough to achieve an investor's financial goals. For instance, a portfolio consisting of just one stock is far too risky -- no matter how strong the bullish argument for that stock may be. A variety of factors could derail the investment, including fraud, deteriorating economic conditions, and increased competition.

At the same time, investors who choose a less "risky" investment class -- say, a 30-year U.S. Treasury bond -- will probably face other risks. Namely, while these investors face far less danger of losing their principal, they run a very real risk of not achieving returns high enough to reach their goals or even maintain their buying power in the face of inflation.

A chalkboard showing a circle graph and a list of different assets.

A portfolio should be made up of many different types of assets, depending on the risk appetite, age, goals, and interests of the investor. Image source: Getty Images.

The importance of asset allocation

The aim of diversification is to avoid each extreme, allowing investors to achieve high returns while reducing volatility along the way and making it unlikely that they will suffer from a permanent loss of capital. The primary means of accomplishing this is through asset allocation, the practice of dividing investment money into different classes of assets -- such as stocks, bonds, real estate, and cash -- that will act independently of each other. Some more exotic asset classes include cryptocurrencies, gold, fine art, commodities, and much more. These classes can be further divided into several sub-sectors that will be examined more closely below.

Asset allocation is extremely important. Studies show that asset allocation is a larger contributor to a portfolio's overall returns than even individual stock selection. A 2000 study by economists Roger Ibbotson and Paul Kaplan concluded that more than 90% of a portfolio's long-term returns were driven by its asset allocation. While this study was meant more for institutional investors and fund managers than for individual investors, it cannot be denied that a portfolio's asset composition plays a large role in its long-term returns.

What is the modern portfolio theory?

The modern portfolio theory stems from "Portfolio Selection," a research paper published in 1952 by Harry Markowitz, who was later awarded a Nobel Prize in economics for his important contribution. The key takeaway from Markowitz's paper is that assets should not be weighed by their risk-reward proposition individually but, rather, by how each asset fits into an overall portfolio. For an over-simplified example, a speculative biotech company's stock might not be considered too risky for an investor with a suitable time horizon and a basket of other, more conservative investments in their portfolio.

Different types of investment classes and sub-classes

Before we go any further, let's discuss the different types of assets a portfolio can include.

Cash: This includes checking accounts, savings accounts, money market deposit accounts (MMDA), and certificates of deposit (CDs). These types of accounts share a few things in common. For starters, they are all FDIC-insured, meaning the Federal Deposit Insurance Corporation will guarantee the safety of your money up to $250,000 per depositor and account at a covered bank. Since 1933, when the program was instituted, no money has been lost in a qualified account.

Second, cash is highly liquid. The funds from these types of accounts can usually be withdrawn and used quickly and easily. Of course, there are a few exceptions. Most CDs, for instance, have an early-withdrawal penalty fee, and some high-yield savings accounts also come with a monthly limit for withdrawals.

Finally, the returns offered by these types of accounts are reliable but fall far below the historical returns of other asset classes.

Cash is generally reserved for meeting any near-term spending needs, including day-to-day living expenses, as well as an emergency fund, which can cover the surprises life throws at us.

Bonds: A good working definition of bonds is that they are debt instruments that corporations, municipalities, and other government entities use to raise capital. For instance, let's say a city needs to upgrade its sewer system for $100 million, a sum far outside its normal budget. For such a large expenditure, it could issue bonds to cover the cost. These bonds would mature after a fixed period of time and would pay a defined interest rate. Interest payments are usually made semiannually. When bonds reach maturity, the issuer pays the principle back to the investor in full.

Bonds are considered a lower-risk investment than stocks or real estate, but that does not mean they are risk-free. An issuer may fail to make an interest payment or pay the principal back -- this is known as a bond default. You can gauge how likely it is that a bond issuer will default on its payments by looking at its bond rating. The higher the bond rating, the greater the financial health of the issuer, and thus the lower the risk of default. Generally speaking, a higher bond rating means a lower yield, because there is less perceived risk in the investment.

Corporate bonds are issued by companies to raise money for capital expenditures, such as a new factory or an increase in research and development.

Municipal bonds, aka "muni bonds," are issued by local government entities to raise money for myriad things, from the aforementioned sewer upgrade to building new parks, hospitals, and roadways. Investors do not have to pay federal taxes on the interest they receive from municipal bonds. If the municipal bond is issued within the investor's home state, then state and local taxes on the interest payments are also not assessed.

Finally, U.S. Treasury bonds, commonly known as "T-bonds," are issued by the federal government and have maturities of over 10 years. They are considered virtually risk-free, as it would take a catastrophic event for the U.S. government to fail to meet its debt obligations. Because of the low perceived risk in investing in U.S. Treasury bonds, the yields are almost always lower than investors can receive from corporate bonds. Income from Treasury bonds is exempt from taxes at the federal level, but not at the state or local level.

As Foolish contributor Dan Caplinger puts it, bonds are designed to "preserve capital, provide income and predictable returns, and hedge against slower economic growth in which bond investments tend to outperform."

Stocks: A stock represents a stake of ownership in a business. If I owned one stock of a company that had a total of 100 shares, then I would own 1% of the business and be guaranteed certain legal rights, including the right to vote at shareholder meetings and to receive any dividends the company may pay to shareholders.

Investors can participate in the stock market through several different approaches. Broadly speaking, they can buy individual stocks or invest in mutual funds or index funds. While I believe investors can definitely beat the market by maintaining a long-term mindset and taking time to research companies, passive investing is a wonderful strategy for investors who don't have the time or interest to keep up with individual stocks.

Mutual funds employ active managers who use a variety of different strategies, such as value or growth investing, to boost the fund's returns. The advantages of mutual funds include increased diversification and professional management. The primary disadvantage to owning mutual funds is that they charge higher fees. Due to their expenses and the fact that most mutual funds fail to outperform the broader market, many investors have turned to index funds to meet their passive investing needs.

An index fund is designed to track a specific stock index. For instance, an S&P 500 index fund simply invests in the 500 different companies that make up the index. Because index investing requires much less oversight from an active investor, the fees associated with index investing are magnitudes lower than those charged by mutual funds. Thanks in part to these lower costs, index funds outperform the vast majority of mutual fund managers. In a 2017 study conducted by S&P Global, over 88% of large-cap mutual fund managers failed to beat the S&P 500 index over the trailing five-year period.

In the third edition of the The Motley Fool Investment Guide, David and Tom Gardner heartily endorse passive index investing, writing:

With passively managed funds, you get one-stop diversified market exposure, lower fees, zero research commitment, a full knowledge of what investments the fund is making (typically market-weighted long positions in a number of well-known stocks), and -- not to be underrated -- time to spend on other things. All things considered, how Foolish can you get?

Remember: In the Foolish universe, Foolish spelled with a capital "F" is a compliment!

Other asset classes: For the purposes of this article, we won't explore other asset types in too much detail, but commodities, gold, and real estate all represent other assets that can have a place in a well-diversified portfolio, depending on the investors' interests, needs, and goals.

A golden egg resting in a nest with a label stating "Retirement" above it.

Investors should carefully allocate capital to different asset classes to ensure a smooth retirement. Image source: Getty Images.

So what is the perfect asset allocation for my portfolio?

The best way to allocate assets in your portfolio is largely a personal choice, dependent upon many factors including your age, risk tolerance, and financial goals. Your own personal situation plays a huge role, too. For instance, I would give far different advice to two different 35-year olds, both married with two kids, if one was earning a median salary while the other had just won the Powerball lottery.

Richard Ferri, CFA, strongly makes this point in his book All About Asset Allocation, writing:

Your investment policy and portfolio asset allocation will be unique. It will be based on your situation, your needs today and in the future, and your ability to stay the course during adverse market conditions. As your needs change, your allocation will also need adjustment. Monitoring and adjusting is an important part of the process.

In other words, there is no perfect asset allocation; there is only a perfect asset allocation for you. And not only is asset allocation personal, but it's also dynamic. It changes over time as you age, your financial situation changes, and your goals evolve.

Weighing the risk vs. the time horizons of your investments

Only Doc Brown and his time-traveling sports car could tell you the perfect asset allocation for your portfolio. The rest of us have no way of seeing the future. All we can do is draw reasonable conclusions from what history tells us. The best way to accomplish this goal would be to look at the time horizon for when we might need the money we're investing.

Any money investors might need within a year's time should be in cash. Period. Taking a chance and investing that money in bonds or stocks is foolhardy, as there is a significant chance that a percentage of your principal could be lost before you need it. Keeping the principal safe and liquid is a smart thing to do for any money that might be needed quickly.

Money that might be needed in the next two to five years should be in relatively safe, income-producing investments -- think CDs, bonds, and Treasury bills.

Finally, any money that's going toward long-term goals further than five years out, such as retirement, should generally be invested in stocks. This is because stocks, over long periods of time, far outperform nearly all other asset classes, even though they may lose value in a given year. From 1926 to 2011, small-cap stocks returned 11.9%, large caps returned 9.8%, long-term Treasury bonds yielded 5.7%, and Treasury bills yielded 3.6%, according to Ibbotson. In The Motley Fool Investment Guide, the Gardner brothers write:

Invest money you plan on keeping in the market for at least five years. (We recommend a lifetime.) Stocks can and will go down. Sometimes a lot. And sometimes the market will take years to recover and reach new highs. But the long-term prognosis is tremendous ... Holding periods of ten years resulted in positive returns 88 percent of the time. For twenty- and thirty-year holding periods, that number jumps to 100 percent.

Full disclosure: All the money I have invested for a time horizon longer than five years is invested in the stock market.

Good rule of thumb

A good rule of thumb that many financial advisors adhere to is to subtract your age from 110. The answer should be the percentage of your portfolio that's invested in the stock market. For instance, a 40-year old using this formula would invest 70% (110-40 = 70) of their portfolio in stocks and the remaining 30% in bonds. The idea is that young investors, who have a lifetime of saving and investing ahead of them, will sport fairly aggressive portfolios. As investors age, their portfolio's mix of stocks and bonds will gradually skew more conservative.

Investors can tweak the formula based on their appetites for risk. For example, more aggressive investors can up the number to 120, allowing a 40-year-old to invest 80% of their portfolio in the stock market, while only allocating 20% to bonds.

The relationship between risk and diversification

Many investors mistakenly believe that if they increase their portfolio's diversification, they decrease its risk. This is not necessarily true, especially for investors who spend time studying individual stock investments. For these investors, a concentrated portfolio might actually increase returns and decrease risk, even if their portfolio's beta -- a measure of volatility -- is higher than the market's average. In Warren Buffett's 1993 letter to Berkshire Hathaway Inc. (NYSE: BRK-A)(NYSE: BRK.B) shareholders, the Oracle of Omaha explained this concept:

The strategy we've adopted precludes our following standard diversification dogma. Many pundits would therefore say the strategy must be riskier than that employed by more conventional investors. We disagree. We believe that a policy of portfolio concentration may well decrease risk if it raises, as it should, both the intensity with which an investor thinks about a business and the comfort-level he must feel with its economic characteristics before buying into it. In stating this opinion, we define risk, using dictionary terms, as 'the possibility of loss or injury.'

He continued:

If you are a know-something investor, able to understand business economics and to find five to ten sensibly priced companies that possess important long-term competitive advantages, conventional diversification makes no sense for you. It is apt simply to hurt your results and increase your risk.

I largely agree with this concept. While I hold positions in 27 different stocks and indexes, the top 10 positions in my portfolio account for nearly 70% of it. At the end of the day, however, you have to decide what is best for you. Only you know your long-term goals, and only you know how much risk you're willing to take with your money. That being said, understanding proper asset allocation can go a long way toward helping you achieve your long-term financial dreams.