BUDAPEST, Hungary -- Despite suffering setbacks at the last two races, Sebastian Vettel is still confident he can deliver Ferrari its first drivers' championship since 2007.

After crashing out of the lead of the German Grand Prix one week ago, Vettel missed out on a shot at victory in Hungary this weekend despite having the quickest car in normal conditions. A wet qualifying session on Saturday saw him start from fourth on the grid at the Hungaroring before a botched pit stop brought an end to his chances of challenging Lewis Hamilton for victory on Sunday.

He now trails Hamilton by 24 points in the standings, although the signs from the last three races is that Ferrari has the more competitive overall package. Vettel is confident that Maranello's updates in the second half of the year will give him a big enough performance advantage to overhaul Hamilton's lead.

"As we've seen this year the pendulum seems to swing once this side, once that side, and obviously if it's like this, consistency is the key -- scoring points," he said. "I didn't do myself a favour last week [in Germany] but I think it's part of racing. Stuff happens.

"Compared to last year, we lost the championship I think because our car wasn't quick enough to be a match in the final part of the season, despite what happened with the DNFs. So I hope that this year, and I think this year has shown so far that our car is more efficient, our car is stronger and still has a lot of potential to unleash -- so I'm quite confident with what's sitting in the pipeline that we can improve .

"So, we'll see. Should be an exciting second part of the year."

Vettel trails Hamilton by 24 points after finishing second at the Hungaroring. ATTILA KISBENEDEK/AFP/Getty Images

Vettel was on a different tyre strategy to his rivals in Hungary after starting on the soft compound tyre rather than the ultra-soft. If Ferrari had executed a clean pit stop he would have emerged ahead of Valtteri Bottas in the final stint and may have been able to chase down Hamilton in the lead. Nevertheless, he said the underlying pace of the Ferrari was still promising.

"We effectively passed Valtteri for P2 but then I think I got a bit unlucky with the traffic and lost a couple of seconds, and then obviously we had that little issue at the pitstop, so we ended up coming out behind -- and then it was a different race. For sure we knew from the start that qualifying, where we qualified, we tried to do something different, I was happy to do that and I think the pace showed today that we were good."