added 4th graph - all the profit margins
improved metric module
added DatedMetric class
added capability to calculate other profit margins than gross
simplified delta functions