/* ** scenario04.txt - restriction scenario(set max price change ratio to the next business day). ** (C) Copyright 2005 Yosuke Amijima. All Rights Reserved. ** ** Purpose: Get the status whether or not path S is restricted. ** ** Format: status=scenario04(S,maxdaychangeratio); ** ** Input: S vector, a path to be determined whether or not it is used ** ** maxdaychangeratio scalar, maximum price change to the next day(in ratio) ** ** ** Output: status scalar, 1 if restricted, 0 otherwise ** */ proc scenario04(S,maxdaychangeratio); local n,delta; n=rows(S); delta=S[2:n]-S[1:n-1]; if abs(delta)