I have been thinking about this for a while and am at my wits end. Now assume I am pricing a call at implied vol $s$, whereas the realized volatility is $σ$. Let $C$ be the incorrect pricing function.
Let me first write how this function is born. The hedged portfolio is:
$dC-C_{S}dS=C_{t}dt+0.5C_{SS}s^2dt=r(C-SC_S)dt \tag 1$
Now the solution to this ensures that the second equation equals the 3rd, but neither of them are equal to the first.
My problem is with understanding Ito's lemma for $C$, which writes:
$dC(t,S(t,w))=C_tdt+C_SdS(t,w)+0.5C_{SS}S^{2}(t,w)σ^{2}dt \tag 2$
This statement requires no financial argument and is true as soon as $C$ is a function of $t$, $S_t$.
The problem is that in theory, one generally uses (2) to calculate hedging error.
However, the trader uses the PDE solution formed from equation (1) to calculate the price tomorrow. That is just the Black Scholes price at the same implied vol, so the increment in the marked price is not consistent with (2). At least not in a way obvious to me.
So how does the hedging error come from (2)?