Adds function that can calculate a single weighted_average value provided the requisite past samples.
Updates fetch.py so that it calculates and stores the weighted average in the database in the same commit as the fetched prices.