function [violet] = violet(t,S,T,E,r,sigma)
%UNTITLED Summary of this function goes here
%   Detailed explanation goes here
d1=(log(S/E)+(r+(sigma^2)/2)*(T-t))/sigma*sqrt(T-t);
d2=d1-sigma*sqrt(T-t);
nd1=0.5*(1+erf(d1/sqrt(2)));
nd2=0.5*(1+erf(d2/sqrt(2)));
violet=(S*nd1)-E*exp(-r*(T-t))*nd2;

end

