(1) Initialize
(2) repeat  n times
(3)   for   = 2 : T  do
(4)     submit orders use (2) or (3)
(5)     evaluate trading rules use (4), (5) and (6)
(6)       If  []  then   ;
(7)        else   ;
(8)       end if
(9)     Calculate weights use (8)
(10)   Update price use (1)
(11) end do
(12) end loop
Algorithm 1: Pseudocode for the proposed artificial financial market.