I am trying to understand a simple thing about Delta hedging in the Black-Scholes world. I know I'm doing something blatantly wrong, I just can't see it now.
Let's say I write a call option and sell it to someone. With that money, and whatever else I need to borrow, I can set-up a self-financing portfolio of stock and bond, where the amount of stock I hold at all times is Delta.
At maturity, the value of this portfolio is exactly the payoff of the option. So if the buyer exercises the option, I can cover the pay exactly with this portfolio.
However, there's something bugging me: the final value of the portfolio is obviously calculated using the final value of the stock. Suppose that $S_T>K$, so the buyer exercises. In this case, I can just give him the stock I've been holding (will most likely be one unit), and receive $K$.
For concreteness, I've run a simulation of daily Delta-hedging, with $S_0=49$, $K=50$ and maturity 3 months. In this particular sample path, the final price of the stock is $S_T=50.277668$. I also have at maturity Delta=1, so I hold one unit of stock, and I am short $49.37889$ bonds, so that's what I owe in dollars. This is consistent with the above: the total value of the portfolio is $(S_T-K)_+$.
The option buyer thus ends up with a position of $0.2776678$. This is the value of my portfolio, so I can just give it to him and we're even.
However I can also sell the stock to him for $50$, so he gets his stock at his price, I get $50$, pay back the $49.37889$ I owe, and I end up with some money. Where did this come from?