The Wells Fargo/Gallup Investor and Retirement Optimism Index jumped in the third quarter to its highest level since mid-2007.

The index, which gauges investor optimism, stands at +79, up from +62 in the second quarter. The gains have been driven by improved investor sentiment about the stock market, as 51% of investors are now “very” or “somewhat” optimistic about the 12-month outlook for the markets, up from 42% last quarter.

The index surged among retired investors — rising 36 points to +81 as they became more optimistic about the stock market and maintaining their household income.

These findings are from the third quarter Wells Fargo/Gallup Investor and Retirement Optimism Index survey conducted by telephone with 1,021 U.S. investors from August 5 to 14.