I don't see any reason why are we generating list of every day in period of time just to calculate cost for that day and at the end sum it - from mathematical point of view a*p + b*p + c*p + .. == (a+b+c+...)*p - and in second approach we are doing much less operations - everything is handled by db. So in my opinion we can do something like my attempt in https://github.com/mkurek/ralph_pricing/blob/5d326152033aaeb7f5ddcdcd52d67288a1af43c4/src/ralph_pricing/views/ventures_beta.py#L89 - we could calculate cost for every period when price (or total cost) is definied and then sum it - in this approach we would not need list of days and price for every day on that list - a price per unit in period of time will bu sufficient.