Data Structure for Holding Metrics
Z last edited by
I am having a hard time coming up with a data structure that can hold metrics in a nice clean way. I might be a little slow and am just overthinking it, but either way figured asking here might help me get some clarification or some valuable insight into how to approach a problem like this.
So, I would like to have a data structure that can hold metrics based on what I call "Data Scope" as well as what I call "Data Slice". Data Scope is just what I use to refer to the size of the data (whole portfolio, stock sector, individual stock). Data Slice is just what I use to refer to the time period of the data (whole period, yearly, monthly).
The thing I am having a tough time wrapping my head around is how I can create an overall data structure that I can organize without giving Data Scope or Data Slice larger importance. For example, if Overall Data Structure> Data Slice > Data Scope, then I can look at the year 2019 for the stock AAPL. But, what if now I don't care about the Data Slice (time period)? What if I just want to look at everything relating to AAPL? Data Scope isn't the larger structure so I have to access all the AAPL info through different time periods.
As I said, I might be overcomplicating things (I probably am), but I would enjoy a solution as well as an explanation of where I am going wrong with my thinking.