The stock market can seem unpredictable — there are a thousand details to think about and remember, and there's no shortage of anecdotal stories of massive loss and lucky wins from friends, family and co-workers. Your best bet? Becoming an informed investor.

Part of being informed is understanding where your assets are held, diversifying your portfolio to minimize risk and investing across asset classes and types.

In other words, get familiar with portfolio allocation and what kind of arrangement of assets works best for you and your goals.

Basics of portfolio allocation

Portfolio allocation is an investment strategy that aims to balance risk and reward. Allocation aligns assets according to your goals, risk tolerance and time frame.

There are three main asset classes — stocks, bonds or cash — and they all have different levels of risk and return. That means each one will behave differently, based on different factors, and perform in a particular way that's unique compared to the other two types of assets you hold.

You can find additional subclasses of assets within these three main types. These include assets like small-cap stocks, corporate bonds and money market funds.

Allocation is the specific mix of asset classes you hold in your portfolio. And your specific portfolio allocation won't look exactly like someone else's. It gives you a group of investments tailored to you.

The importance of diversification

Diversification means spreading your investments across different asset classes, industries and risk levels to ensure that your money is as protected from risk as possible. For example, your portfolio shouldn't be 100 percent technology. You probably don't want to hold 85 percent bonds, either. Both of those examples are too focused on one area. If one of those asset classes suffers, your whole portfolio tanks with it.

A diversified portfolio contains stocks, bonds, money market funds (cash), exchange-traded funds and mutual funds invested in different industries, regions, sizes and styles. A more balanced portfolio might have holdings based on factors such as:

• Sectors or industries: technology, financials, energy, consumer goods and services, health care, real estate, and utilities

• Geographic regions: domestic, international developed, emerging or frontier markets

• Size: large-cap, mid-cap or small-cap companies

• Style: growth or value stocks, corporate bonds or Treasuries, municipal bonds

How to allocate effectively

Allocating your portfolio will depend on your age, your comfort with risk and your goals. A 60-year-old and a 20-year-old will have very different-looking portfolios because their needs and timelines are far apart.

In order to allocate your portfolio effectively, you need to know three important pieces of information:

• What you plan to do with the money that you invest.

• When you plan to use that money.

• How much risk you want to take with investments.

Let's say you are 30 and your portfolio is dedicated solely to retirement. The average age of retirement in the U.S. as of 2016 is 63. That means you have 33 years of investing ahead of you.

Traditional investing advice is to be more aggressive when you're younger. As a 30-year-old focused on retirement, your portfolio should be weighted toward stocks (or exchange-traded funds and mutual funds composed of stocks). You have a long-range timeline, so stocks give you the best chance of growth while you are young.

In this situation, an aggressive investment portfolio would be 80 to 100 percent stocks; a moderate-risk portfolio would be made up of 45 to 79 percent stocks. And a conservative portfolio would be 20 to 44 percent stocks.

By keeping your portfolio allocated toward diversity in asset classes, aligned with your goals, and in step with your age, you create a solid investment base for yourself.

Charlie Shipman, managing principal at Blue Keel Financial Planning in Weston, Conn., wrote this for NerdWallet, a personal finance website.