What you're talking about is often called a Hash or a Map or sometimes both together as a HashMap.
Unfortunately it's a facility that isn't supported in the Arduino C++ language
There are map objects available in normal C++, but they are incredibly expensive to use with regards to memory and they just aren't practical for use on a small microcontroller with memory measured in the kilobytes.
The closest you can probably get is to "invert" the storage, so you have a list of values that happen to be in date order (because that's when you added them) but the "key", a simple sequential number, doesn't define the date. Instead you store the date inside the array along with the data - assuming you really need to know the date.
A good concept to get to grips with for this is the struct. This is a custom data type which you define and can store a number of other different data types within itself. You can then make an array or linked list out of those new data types.
For instance, you may have:
typedef struct {
int year;
byte month;
byte day;
float gain;
float cost;
} Data;
You can then create variables of type "Data" and assign values to the items within it:
Data myEntry;
myEntry.year = 2015;
myEntry.month = 11;
myEntry.day = 7;
myEntry.gain = 100.23;
myEntry.cost = 78.0;
Or assign them directly at creation time:
Data myEntry = {2015, 11, 7, 100.23, 78.0};
If you wanted to store 100 days' worth of data you could use an array:
Data myArray[100];
Then you access each slice:
myArray[0].year = 2015;
... etc ...
I mentioned above "assuming you really need to know the date". Most of the time with this kind of method you really don't need to store the date. If you have one entry per day and you know when you started gathering data then you know that each entry is one day more than the one before it - so you know that the tenth entry is ten days later than when you started gathering data. Alternatively, if you have a 100 entry circular array (that is, when you reach the end of the array you start filling from the bottom again, so you keep the last 100 days' worth of data) and you know what the date is today you can count backwards from today to work out what date each entry is.