clear all V=1; N=100; while V<10000 T=390; % Number of time intervals (390 is the number of minutes in a trading day) Delta=round(rand(1,T)); % Random price change vector Sign=round(rand(1,T)); % Vector that determines the direction of price change j=1; while j