. . . even if you need to incur an early-withdrawal penalty
https://www.wsj.com/personal-finance/short-term-cds-long-term-investments-6da40236
In many cases, according to new research, investors would be better off choosing longer-term CDs and paying an early-withdrawal fee if they need the money before the CD reaches maturity.That is because most banks—intentionally or unintentionally—have “internal inconsistencies in their deposit pricing,” meaning that their interest rates on shorter-term CDs yield less than those on a longer-term CD, even with an early-withdrawal penalty, according to study co-author Francis A. Longstaff, a finance professor at UCLA.