Is it necessary to consider stock prices at all? Can't you just use the value of current value of the stock account and its deviation from the starting value, of say $2,000? I.e. if at the end of year 1 the value of the account has dropped to $1,800, i.e. by 10% you buy (approximately) $200 worth more shares, and if at the end of the following year the value has risen to $2,200 you sell $200 worth of shares.
Daisy.