Assume we are given $N$ samples, let's say small timeseries of 1 hour resolution daily exchange rates - for the sake of argument. Each sample is a $24$ element vector $x$.
Then we proceed to do clustering using our favourite unsupervised learning algorithm, say K-means. Assume we use $k$ classes.
Afterwards, we observe the mean return values of the following days conditioned on the class. Meaning, for the days in class $k=1$ we have on average returns $\mu_1$ on the following day.
The statement then is the following, if a day looks like class $c$ then tommorrow you can expect returns $\mu_c$.
Here is my question:
Have we broken any rule in this process? Should we have stored some of the $N$ days for out of sample performance? It seems to me that even talking about out of sample and in sample is meaningless, since the algorithm only uses the vectors $x$ and is absolutely agnostic about the returns on the following day.