In the example of the 'unfailingly optimistic' Ernest Shackleton on the Endurance expedition we see that:
He had prepared
Underpinning each of these three statements is the fact that Shackleton had prior knowledge of exploration. He drew on this when he prepared for his expeditions. When Shackleton was seen to be optimistic it was because he had confidence in the preparations he had made; he knew, come what may, that there were plenty of the right supplies available. Knowing he had prepared well, based on his prior knowledge and experience, Shackleton could be optimistic about his team's chances of survival.
He planned ahead
In addition to making preparations (he had what he needed), Shackleton also planned ahead. Each stage of the intended journey was carefully scheduled and each crew member had specific roles. Shackleton and his crew knew what they would do during each phase of the expedition. Because of this, Shackleton was optimistic about what the future held.
He was pliable
Even when plans changed, Shackleton was un-phased and pliable. His experience taught him how to respond - he was adaptable and would quickly re-plan. Due to his prior experience, Shackleton was confident of his own ability to do that, and his crew were confident of it too. Shackleton did not go to pieces when faced with change; he was optimistic because knew that his where-there's-a-will-there's-a-way attitude meant that he would find practical solutions in order to ensure future success.
Optimism doesn't have to be based on nothing - it can be based on reality. It can be based on having confidence in the reality of good planning, preparation and pliability.7
Photo Credit: Uriolus via Compfight cc