Hamster you wrote" If you are closer to retirement age and cannot afford ............." it has been proven that share markets generally advance over time. Similarly there are the occasions where markets drop quite significantly, but, they do tend to correct themselves within a reasonable length of time.
To my mind it makes no difference whether you are near to retirement or not, and, that on retirement you need to be cautious (I am not talking about being reckless) in terms of your investment approach.
I invest in the market even though I retired 12 years ago and have no intention of even getting out of the market, I may review my portfolio should there be a major crash but only to rebalance my portfolio, or follow some other bargains. I have been exposed to every market correction since the 70's and within a few years have always ended up in a better situation financially.
I can't speak for others but my share portfolio is used specifically for wealth creation and is not used to augment my pension and my current comfortable lifestyle, but, I am a realist so there may come a time in 10 - 15 years time where I may have to dip into my portfolio to support my pension, but, quiet frankly by then my share portfolio would have doubled
So I am certainly not in the camp that advocates caution when investing either near or in retirement (good basic fundamentals must be applied when selecting your share portfolio, cavalier buys will burn you), but by the same token I would not advocate that people who have either commuted part of their pension or have taken funds out of investments on which they need to survive and put the funds into the share market - that may well end up badly.
My focus is very simple in application - when I die and my wife outlives me she will enjoy 50% of my then pension and my share portfolio will then generate sufficient dividend streams to assist with her living and she may have to sell some shares from time to time to top up her needs, but, the reality is that when I die her financial situation does not change for the worse but does change for the better