dt=0.01;
PK=100;
eps=Table[RandomReal[NormalDistribution[0,1]],{i,1,PK}];
w[0]=0;
Do[dw=eps[[i]]*Sqrt[dt];w[i]=w[i-1]+dw,{i,1,PK}]
sim1=Table[{i*dt,w[i]},{i,0,PK}];
ListPlot[sim1,Joined->True,PlotRange->All,AxesOrigin->{0,0}]

dt=0.0001;
PK=10000;
eps=Table[RandomReal[NormalDistribution[0,1]],{i,1,PK}];
w[0]=0;
Do[dw=eps[[i]]*Sqrt[dt];w[i]=w[i-1]+dw,{i,1,PK}]
sim1=Table[{i*dt,w[i]},{i,0,PK}];
ListPlot[sim1,Joined->True,PlotRange->All,AxesOrigin->{0,0},AspectRatio->Automatic]

wsqr[0]=0;
Do[dw=eps[[i]]*Sqrt[dt];wsqr[i]=wsqr[i-1]+dw^2,{i,1,PK}]
sim2=Table[{i*dt,wsqr[i]},{i,0,PK}];
ListPlot[sim2,Joined->True,PlotRange->All,AxesOrigin->{0,0},AspectRatio->Automatic]

dt=1./365;
PK=365;
eps=Table[RandomReal[NormalDistribution[0,1]],{i,1,PK}];
S[0]=10;
mi=0.1;
sigma=0.5
Do[
dw=eps[[i]]*Sqrt[dt];
dS=mi*S[i-1]*dt+sigma*S[i-1]*dw;
S[i]=S[i-1]+dS,{i,1,PK}]
sim1=Table[{i*dt,S[i]},{i,0,PK}];
graf2=ListPlot[sim1,Joined->True,PlotRange->All,AxesOrigin->{0,0}]
graf1=Plot[S[0]*Exp[mi*t],{t,0,1}]
Show[{graf1,graf2},PlotRange->All]

dt=1./365;
PK=365;
eps=Table[RandomReal[NormalDistribution[0,1]],{i,1,PK}];
S[0]=10;
mi=0.1;
sigma=0.5
Do[
dw=eps[[i]]*Sqrt[dt];
dS=mi*S[i-1]*dt+sigma*S[i-1]*dw;
S[i]=S[i-1]+dS^2;
Print[dS^2];
,{i,1,PK}](*wtf? preco mi nechce pocitat dS^2?????????*)
sim1=Table[{i*dt,S[i]},{i,0,PK}];
graf1=ListPlot[sim1,Joined->True,PlotRange->All,AxesOrigin->{0,0}]