I am designing a simple internal framework for handling time series data. Given that LINQ is my current toy hammer, I want to hit everything with it.
I want to implement methods in class TimeSeries (Select(), Where() and so on) so that I can use LINQ syntax to handle time series data
Some things are straight forward, e.g. (from x in A select x+10), giving a new time series.
What is the best syntax design for combining two or more time series? (from a in A from b in B select a+b) is not great, since it expresses a nested loop. Maybe some join? This should correspond to join on the implicit time variable. (What I have in mind corresponds to the lisp 'zip' function)
EDIT: Some clarification is necessary.
A time series is a kind of function depending on time, e.g. stock quotes. A combination of time series could be the difference between two stock prices, as a function of time.
Stock1.MyJoin(Stock2, (a,b)=>a-b)
is possible, but can this be expressed neatly using some LINQ syntax?
I am expecting to implement LINQ methods in class MyTimeSeries
myself.