There's no question that 2020 was a year like no other. The stock market experienced both a record decline and a record recovery in the space of months, with the worldwide pandemic as a backdrop. Given the changes in the investing landscape last year, there were important lessons that were learned as a result.

On this clip from  Motley Fool Live recorded on Dec. 23 2020, "The Wrap" host Jason Hall and Fool.com contributors Danny Vena and Lou Whiteman each shared the biggest investing lesson they learned over the course of last year.

Jason Hall: All right, guys. Let's spend a couple of minutes doing our hindsight 2020. We've got about 12 minutes left. This show is absolutely whizzed by. Who wants to kick this off here? Think about maybe it's a big lesson from 2020.

Danny Vena: I can start off. One of the things that really stands out to me in 2020, is that you can go by and have the correct investing thesis for years and get reasonable returns.

Then something can happen that proves the investing thesis correct to the rest of the world, and your gains can go through the roof.

We've talked about this before, but I have been a firm believer in the future opportunities for e-commerce, for digital payments, for streaming video, for cloud computing, for telehealth, and have invested accordingly.

Over the last couple of years, my portfolio has done really well, but this year has far exceeded any of those expectations, not because of anything that I've done. It's not because I'm all that smart. Honestly, I'm not that smart. [laughs]

But what I will say is that I had confidence in the investing thesis. It took several years to play out. But now, everybody else believes in the investing thesis that I believed in a few years ago, and the returns in my portfolio reflect that.

Jason Hall: Lou, what do you have for us?

Lou Whiteman: He's kind of smart. [laughs]

Jason Hall: He is, he's really smart, but there is something there. Warren Buffett and a lot of really successful people talked about the fact that when it comes to investing, guts are a lot more important than brains. It's your mindset, it's your temperament that pays off, and that's key. Go ahead, Lou.

Lou Whiteman: So real quick, two things that are related, both lessons from 2020. First is the power of diversification. I'm the aerospace guy here, I eat my own dog food. I have a lot of stocks that didn't do well during the pandemic that I have in my portfolio.

I just looked, I currently have 63 active positions. Only 39, so 62% are beating the S&P 500 in 2020. I'm willing to bet you guys are doing a lot better. But on average, even including those losers, my stocks have beaten the S&P 500 by 51 points this year.

Danny Vena: Nice.

Lou Whiteman: That's not Aerospace, that's MercadoLibre (MELI -2.91%), that's Teladoc (TDOC 4.81%), that's The Trade Desk (TTD 0.31%), that's Etsy (ETSY 1.01%), etc. So I'm grateful for those stocks, and I'm equally as convinced there will be a year where some of my other stocks will have to pick up on them.

Related to that, even hindsight is relative. I said this summer, if I would've known what I know now, why would I be in all these Aerospace stocks? [laughs] I could have sold them in February.

Two of my favorites. TransDigm Group (TDG 0.29%) and HEICO (HEI 0.71%), two top companies were each down over 50% in March. While we're going into the end of the year right now, HEICO is actually beating the S&P 500 and TransDigm is within four percentage points.

So even hindsight doesn't age well sometimes. So again, set it and forget it, pick good companies and try. You're not going to get louder noise than what we got in March of this year. If you can ignore that noise and just stick with good companies, you can do all right.

Jason Hall: Yeah, I think the biggest hindsight for me is that as much as 2020 was different in some ways, it was just evidence to me that what works still works, right? What worked in 2019, worked in 2020, and it's going to work again in 2021.

That's having a process, focusing on your financial goals, taking advantage of the market opportunities, but primarily trying to spend as much time in the market as you can, versus trying to time the market.

I use the tool called personal capital to try to measure my portfolio returns. Again, hindsight is also subjective. So far this year, my portfolio is up around 44% since the beginning of the year, and the S&P 500 is up roughly 15%.

A very large amount of that is the fact that I did keep a small amount of cash, not a ton of cash, and the fact that I am regularly earning. So I was able to increase the amount of money I was contributing to my investment accounts during the sell-off, and I followed my rules, and I piled in every dollar of cash that I could get my hands on into the market when stocks fell 25%, 30%, 35% and was buying as many great businesses that had fallen far more as I possibly could.

I was beating the market over my investment career before this year happened. But it's just accelerated so much, because I aggressively took advantage of that. But not by sitting on a large amount of cash, but by sitting on enough cash to keep me from getting distracted, and not anchoring on where I sold while the market continued to move higher, right?

So David Gardner's, his quote about market going up more than it goes down is a reminder that the easiest most successful way to invest is the thing that worked last year, and it worked this year and it's going to work again next year. Own great companies as long as you can, and focus on your financial goals. So that's what I learned. That's my big takeaway this year.