When I first began thinking about investing, it was easy to get excited about start-ups (not that it isn’t any longer, but I’ve had my share of broken bones along the way).

The chance to get in on a Google, an Apple or an Amazon stock while in its infancy is everyone’s catnip.  But here’s a cautionary tale that explains what I’ve learned the hard way.

I spent over a decade at a major U.S. wirehouse lending money to wealthy individuals. In the late ‘90s, so the story went, there was a new paradigm. No longer did companies need to be profitable; heck, they barely had to have a pulse to go public with $100mm+ valuations. Millions of investors bought stock, betting on these companies’ futures. When the internet bubble burst in 2001, the department head of the credit department issued a Defcon 1 alert – get ready for margin calls.

That was because our clients had borrowed huge sums using these stocks as collateral. And, when many stock prices were cut in half (or more), the borrowers had to substitute collateral – give the bank less volatile securities, e.g., U.S. Treasuries and various forms of corporate and municipal bonds (whose value didn’t plummet as a rule) – or pay back some or all of the loans – right away.

What I learned from that experience can be summed up in a famous phrase: Pigs get fat; hogs get slaughtered. There are ways to generate a healthy return and stand a better chance of protecting yourself in difficult circumstances.

By that, I mean choosing the best SECURITY STRUCTURE.  Scintillating, I know. But stay with me.

My story above related to investors in public companies. When you invest in a public or a private company and that company goes bankrupt – without getting into myriad related details – its assets often are liquidated to repay investors. Here’s where the Capital Stack and security structure come in. And where choosing the right kind of structure to fit your risk appetite is critical.

At the top of that stack sits Liabilities – four types in the following order: senior secured, senior unsecured, convertible notes and subordinated notes. These are above either form of equity – preferred or common.

Several years ago, I was given the opportunity to invest in a private company with a remarkable solution to a common problem – I’m going to avoid going into details because what is important is what I remembered from my lessons of the ‘90s.

The company was making money. In fact, it was growing steadily. But there were some risks that could affect future revenues that worried me. More importantly, I had divided my private investment portfolio – about 10% of my overall investments – into light-your-hair-on-fire and lower-risk segments. I had already maxed out the former segment. In the event of a repeat of 2001, I wanted to try to minimize my losses.

So, rather than investing in the company’s stock, I proposed an alternative – lend money to it on a secured basis – the highest position in the capital stack. I would have a lien on collateral whose value was always going to be above a certain threshold, or the company would pay me back. And this was the only senior debt the company would hold, so I would be senior to any additional money the company might borrow. Knowing in advance that it had good enough cash flow to pay the monthly interest payments on my loan made this sound like the superior route.

The senior secured note gave me monthly interest payments plus some of the principal that I had lent, so my risk was reduced every month. The downside was that I was giving up the kinds of returns that are possible with equity. But I would be able to sleep at night knowing that, if the company were liquidated, I would likely have received some interest payments along the way plus proceeds from the asset sales ahead of everyone else.

Selecting a blend of “pigs” and “hogs” in your portfolio that is right for you should be a fundamental part of everyone’s investing strategy.