Aggregation is slow

What is the total size (in MB) of your collection?

What is the RAM in your machine?

What kind of disks?

To sum all amounts an index on amount is sufficient. You might have to $project amount first. To sum the amount by date an compound index date,amount may also be helped with a $project after $match.