Science-Fiction and Fantasy have their historical generation in hope.
The early tales of Science-Fiction involved spectacular technologies, new vistas on new worlds. The new technologies speculated allowed mankind to escape his current boundaries of this world and time. Many current problems are often solved, and, while new problems are created or discovered, the early golden-age adventurers and scientists of Science-Fiction went forth to deal with them. The very concept was usually hopeful: looking forward to a new future, unafraid, rather than pining about a lost past as so many myths of the earlier ages did.
The fantasies of Tolkein and others of his time grew out of a fusion of myth, and medieval high romance. While such tales looked backward to a simpler time, there was the reach for the transcendent, the good, the noble that infused the pages of such earlier works. The concept is one of hope: fighting against supernatural and moral darkness with virtue and honor with the light of good on the side of the heroes.
While golden-age Science-Fiction looked to a future based on the hope of reason, technology and industriousness, golden age Fantasy looked back on the hopes of wonder, magic and the spiritual. Both deal with a separate but essential part of the human need of hope. Both can provide an energy that can help human beings not only deal with current circumstances, but hope for something better. In the case of Science-Fiction it is a hope of a better future, in the case of Fantasy it is hope of the power of virtue to triumph over darkness.
This, then is the original fount of speculative fiction: hope, amidst a background of wonder.