A Study of Bayesian Quantile Regression for Forecasting RMB Exchange Rates

: Accurate forecasting of the RMB exchange rate is crucial for global financial market participants. This study proposes a Bayesian quantile regression approach to enhance the forecasting method. This paper uses RMB and US dollar exchange rate data from the State Administration of Foreign Exchange from 2018 to 2022 to build a Bayesian quantile regression model and empirically analyze the RMB exchange rate forecast. The results show that the proposed Bayesian quantile regression model yields accurate forecasts, with a root mean squared error (RMSE) of 1.8329 and a mean absolute error (MAE) of 1.2988. Furthermore, robustness and sensitivity analyses confirm the model's reliability. The findings of this study have practical implications for financial market participants and policymakers in managing and responding to foreign exchange risk.


Introduction
The exchange rate of the Chinese currency, the Renminbi (RMB), has drawn significant attention in the global foreign exchange market due to its impact on the global economy and financial markets [1].Accurate forecasting of the RMB exchange rate is crucial for financial market participants, including investors, traders, and policymakers, to make informed decisions and effectively manage risks.In recent years, Bayesian quantile regression models have gained widespread attention as an emerging approach in economic time series forecasting [2][3][4].
However, despite the growing interest in Bayesian quantile regression models, gaps in the literature need to be addressed.Specifically, further research is required to investigate the performance of Bayesian quantile regression models in the context of RMB exchange rate forecasting and to identify potential limitations and challenges associated with their application in this field.Therefore, this study seeks to contribute to the existing literature by examining the effectiveness of Bayesian quantile regression models in forecasting the RMB exchange rate and addressing potential issues in their application.
The paper provides an overview of the relevant literature on RMB exchange rate forecasting and Bayesian quantile regression models.The methodology and data used in the study are described, incorporating Bayesian quantile regression models into the forecasting framework.The empirical results are presented and discussed, evaluating the performance of Bayesian quantile regression models compared to other methods.The results are thoroughly analyzed, and potential drawbacks and difficulties are discussed.Finally, the implications of the research and suggestions for future studies in this area are concluded, highlighting the contributions of Bayesian quantile regression models in improving RMB exchange rate forecasting accuracy.

Bayesian Principles
Bayesian principles are probabilistic statistical methods used to infer unknown parameters by combining prior knowledge with observed data using Bayes' theorem [5].The core idea of the Bayesian principle is to update the estimation of unknown parameters by integrating prior knowledge with observed data.The prior probability is the initial estimate of unknown parameters before observing the data, which can be based on experience, domain knowledge, or expert judgment.The observed data is obtained through sampling, which contains information about the unknown parameters, and the likelihood function represents the probability of observing the data given the parameter values [6].
Combining the prior probability and the likelihood function, the Bayesian theorem calculates the posterior probability, which provides an updated parameter estimation considering the observed data.The posterior probability offered a more accurate estimate of the parameters based on integrating prior knowledge and observed data.It can serve as a basis for prediction, decision-making, or inference, helping analysts and decision-makers make more informed decisions with incomplete information.
The Bayesian principle provides a powerful tool for incorporating prior knowledge and observed data to make more informed decisions, especially when data is limited or uncertain.The Bayesian principle has wide applications in finance and mathematics, such as risk management, portfolio optimization, actuarial science, medical diagnosis, etc.It can be used for parameter estimation, future event prediction, decision strategy optimization, and other purposes to improve decision-making accuracy and effectiveness [7,8].

Model Description
According to Karandikar's methodology, the Bayesian quantile regression model is created by applying the concepts of Bayesian statistics with the Python "statsmodel" package's "quantreg" library.The study sample comprises historical RMB-USD exchange rate data from 2018 to 2022, which is pre-processed to handle missing values and outliers, ensuring the quality and reliability of the data used for modeling.
This model uses the exchange rates at different quantiles, such as 25%, 50%, 75%, etc., as the dependent variable.This allows the model to capture the conditional distribution at various quantiles, providing a more comprehensive understanding of the forecast uncertainty, particularly in extreme financial crises.
Bayesian inference is employed to estimate the posterior distribution of the model parameters during the parameter estimation procedure using the Markov Chain Monte Carlo (MCMC) method [9].The posterior distribution of the parameters quantifies the uncertainty in the parameter estimates, providing a complete picture of the model's predictive performance and enabling robust decisionmaking based on the forecast results.This approach allows for incorporating subjective prior beliefs or domain knowledge, which can enhance the accuracy and interpretability of the forecasts.

Model Evaluation
Various evaluation metrics are utilized to assess the performance of the Bayesian quantile regression model.The root mean square error (RMSE), which measures the square root of the average squared difference between the model's forecasts and the actual exchange rates, indicates the overall magnitude of the forecasting errors.A smaller RMSE value indicates higher accuracy in the model's forecasts.
Additionally, the mean absolute error (MAE), which measures the average fundamental difference between the model's forecasts and the actual exchange rates, measures the precision of the forecasting errors.A smaller MAE value indicates higher accuracy in the model's forecasts.
Furthermore, the mean percentage error (MAPE), which measures the average percentage difference between the model's forecasts and the actual exchange rates, assesses the relative magnitude of the forecasting errors.MAPE is a percentage; a smaller MAPE value indicates higher accuracy in the model's forecasts.
The Bayesian quantile regression model's effectiveness in predicting RMB exchange rates can be evaluated by comparing the results of these metrics with those of other forecasting models or benchmark values.These evaluation metrics allow for a comprehensive assessment of the model's performance regarding forecasting errors' accuracy, precision, and relative magnitude.Additionally, visually examining the model's forecasts against the actual exchange rates can provide further insights into the model's performance and reliability in different scenarios.

Selection of Optimal Parameter Time Window T
The optimal selection of the parameter time window T is crucial in the Bayesian quantile regression model for RMB exchange rate prediction.T represents the historical window size, allowing the model to capture past trends and patterns, resulting in a more dynamic and informed forecast for T+1 day.The choice of T requires carefully considering including relevant information and avoiding noise from outdated data.This can be achieved through statistical methods or by incorporating domain knowledge, such as known economic events or policy changes.The chosen value of T significantly impacts the model's accuracy, enabling it to capture relevant information while reflecting current market conditions.To build the Bayesian quantile regression model, the past T days' exchange rate data is used as the independent variable, where T is a tunable parameter representing the size of the historical window.By incorporating time series information, the model can capture the past trends and patterns of the exchange rate, allowing for a more dynamic and informed prediction of the RMB exchange rate for T+1 day.This approach enables the model to adapt to changing market dynamics and make more accurate predictions, enhancing its predictive capabilities in forecasting the RMB exchange rate.
Experiments were conducted using various values of T (i.e., 5, 6, 7, 8, 9, and 10) to construct Bayesian quantile regression models for currency exchange rate prediction.The results of these experiments are summarized in Table 1, which presents the evaluation metrics of Mean Absolute Error (MAE) and Root Mean Squared Error (RMSE) for each T value.
From the results shown in Table 1, it can be observed that the predictive performance of the model gradually improves as the T value increases.As T increases from 5 to 10, the MAE decreases from 1.2209 to 1.2146, and the RMSE decreases from 1.7065 to 1.7026.Considering both evaluation metrics, the model performs best when T is set to 10.
T=10 was selected as the optimal parameter value based on the results obtained.This corresponds to using the past 10 days' data as input for predicting the exchange rate on the 11th day.This chosen parameter value will be used in subsequent experiments for conducting the model's prediction analysis.

Analysis of Prediction Results
Table 2 provides an error analysis of the prediction results for different mathematical models, including the Bayes Model, Gaussian Processes, Multilayer Perceptron, and SMOreg.The accuracy of the prediction results is evaluated using two commonly used error metrics, root mean square error (RMSE) and mean absolute error (MAE).
Based on the analysis results, the Bayes Model demonstrates the best performance in terms of forecasting accuracy, with the lowest RMSE (1.8329) and MAE (1.2988) among the compared models.On the other hand, the Gaussian Processes model exhibits the highest RMSE (23.0481) and MAE (18.564), indicating higher prediction errors than the other models.The Multilayer Perceptron and SMOreg models show intermediate performance, with RMSE values of 1.9886 and 1.8417 and MAE values of 1.4901 and 1.301, respectively.When comparing the forecasting performance of the RMB exchange rate under various quartiles, it becomes evident that the Bayesian quantile regression model performs well.The model accurately reflects fluctuations in the exchange rate and exhibits robustness in extreme situations, such as financial crises.Moreover, the Bayesian quantile regression model effectively captures tail risks in the data, resulting in more accurate and comprehensive forecasts than conventional linear regression models.
It's important to note that the evaluation metrics, including RMSE, MAE, and MAPE, are used to assess the magnitude and precision of the forecasting errors and evaluate the overall performance of the Bayesian quantile regression model.Further analysis and validation may be needed to understand the underlying reasons for the differences in performance among the models and confirm the reliability of the results.

Conclusion
This study utilized a Bayesian quantile regression model to forecast the RMB exchange rate, and forecast results for conditional distributions at various quantile levels were obtained.The proposed Bayesian quantile regression model yields accurate forecasts, as evidenced by a root mean squared error (RMSE) of 1.8329 and a mean absolute error (MAE) of 1.2988.These results suggest that the Bayesian quantile regression model can provide reliable and precise predictions for the RMB exchange rate.The model performs better than traditional linear regression models in capturing tail risks in the data, leading to more complete and reliable forecasting results.It's noteworthy that this study solely focused on the RMB-USD exchange rate and did not consider the potential impact of other external factors, such as macroeconomic indicators and policy changes, on the RMB exchange rate.Moreover, it is necessary to recognize that the model may have limitations, such as potential biases caused by data quality and sample size, that necessitate additional validation and verification to ensure the stability and reliability of the findings.
Additionally, conducting a sensitivity analysis is crucial to account for the potential variety of predictions generated by distinct initial assumptions when using the Bayesian quantile regression model.Furthermore, the selection and configuration of prior distributions demand careful consideration.

Table 1 :
Error analysis of prediction results for the different T value.

Table 2 :
Error analysis of prediction results for the different mathematical model.Based on the analysis results, the Bayes Model demonstrates the best performance in terms of forecasting accuracy, with the lowest RMSE (1.8329) and MAE (1.2988) among the compared models.On the other hand, the Gaussian Processes model exhibits the highest RMSE (23.0481) and MAE (18.564), indicating higher prediction errors than the other models.The Multilayer Perceptron and SMOreg models show intermediate performance, with RMSE values of 1.9886 and 1.8417 and MAE values of 1.4901 and 1.301, respectively.Further analysis of the prediction results, as shown in Table 2, confirms that the Bayes Model outperforms the other models with superior forecasting accuracy, as reflected by its lowest RMSE (1.8329) and MAE (1.2988) values.In contrast, the Gaussian Processes model shows higher prediction errors, as indicated by its highest RMSE (23.0481) and MAE (18.564) values.The Multilayer Perceptron and SMOreg models demonstrate intermediate performance with RMSE values of 1.9886 and 1.8417 and MAE values of 1.4901 and 1.301, respectively.