Rapid fluctuations in stock prices, particularly during periods of market turmoil, can increase the risk of extreme losses and trigger risk contagion across firms. In risk management practice, Value-at-Risk (VaR) is widely used to measure potential losses at the individual asset or portfolio level. However, VaR is not sufficient to explain how the risk of a given firm changes when another firm or the market is under distress. To address this limitation, Conditional Value-at-Risk (CoVaR) is employed to measure the risk of a firm conditional on extreme conditions affecting another firm or the market, making it more relevant for representing systemic risk contributions and spillover effects among highly liquid stocks such as those included in the LQ45 index. Accordingly, this study focuses on optimizing the input variables of the CoVaR model for the returns of firms included in the LQ45 index by integrating Quantile Regression Neural Network (QRNN) as a nonlinear quantile model and Stochastic Search Variable Selection (SSVS) as a Bayesian variable selection mechanism based on posterior inclusion probability. Within this framework, VaR is first estimated dynamically using Quantile Autoregressive (QAR) and subsequently used as a reference for the distress condition in the CoVaR model. CoVaR is then modelled using QRNN, while the candidate input variables are optimized using SSVS. QRNN is chosen because it is capable of modelling extreme quantiles when the relationship between returns and risk factors is not necessarily linear and tends to vary with market conditions, whereas SSVS is employed to obtain more parsimonious inputs, reduce multicollinearity, mitigate the risk of overfitting, and improve the interpretability of dominant factors.