This study delves into the intricate relationships among returns of diverse indices within the Tehran stock market, employing both Pearson and partial correlation coefficients as analytical tools. Utilizing monthly data from fourteen capital market indices, the investigation applies the k-means method for clustering based on four critical attributes: risk, efficiency, average industry index, and the number of companies within each industry. The findings reveal that when the total index is considered as a controlling variable, the partial correlation analysis yields distinct insights into the interconnections among market indices, thereby highlighting the significant influence of the total index on these relationships. Moreover, the clustering analysis categorizes the indices into three distinct groups: the first cluster exclusively comprises the total index; the second cluster includes indices from the automobile, pharmaceutical, metal, cement, chemical, and food sectors; whereas the remaining indices are allocated to the third cluster. This multifaceted approach not only elucidates the dynamic interplay between different stock market indices but also underscores the variability in their interrelations when viewed through the lens of a controlled variable. The study's methodological rigor and its innovative use of multiscale partial correlation analysis contribute to a deeper understanding of the factors shaping the Tehran stock market's behavior, offering valuable insights for investors, policymakers, and scholars alike.