Saving for retirement is easiest if you start at the beginning of your career. Since I'm in my late 30s, I have to admit: The prospect of starting from scratch would be a bit daunting. But if I had $50,000 to build a portfolio from scratch, I'd aim to focus on the long term and keep my strategy simple.

Here's exactly what I would do.

$10,000: My emergency fund

Typically, you want an emergency fund before you start investing. So if I were starting from scratch, I'd put my first $10,000 in a high-yield savings account. Though it's not technically an investment, an emergency fund is vital to protecting your investments.

Person and dog on a city bus.

Image source: Getty Images.

Should your income drop or you get hit with an unexpected expense when the market is down, you could have to sell investments at a loss if you don't have savings. That's on top of the 10% early withdrawal penalty plus taxes you could face if those investments were in a retirement account.

A six-month emergency fund is the gold standard in financial planning. Admittedly, I'd need a lot more than $10,000 to survive for six months. But it would be enough to get me through a short-term cash crunch. I'd split any extra money in my monthly budget between my emergency fund and investments until I hit my six-month goal.

$36,000: An S&P 500 fund

After putting $10,000 in my emergency fund, I'd have $40,000 remaining. If I were a beginning investor, I'd wait until I'd built an investment portfolio to pick individual stocks. Instead, I'd want an investment that could provide long-term growth and instant diversification. That's why I'd put 90% of that, or $36,000, in an S&P 500 index fund.

Doing so, I'd automatically be invested in the 500 historically profitable companies that make up the S&P 500 index. Together, these companies make up about 80% of the U.S. stock market. Some years, like 2022, my investment would lose money. But since I don't plan to retire for at least another 25 years or so, I don't care about short-term performance. In the long term, investing across the S&P 500 has always been profitable, producing average annual returns of about 10%.

I'd aim to keep investing an additional $500 a month in that same S&P 500 index fund on top of my $36,000 lump sum investment. If I earned 10% annual returns, I'd have just over $1 million after 25 years.

There are three major S&P 500 index funds that are exchange-traded funds (ETFs), which means they're bought and sold on major exchanges just like an individual stock. Any of these three funds -- the Vanguard S&P 500 ETF (VOO -2.29%), the iShares Core S&P 500 ETF (IVV -2.26%), and the SPDR S&P 500 ETF Trust (SPY -2.27%) -- is a great choice. But I'd stick with either the Vanguard or the iShares option because each has an ultra-low expense ratio of just 0.03%. That means for every $1,000 I invest, just $0.30 would go toward investment fees. 

$4,000: A bond fund

Bonds typically have far lower returns than stocks, but they're also typically less volatile. So I'd take the remaining 10% of the $40,000 I'd be investing after establishing an emergency fund and put it in a bond fund.

I'd look for a bond fund that uses the Bloomberg U.S. Aggregate Bond Index as its benchmark. The index tracks the vast majority of the U.S. investment-grade bond market. One example is the iShares Core U.S. Aggregate Bond ETF (AGG -0.31%), which has an expense ratio of just 0.04%. 

Caveat: Just as 2022 has been a bad year for stocks, it's also been a terrible time to be a bond investor. Between October 2021 and October 2022, the Bloomberg U.S. Aggregate Bond Index dropped by about the same percentage as the S&P 500, largely because bond prices fall when interest rates rise.

But again, I'm not concerned with short-term results. Historically, keeping a small percentage of your portfolio invested in bonds has been a good safeguard against stock market volatility. So I'd ignore my 2022 returns and continue adding to both my stock and bond holdings over time, knowing that each plays an important role in building a nest egg.