I have samples of bounded random variables $X,Y$ for time $t=1,2,\ldots T$. Denote them as $(x_1,y_1),(x_2,y_2),\ldots (x_T,y_T)$. Overall, the correlation between $X$ and $Y$, as calculated from the samples, is not high. But I suspect that they may be highly correlated in some subset of their definition, i.e. within a box $a\le X \le b, c \le Y \le d$ or some circle $\mathcal{C}$.
Is there an algorithm or procedure to zero down on such a region? To be more rigorous, if I specify the minimum size of the box or the circle mentioned above, it there any way to find the region where $X,Y$ have maximum correlation?