I wish to solve the equation: $$\frac{\partial v}{\partial t}=-\frac{\partial v}{\partial x}$$ along with the boundary conditions: $$\frac{\partial v}{\partial x}\Bigg|_{x=0}=\frac{\partial v}{\partial x}\Bigg|_{x=1}$$
I want to use an $O(\delta x)^{2}$ stencil for the spacial derivative. So I have $$\frac{\partial v}{\partial x}\Bigg|_{t=t_{i},x=x_{j}}=-\frac{3}{2\delta x}v_{i,j}+\frac{2}{\delta x}v_{i,j-1}-\frac{1}{2\delta x}v_{i,j-2}$$, The stencil for my system is then: $$v_{i+1,j}=\left(1+\frac{3\alpha}{2}\right)v_{i,j}-2\alpha v_{i,j-1}+\frac{\alpha}{2}v_{i,j-1}$$ To deal with the boundary conditions I simply evaluate the governing equation at the boundary points to get: $$\frac{\partial v}{\partial t}\bigg|_{x=0,1}=0$$ which allows me to write: $$v_{i+1,1}=v_{i,1},\quad v_{i+1,N}=v_{i,N}$$ The issue then becomes at $j=2$, for this I evaluate the initial stencil at $j=2$ to obtain: $$v_{i+1,2}=\left(1+\frac{3\alpha}{2}\right)v_{i,2}-2\alpha v_{i,1}+\frac{\alpha}{2}v_{i,0}$$ To find the point at $j=0$ I use the boundary condition again in the form: $$\frac{\partial v}{\partial x}\Bigg|_{x=0}=\frac{v_{i,1}-v_{i,0}}{\delta x}=0$$ This allows me to write $v_{i,0}=v_{i,1}$, I then can write the stencil at $j=2$ as:
$$v_{i+1,2}=\left(1+\frac{3\alpha}{2}\right)v_{i,2}-\frac{3\alpha}{2}v_{i,1}$$
However when I run this, I get a numerical instability. Any idea what I'm doing wrong?

