Derivation of Black-Scholes equation by riskless portfolio The following is a summary of the derivation of the Black-Scholes equation as given on wikipedia (http://en.wikipedia.org/wiki/Black-Scholes_equation#Derivation) - I have a question regarding the assumption that the specified portfolio is self-financing.
We have a two asset market:
$dB_t = B_t r dt $
$dS_t = s_t (\mu dt + \sigma dW_t)$
We introduce a European option with price $v(t,S_t)$ at time $t$. We now consider a portfolio consisting of one option and -$\frac{\partial v}{ \partial S}$ stocks. Therefore if $X_t$ is our wealth at time $t$, we must have $X_t = v(t,S_t) - \frac{\partial v}{ \partial S} S_t$.
It is then claimed that we have $dX_t = dv(t,S_t) -  \frac{\partial v}{ \partial S} dS_t$, as the portfolio is self-financing.
However, it seems to me that if we have a constant holding of 1 option in our portfolio, then the only way to make the overall portfolio self-financing is to have a constant holding of stock too (otherwise, if we increase/decrease our holding in stock, where do the extra funds for this come from?).
Typically, the way I have seen self-financing portfolios constructed is that the holding in 1 asset (for example, the risk-free asset) is not explicitly specified, and is determined by the self-financing condition (i.e. the condition that $X_t = \pi_t \cdot P_t$ and $dX_t = \pi_t \cdot dP_t$, where $\pi$ is the portfolio and $P_t$ is the price process).
Based on the above, it seems that in order to have a self-financing portfolio where we hold a constant 1 option and $-  \frac{\partial v}{ \partial S}$ shares, we must also have a dynamic holding in the risk-free asset which allows us to ensure that we can always have $-  \frac{\partial v}{ \partial S}$ shares in our portfolio without injecting external funds (and thus breaking the self-financing condition). However, if we do have this holding of the risk-free asset in our portfolio as well, then our equation for the wealth process ($X_t = v(t,S_t) - \frac{\partial v}{ \partial S} S_t$) becomes incorrect, as we are not taking into account our holding in the risk-free asset.
In summary, I don't believe that the portfolio of 1 option and $-\frac{\partial v}{ \partial S}$ shares specified in the wikipedia derivation of the Black-Scholes equation is self-financing, but the derivation makes use of the fact that it [i]is[/i] self-financing. Am I missing something?
 A: To derive the Black-Scholes PDE you demonstrate that the value of the option can be replicated by a dynamic trading strategy that holds positions in the underlying asset and the risk-free asset.  As the underlying asset price changes over time, the positions are rebalanced to ensure that the portfolio tracks the option value -- leading ultimately to the same payoff at expiration. Your confusion arises by considering the portfolio holding the option and the underlying asset. 
Suppose at time $t$ we have a replicating portfolio with positions in the underlying asset and the cash asset:
$$V_t = \alpha_tS_t + \beta_t B_t,$$
This portfolio is meant to hedge an option position -- providing the same payoff at expiration. The replication requires that the number of underlying shares matches the delta of the option
$$\alpha_t = \frac{\partial C}{\partial S}(S_t,t).$$
Over a small increment of time, the asset prices change, but just before we adjust positions the portfolio value at $t + \Delta t -$ is 
$$V_{t+\Delta t-} = \alpha_tS_{t+\Delta t} + \beta_t B_{t+\Delta t}.$$
Now we rebalance to ensure that we are holding the appropriate number of shares.  This requires either borrowing more cash to purchase shares or selling some shares and depositing the cash.  The amount needed to buy the shares is exactly the same as the amount borrowed and vice versa.  There is no infusion or withdrwal of funds. This is the self-financing condition. After the rebalancing we now hold different amounts of the assets, but the net portfolio value is unchanged:
$$V_{t+\Delta t-} = V_{t+\Delta t+} = \alpha_{t+\Delta t}S_{t+\Delta t} + \beta_{t +\Delta t}B_{t+\Delta t}.$$
The portfolio change over this interval is then
$$V_{t+\Delta t}-V_t = \alpha_t(S_{t+\Delta t}-S_t)+\beta_t(B_{t+\Delta t}-B_t).$$
In continuous time, this self-financing condition is often represented in terms of differentials
$$dV_t = \alpha_tdS_t+\beta_tdB_t$$
or stochastic integrals
$$V_t-V_s = \int_{s}^{t}\alpha_udS_u+\int_{s}^{t}\beta_udB_u.$$
This typically leads to confusion when the derivation is first encountered. The question that always arises is what happened to 
$$dV_t = \alpha_td S_t+\beta_t dB_t+ S_t d\alpha_t+B_t d\beta_t?$$ 
One point that should be mentioned is that the self-financing replicating strategy will deliver the option payoff with probability $1$ only in the limit as the length of the rebalancing interval tends to $0$.  This is related to the convexity of an option price.
Over a small time interval, if the underlying price follows a geometric Brownian motion, the self-financing portfolio and the option price will deviate by an amount
$$\Delta H =\frac1{2}\frac{\partial^2 C}{\partial S^2}S_t^2\left[\sigma^2\Delta t-\left(\frac{\Delta S_t}{S_t}\right)^2\right]+O(\Delta t^{3/2}),$$ 
where $\sigma$ is the underlying price volatility.  Then additional cash contributions may be necessary to ensure that the replicating portfolio tracks the option. 
This is called slippage, but it can be shown that using the option delta as the hedge ratio
$$E(\Delta H)=0,$$
and $\Delta H \rightarrow 0$ almost surely as $\Delta t \rightarrow 0$.
