start_j = 0;
for i = 1:4
for j = start_j + 1:14
try
shortIdx(j,i)=find(mid>=.20 & mid<=.30 & expiration==xDates(i) & option_type=='c' & sym==1 & quote_date==sellDate(j),1);
longIdx(j,i)=find(ask_eod<=.05 & expiration==xDates(i) & option_type=='c' & sym==1 & quote_date==sellDate(j),1);
start_j = j;
catch
warning('Nothing there')
shortIdx(j,i)=nan;
longIdx(j,i)=nan;
end
end
end