A law function that can compare and/or average the price of a specified item and currency over X number of days.
Example how it could be used:
Let's say you want to subsidize Corn and provide a 20% rebate to the seller.
With this function you could award the farmer if they actually lowered the price of Corn by comparing their selling price to the average retail price of Corn over the past 3 days.