Hope falls under the virtue category of Transcendence. Transcendence describes strengths that provide a broad sense of connection to something higher in meaning and purpose than ourselves.
Optimism is closely linked with having a particular explanatory style (how we explain the causes of bad events). People using an optimistic explanatory style interpret events as external, unstable and specific. Those using a pessimistic explanatory style interpret events as internal, stable and global.