In Black Scholes framework, assuming zero interest rates and realized volatility to be same as implied volatility, gamma pnl is exactly same and opposite of theta pnl. So if I buy an option and delta hedge then I make money on gamma but lose on theta and these two offset each other.
Then how do I recover option price from delta hedging i.e. shouldn't my pnl be equal to the option price paid?
Note: I realize if you hedge discretely rather than continuously there will be a hedging error, but please ignore this error for the purpose of this question.