Contrastive Similarity Learning for Market Forecasting: The ContraSim Framework