# Black-Scholes equation to Heat equation .(Boundary conditions)

I have been given a problem to code the heat equation which is transformed from B-S equation (European call option) .

Now the boundary conditions are for European call option: $$C(S,T)=\max(S-K,0)$$ $$C(0,t)=0$$ $$C(S,t) \sim S \space as \> S\to \infty$$ Transforming it to heat equation :$$\frac{\partial u}{\partial \tau}=\frac{\partial^2u}{\partial x^2}$$ with the initial condition: $$u(x,0)=max(e^{\frac{k+1}{2}x}-e^{\frac{k-1}{2}x},0)$$ what are the boundary conditions for this heat equation ?

• Apply the same transformation that you used to get the initial condition from the payoff function to get the transformed boundary conditions from the original ones. – LocalVolatility Mar 27 at 18:02
• The first boundary condition is $0$. I am confused about the second one. – user1157 Mar 28 at 15:29
• @LocalVolatility , do you have any link to any such paper related to my question? I am stuck. – user1157 Mar 29 at 10:11
• Please add the exact change of variables you used to get from $C(S, t)$ to $u(x, \tau)$ and what your desired boundary conditions on $C(S, t)$ are, then I'll answer the question. – LocalVolatility Mar 29 at 11:45
• quant.stackexchange.com/questions/84/… here the derivation was given. they used the same parameters but the boundary conditions of the heat equation is not given. I get weird boundary conditions. – user1157 Mar 29 at 18:40