On Sunday, Oct. 1, I did something really foolish. I ran the 26.2-mile Twin Cities Medtronic (NYSE:MDT) Marathon without adequately preparing for it.

Be clear about your goals
In retrospect, I should have known better. I had run a number of marathons, but none in the past eight years since my two kids were born. But I decided to run the race at the last minute for a couple of reasons.

First, having signed up for the event in April, I hated to waste the $85 entrance fee. (I am sure you are asking yourself who in their right mind would actually pay for the privilege of running 26 miles. It's an excellent question, and I don't really have a good answer except to tell you that 8,500 other people joined me.)

Second, I did it because it was going to be a gorgeous day and I knew I'd be overcome with remorse and guilt as the runners passed by my house, which is near the course.

And finally, I did it because until late July, I had been faithfully following a training regimen, and had even completed a number of long runs of 14 to 16 miles.

For a variety of personal and professional reasons, I ran only three times between Aug. 1 and the marathon. Based on my past experience, though, I was confident that my earlier training would allow me to successfully complete the marathon. My mistake was that I didn't adjust my goal downward. I just assumed that somehow I could still run a fairly fast time.

I was right in that I did complete the marathon. I was very wrong in my optimistic projections. It took me four-and-a-half hours and it was an extremely painful experience.

Preparation
The first half of the marathon went well. I passed the halfway marker at 1:50 -- on pace for a 3:40 marathon. But then trouble set in. Though I was wearing fresh running shoes and drinking plenty of Gatorade, my legs tired and I began to experience cramps.

It was during this period that my mind began to wander. (When you still have 13 miles to run, you have plenty of time to think about a lot of things.) One of the thoughts that crossed my mind as I pounded the pavement was some of the parallels between training for a marathon and investing -- particularly long-term investing.

The first and most obvious parallel was what occurs when one underprepares for either one. As I slogged toward the finish line, I likened my situation to that of investors who thought they were better prepared for retirement than they actually were.

In retrospect, I should have run the first half of the marathon at a much more conservative pace. Because I didn't, I used up the vast majority of my energy too early. As a result, the second half of the marathon was that much more painful -- and slow. That's probably not dissimilar to someone in retirement who either continues to spend money at a rate comparable to when they were working, or is counting on a couple of stocks with recent good performances to continue to provide healthy returns and thus support their current lifestyle.

It's possible that such tactics can work. More often than not, however, they don't. And by the time someone realizes his or her mistake, it's often too late, and the adjustments that must be made can be very painful.

If you want to run the retirement race and keep your previous lifestyle, you have to sock away a lot more money, spend at a slower rate, and have a more conservative portfolio. All three approaches require some discipline.

What you cannot do is just hope that your earlier investments will somehow comfortably carry you the whole way to your goal.

Diversity is also important
The second parallel: When training for a marathon, it's important not just to be disciplined, but also to have a diversified schedule mixing both a regular number of short runs and, at least once a week, a much longer run.

It's just like portfolio diversity. A healthy mix can help you reach your goal sooner and with less effort. I liken the short runs to the regular monthly contributions I make to my various retirement accounts, and the longer runs to the annual catch-up contributions I make to my IRA during the tax season. The longer runs are more like buy-and-hold investments in fairly conservative blue chip stocks -- companies such as General Electric (NYSE:GE), Coca-Cola (NYSE:KO) and Procter & Gamble (NYSE:PG). They aren't a lot of fun, but over time they can give your portfolio a solid base.

The finish line
In short, preparing for a marathon so that it doesn't induce unnecessary pain or suffering is not that much different than preparing for retirement. Both take a level of discipline and require adherence to a consistent, diversified schedule.

It's also important to remember that both are long, grueling races, and it's better to start slow and finish strong than to start strong and limp across the finish line.

Interested in other sports-related Foolishness? Check out these articles:

Don't know what steps to take to retire? Our Rule Your Retirement calculators can help, and you can try them free for a month -- and get advice on the newsletter's discussion boards.

Coca-Cola is a Motley Fool Inside Value recommendation.

Fool contributor Jack Uldrich vows to be better prepared for the next marathon he runs . He does not own stock in any of the companies mentioned in this article. The Fool has a strict disclosure policy.