How to store time series data in a list (or any other data structure) to get reasonable trends over a variety of horizons?

Say I want to store a forex rate trend in which, I receive two updates every second on average. But I don't want to store all updates against the timestamp over a day as the data would be huge. But I want to show every update in the last two minutes, every second update in the last 1 hour and so on with reducing frequencies over a day. Which algorithm/data structure is best for this?


You could use a circular buffer. But generally StackOverflow is not for questions like that.


 ? Difference between two list in java
 ? Simplest code for array intersection in javascript
 ? JTable design to synchronize with back-end data-structure
 ? How do I remove objects from an array in Java?
 ? How are Python's Built In Dictionaries Implemented
 ? How are multi-dimensional arrays formatted in memory?
 ? Split a collection into `n` parts with LINQ?
 ? How to Correctly Use Lists in R?
 ? Proving that maximum item in a min-heap must be at one of the leaves
 ? How Do I Choose Between a Hash Table and a Trie (Prefix Tree)?