 Advances in Technology Innovation, vol. 10, no. 3, 2025, pp. 296-308 Modeling the Daily Average Temperature Data Using Stochastic Process and Neural Networks for Weather Derivatives Kanyarat Thitiwatthanakan1, Manad Khamkong2,*, Ravi Lonkani3, Thanasak Mouktonglang4 1Ph.D. Program in Applied Statistics, Department of Statistics, Faculty of Science, Chiang Mai University, Chiang Mai, Thailand 2Department of Statistics, Faculty of Science, Chiang Mai University, Chiang Mai, Thailand 3Department of Finance, Faculty of Business Administration, Chiang Mai University, Chiang Mai, Thailand 4Department of Mathematics, Faculty of Science, Chiang Mai University, Chiang Mai, Thailand Received 31 October 2024; received in revised form 22 March 2025; accepted 24 March 2025 DOI: https://doi.org/10.46604/aiti.2024.14456 Abstract Weather derivatives are financial instruments influenced by temperature fluctuations, impacting industries such as agriculture, tourism, and energy. Accurate temperature modeling is essential for improving risk assessment and hedging strategies. This study evaluates the effectiveness of two forecasting hybrid approaches: the Fourier Ornstein-Uhlenbeck (OU) process, a widely used stochastic model, and the Fourier-Elman Recurrent Neural Network (ERNN), a hybrid neural network-based model. Daily temperature data from Chiang Mai, Thailand, spanning January 2005 to December 2021, were analyzed. The predictive performance of each model was assessed using root mean square error (RMSE). The results indicate the Fourier ERNN model (RMSE = 0.106) significantly outperforms the Fourier OU process (RMSE = 2.299), demonstrating superior accuracy in capturing both seasonal and stochastic variations in temperature dynamics. Thus, deep learning-based hybrid models provide a more effective framework for temperature forecasting. The proposed approach has potential applications in climate risk management, weather derivative pricing, and decision-making in climate-sensitive sectors. Keywords: Temperature Modelling, Ornstein-Uhlenbeck process, Elman recurrent neural network, Fourier series, hybrid model 1. Introduction The modeling of daily average temperature is recognized as a crucial element in understanding and forecasting weather patterns across various regions. In Chiang Mai, a major city in northern Thailand, temperature dynamics have become a key focus for study, particularly because of distinct seasonal variations, including hot, wet, and cool seasons that significantly influence daily temperature changes. Accurate temperature modeling in Chiang Mai is essential not only for sectors such as agriculture, tourism, and urban planning but also for addressing broader challenges posed by climate change and for supporting financial instruments, including weather derivatives. The motivation for this study is derived from the urgent need for enhanced temperature forecasting accuracy in Chiang Mai amid evolving climate conditions. Recent studies have documented significant climate change impacts in Thailand, including a 1.30°C warming from 1970 to 2017, changes in rainfall patterns and extreme events, and sea level rise exceeding global averages [1]. Despite the availability of long-term hydrometeorological data, the detection of specific historical changes due to climate change has proven challenging, and future projections continue to lack systematic multi-model assessments [2]. * Corresponding author. E-mail address: manad.k@cmu.ac.th Advances in Technology Innovation, vol. 10, no. 3, 2025, pp. 296-308 297 In northeastern Thailand, climate change has been perceived over the past 20 years by 96.9% of farmers, leading to adaptations such as the purchase of insurance, alterations in cropping patterns, and engagement in off-farm activities; factors influencing these adaptations have been identified as dependency ratio, geographical location, current occupation, climate change knowledge, and the perceived benefits of new technologies [3]. These findings underscore the necessity for improved temperature models to support adaptive strategies and informed decision-making in sectors vulnerable to climate variability. Temperature modeling also plays a significant role in financial markets, particularly through weather derivatives that manage risks associated with climate variations. The value of these contracts is derived from underlying weather measurements and is often based on temperature indices such as cumulative average temperature (CAT), heating degree days (HDD), and cooling degree days (CDD). The first weather derivative transaction was executed over-the-counter in the United States in 1997, and by 1999, such instruments were formally introduced in key financial markets such as the Chicago Mercantile Exchange (CME) [4]. The increasing importance of weather derivatives in sectors including utilities, agriculture, and construction further emphasizes the need for accurate temperature models. In previous research, the daily average temperature has frequently been modeled using a stochastic approach, specifically, the mean-reverting Ornstein-Uhlenbeck (OU) process. This method has been widely employed in various studies, including applications in which the stochastic model was driven by a generalized hyperbolic Lévy process with seasonal mean and volatility [5]. Since temperature exhibits mean reversion and seasonal behavior rather than persistent trends over extended periods [6], the use of a mean-reverting model such as the OU process is considered appropriate. The OU process has been effectively applied to model temperature dynamics for the pricing of weather derivatives, where the incorporation of seasonality, stochastic variability, and mean reversion is essential [7]. Recent advancements in machine learning have introduced alternative approaches for temperature modeling, including neural networks. Neural networks, inspired by the structure and function of the human brain, are composed of interconnected layers of nodes (neurons) that process and transmit information. Through weighted connections, biases, and activation functions, non-linear relationships are captured, making these models particularly effective in handling complex patterns in historical temperature data [8-9]. Neural networks possess the ability to account for various influencing factors, such as seasonal cycles and sudden changes in weather patterns, a capability that renders the approach valuable for forecasting future climate behavior. In summary, the motivation for this study is the need to develop an enhanced temperature modeling framework for Chiang Mai, Thailand, using historical temperature data. Both traditional stochastic models, such as the OU process, and modern machine learning techniques, such as neural networks, have been evaluated to identify the most suitable approach for predicting temperature variations. Ultimately, improved forecasting methods are anticipated to support informed decision-making across agriculture, tourism, urban planning, and financial risk management, thereby contributing to broader efforts in climate adaptation and mitigation. 2. Literature Review Recent studies have explored stochastic modeling approaches for temperature dynamics, with applications in climate change analysis and financial derivatives. The OU process has been used to model daily temperatures in Laguna, Philippines, revealing a significant increase in both minimum and maximum temperatures from 1960 to 2018 [7]. For stratospheric temperatures, a Lévy-driven multidimensional OU process has been proposed, incorporating seasonality and autoregressive components [10]. In the context of temperature insurance pricing, a continuous time autoregressive moving average (CARMA) model with stochastic speed of mean reversion has been developed [11]. Additionally, a stochastic harmonic oscillator model has been employed for pricing temperature-based weather options, demonstrating the impact of model parameters on option prices [12]. Advances in Technology Innovation, vol. 10, no. 3, 2025, pp. 296-308 298 Later in 2020, temperature forecasting for weather derivatives valuation was enhanced through a comparison of the OU process and a generalized autoregressive conditional heteroskedasticity (GARCH) model using Zagreb data from 2000 to 2017 [13]. Forecast accuracy, evaluated by root mean square error (RMSE) and mean absolute percentage error (MAPE), demonstrated that the GARCH model yields superior predictions, thereby improving reliability. After that, in 2022, a stochastic volatility model that extends a Gaussian model with deterministic time-dependent volatility was introduced. The model parameters were estimated using Conditional Least Squares on data from eight European cities and demonstrated efficient calculation of average payoffs for weather derivatives using Monte-Carlo and Fourier transform techniques [14]. These approaches using stochastic processes contribute to an improved understanding of temperature dynamics and their applications in various fields. Artificial Neural Networks (ANNs) have shown promising results in predicting temperature and related environmental variables. Studies have demonstrated the effectiveness of ANNs in modeling soil temperature [15], atmospheric temperature [16], power generation affected by temperature [17], and maximum and minimum temperatures in the Western Himalayas [18]. Various ANN training algorithms have been compared, with the Levenberg-Marquardt (LM) algorithm performing well in multiple studies [15-16]. ANN models have consistently outperformed traditional methods like Multiple Linear Regression in terms of accuracy and error reduction [17]. Input parameters for these models typically include historical temperature data, precipitation, and other relevant meteorological variables [15, 18]. The success of ANNs in temperature prediction across diverse applications highlights their potential for improving climate-related forecasting and decision-making. In 2022, air temperature post-processing in Norway was improved using multilayer perceptrons and convolutional neural networks, reducing forecast errors compared to traditional methods [19]. In 2023, the feed-forward and Elman neural networks were developed to estimate monthly air temperatures in Turkey, creating accurate long-term temperature maps [20]. After that, the recurrent neural networks (RNNs) were applied to forecast atmospheric temperature in Chinese cities, achieving high accuracy with long short-term memory (LSTM) models [21]. Beyond temperature, an RNN with an autoencoder is employed to predict indoor PM2.5 concentrations in residential buildings, achieving low prediction errors [22]. Another study explores the application of RNNs for temperature forecasting using multivariate time series data from five Chinese cities. The researchers developed RNN-based models using atmospheric variables such as temperature, dew point, humidity, air pressure, and wind speed [21]. After that, in 2023, the feed-forward and Elman neural networks were utilized to estimate monthly temperatures in Turkey based on geographical and periodic inputs, achieving reliable long-term predictions [20]. Additionally, the RNN models were developed for forecasting temperature in Chinese cities using multivariate time series data, incorporating Ridge Regularizer and Bayesian optimization [21]. The LSTM RNN model produced the lowest prediction error. These studies highlight the effectiveness of neural networks in improving forecasting accuracy for weather-related applications. Later in 2024, A three-phase hybrid prediction model is proposed, which integrates complete ensemble empirical mode decomposition with adaptive noise (CEEMDAN), local mean decomposition (LMD), and ANN to enhance short- and long-term weather forecasting accuracy. The model is demonstrated to outperform both standalone and two-phase hybrid approaches for multi-step temperature predictions in the Upper East region of Ghana. Its effectiveness in reducing non-stationary, non-linear, and volatile signal components suggests promising applications in weather index insurance and climate risk management in agriculture [23]. These studies demonstrate the potential of various neural network architectures in enhancing weather and air quality forecasting, offering improved accuracy and resolution compared to conventional approaches. The integration of hybrid models and advanced optimization techniques has contributed to more robust and scalable forecasting frameworks. As a result, greater reliability in decision-making for climate-sensitive sectors such as agriculture and insurance has been achieved. Advances in Technology Innovation, vol. 10, no. 3, 2025, pp. 296-308 299 3. Methodology This section presents the methodology applied to analyze and forecast daily average temperature data. The approach includes data description and modeling using both deterministic and stochastic components. A Fourier Series was employed to model seasonality, while the stochastic behavior was captured using the OU process and the Elman Recurrent Neural Network (ERNN). The model evaluation criteria were also described. 3.1. Experimental Environment All experimental procedures were performed on a Lenovo IdeaPad 530S-14IKB, featuring an Intel Core i5-8250U processor, 16 GB of RAM, and a 256 GB SSD, operating on Windows 10 Pro. The software environment utilized R version 4.4.1 within RStudio version 2024.04.2+764. Various R packages supported the analysis: the forecast package facilitated Fourier series modeling and statistical testing, while the RSNNS package, an R interface to the Stuttgart Neural Network Simulator, enabled ERNN implementation. A fixed random seed (set.seed(51237)) was applied across all pertinent experiments to ensure the consistency and reproducibility of the neural network model. 3.2. Data Description The daily maximum and minimum temperatures of Chiang Mai, Thailand, recorded between January 2005 and December 2021 by the Thai Meteorological Department, were used to compute the daily average temperatures. This dataset, spanning over 17 years, provides sufficient temporal coverage to observe seasonal trends and long-term variability. To enable a clearer statistical analysis, February 29 was excluded to maintain uniformity in the time series. Descriptive statistics such as mean, median, standard deviation, skewness, and kurtosis were calculated to examine the distribution and variability of the data. The temperature values ranged from 11.05°C to 35.15°C, indicating a significant spread. The presence of a slightly left-skewed distribution and moderate kurtosis reflects variability that is essential for validating both linear and non-linear models used in this study. 3.3. Temperature Model The daily average temperature data was divided into a seasonal component and a stochastic component, which could be easily written as t t t T D X= + (1) where Tt is the daily average temperature at time t, Dt is the seasonal component at time t and Xt is the stochastic component at time t [7]. In this work, the seasonal component, Dt, was modelled using a deterministic function, which was a Fourier Series, which effectively captures periodic patterns in the data. Meanwhile, the stochastic component, Xt, was modelled using the OU process and the ERNN to capture both mean-reverting behavior and complex nonlinear dynamics. 3.4. Fourier Series Analysis The Fourier Series is based on the concept that any periodic signal can be represented as a sum of sine and cosine functions, each with different frequencies [24]. This approximation is obtained by calculating the coefficients that define the amplitude of each component in the series. Therefore, Fourier techniques are widely used to describe periodic data, which is suitable for applying to temperature data [25]. Advances in Technology Innovation, vol. 10, no. 3, 2025, pp. 296-308 300 For a real-valued integrable function D(t), the trigonometric form of the Fourier series representation of D(t) is shown as 0 1 ( ) ( cos( ) sin( )) n n n n n D t a a n t b n t   = = + + (2) where 𝑎0 is the direct current offset of data (n = 0), 𝑎𝑛 is the sine amplitude of the nth harmonic, bn is the cosine amplitude of the nth harmonic, n is the order of the harmonic analysis, and ωn is the frequency [26]. The value of 𝑎0, 𝑎𝑛 and bn are also called the Fourier coefficients of y(t) [24]. In this study, since the data set was daily data, the frequency of the Fourier series was computed as 𝜔𝑛 = 2𝜋 365 . Typically, the original time series was approximated by using a limited number of terms from the Fourier series, determined by selecting an appropriate order for the series [27]. After applying the daily average temperature data to the Fourier series model, the parameters were estimated by the ordinary least squares method in multiple regression. 3.5. The Ornstein-Uhlenbeck process The OU process [7] is the most widely used model for deseasonalized data, Xt, and the stochastic differential equation is expressed as ( )dX X dt dW t t t   = − + (3) where Xt denotes the stochastic component at time t, 𝛼 denotes the mean reversion coefficient, 𝛽 represents the drift of the process, 𝜎 is the volatility, Wt is the standard Wiener process. An exact solution for Eq. (3) is expressed by ( ) ( ) (1 ) t t s t s t u t s u s X X e e e e dW       − − − − − = + − +  (4) where s < t. A discrete form of Eq. (4) is written as 2 1 1 (1 ) 2 k k k k k k e X X e e        −  −  −  + − = + − + (5) where Xt denotes the stochastic component at time t, 𝛼 denotes the mean reversion coefficient, 𝛽 represents the drift of the process, 𝜎 is the volatility, and 𝜔𝑘 represents a sequence of independent and identically distributed (IID) standard normal random variables [7]. Using the approach proposed by Tang and Chen [28], the parameters Xt are estimated through the following equations 1 log( ) = − (6) 2  = (7) ( ) 1 2 3 12 1   − = − (8) where 1 2 1 1 1 1 1 1 1 2 2 2 1 1 1 ( ) n n n i i i i i i i n i i i n X X n X X n X n X  − − − − = = = − − − − = − = −     (9) Advances in Technology Innovation, vol. 10, no. 3, 2025, pp. 296-308 301 1 1 1 1 2 1 ( ) 1 n i i i n X X   − − = − = −  (10) 1 2 3 1 1 2 1 1 [ (1 )] n i i i n X X    − − = = − − − (11) where �̂� is the estimated mean reversion coefficient, �̂� represents the estimated drift of the process and �̂� is the estimated volatility. The procedure of the Fourier-OU process model is illustrated in Fig. 1. The input temperature data are first decomposed into two components: the seasonal component and the stochastic component. The seasonal component is captured using the Fourier series. Simultaneously, the stochastic component is modeled using the OU process to obtain the random part. These two outputs are then combined to reconstruct the final output. This modeling framework enables the separation of periodic trends and random fluctuations, facilitating more accurate forecasting of time series behavior. Input T Stochastic Component Seasonal Component OU-Process Fourier Series D̂ ˆ ˆX D+ Output T X̂ Fig. 1 The procedure of the Fourier-OU process model 3.6. The Elman Recurrent Neural Network Artificial neurons are arranged in layers and connected, similar to synapses in the brain. The internal layers are known as hidden layers, which contain any number of neurons. The final layer is the output layer, where the number of neurons coincides with the number of outputs. Increasing the number of neurons and layers enhances the learning capacity of ANN, enabling them to process more complex data [29]. Fig. 2 Structure of Elman recurrent neural network [8] Advances in Technology Innovation, vol. 10, no. 3, 2025, pp. 296-308 302 Based on this foundational framework, more sophisticated architectures, such as the ERNN, have been developed to capture and retain contextual information within a hidden layer. The ERNN represents a simple recurrent neural network that consists of input layers, hidden layers, output layers, and recurrent layers or context layers [8-9]. Through the recurrent layer of the ERNN, outputs from the hidden layer are fed back to the hidden layer. This evaluative process enables the ERNN to acquire, identify, and generate spatial and temporal patterns. A single neuron in the hidden layer is connected to a single neuron in the recurrent layer with a constant weight of one. Therefore, the recurrent layer acts almost as a snapshot of the previous state of the hidden layer. The number of neurons in the recurrent layer is equal to the number of neurons in the hidden layer. A neuron in each layer transfers information to the next by calculating a nonlinear function of its combined weighted inputs. As a result of this setup, the network is capable of efficiently processing and responding to complex patterns [8]. Fig. 2 shows the ERNN model, where m is the number of input layers, n is the number of hidden layers and one output unit. Let eit be the set of input vectors of neurons at time t where i = 1, 2,…, n, Xt+1 be the output of the network at time t + 1, hjt be the output of the hidden layer at time t where j=1, 2, …, m, and cjt be the recurrent layer where j = 1, 2, …, m. αij is the weight that links the node i in the input layer to the node j in the hidden layer. βj, δj are the weights that link the node j in the hidden layer, to the node in the recurrent layer and the output layer, respectively. The hidden layer works as follows: the inputs to all neurons in the hidden layer are provided by 1 1 ( ) ( 1) ( ) n m jt ij it j jt i j net k e k c k  = = = − +  and (12) ( ) ( 1), 1, 2,..., , 1, 2,..., jt jt c k h k i n j m= − = = (13) The outputs of the recurrent layers are expressed as ( ) 1 1 ( ) ( 1) ( ) n m jt H jt H ij it j jt i j h f net k f e k c k  = = = = − +         (14) where the activation function, 𝑓𝐻, in the recurrent layer is a linear function. The output of the hidden layer is shown as 1 1 ( ) ( ) m t T j jt j X k f h k + = =        (15) where 𝑓𝑇 is a linear function as the activation function [8]. The procedure of the Fourier-ERNN model is shown in Fig. 3. The input temperature series is separated into a seasonal component and a stochastic component. The seasonal component is extracted using a Fourier Series to produce the deterministic part, while the stochastic component is modeled using the ERNN. This hybrid architecture enables the model to capture both regular periodic patterns and complex temporal dependencies. Input T Stochastic Component Seasonal Component ERNN Fourier Series D̂ ˆ ˆX D+ Output T X̂ Fig. 3 The procedure of the Fourier-ERNN model Advances in Technology Innovation, vol. 10, no. 3, 2025, pp. 296-308 303 3.7. Model evaluation In this study, the effectiveness of the models was assessed using the quantitative statistics containing RMSE and mean absolute error (MAE), which are widely used measures of the difference between predicted values and actual observed values [30]. 1 1 ( ) n tt t RMSE y y n = = − (16) and 1 | | n tt i y y MAE n = − =  (17) where yt is the actual daily average temperature at the time t, �̂�𝑡 is predicted temperature value at the time t from the hybrid model and n is the number of observations. 4. Result The daily average temperature data for Chiang Mai, Thailand, during the period from January 2005 to December 2021 is shown in Fig. 4. The dataset contains 6,205 values, with any missing data filled using linear interpolation. February 29th was removed to simplify the calculations. Fig. 4 The average temperature of Chiang Mai between January 2005 to December 2021 In addition, Table 1 provides some statistics about the temperature data. The minimum and maximum temperatures recorded are 11.05°C and 35.15°C, respectively. This indicates a temperature range of about 24°C. The standard deviation of 2.799 and variance of 7.835 reflect a moderate level of variability. Table 1 Descriptive statistics of temperature data Descriptive Statistics Value Mean 27.489 Median 27.950 Standard Deviation 2.799 Variance 7.835 Min 11.050 Max 35.150 Skewness -0.587 Kurtosis 3.501 Advances in Technology Innovation, vol. 10, no. 3, 2025, pp. 296-308 304 Although the mean value of 27.489 and the median value of 27.950 are relatively close, suggesting near symmetry, the skewness value of -0.587 indicates a slightly left-skewed distribution. The negative skewness and kurtosis values above 3 suggest that there are some extreme values, especially on the lower side. 4.1. Seasonal Component The average temperature data is fitted using a Fourier series model. The coefficients of the Fourier series are determined using the least squares method and the significant coefficients are selected. This approach allows for the effective capture of periodic fluctuations within the annual temperature cycle. The resulting function represents the deterministic seasonal behavior of the temperature data and can be written as ( ) ( ) ( ) ( ) ( ) ( ) 2 2 4 4 6 ( ) 27.489 2.673cos 0.590 sin 1.507 cos 0.652 sin 0.249 cos 365 365 365 365 365 6 0.194 sin 365 t t t t t y t t       = − + − − − − (18) The Multiple R-squared value is 0.6569, which means that about 65.69% of the variance in the dependent variable is explained by the independent variables in the model. The comparison between the Fourier series model as the blue line and the data set as the orange line is shown in Fig. 5. Fig. 5 The comparison between the Fourier series model and the data set 4.2. Stochastic Component According to Eq. (1), the deseasonalized data, Xt, is then computed and modeled using the OU process and the ERNN. After applying the deseasonalized data, Xt, to the OU process, the parameters 𝛼, 𝛽 and 𝜎 are estimated and shown in Table 2, which represent the speed of mean reversion, the drift of the process, and the process volatility, respectively. Table 2 Parameters of the stochastic model Parameters α β δ 0.25641 0.00296 1.17392 Furthermore, the graph comparison between the actual data and the Fourier OU prediction is shown in Fig. 6. The orange line represents the actual daily average temperature, while the green dashed line indicates the values predicted by the Fourier OU model. The predicted values closely follow the observed data, capturing both seasonal trends and short-term fluctuations. Advances in Technology Innovation, vol. 10, no. 3, 2025, pp. 296-308 305 Fig. 6 The comparison between actual data and Fourier OU prediction Then the deseasonalized data, Xt, is also applied to the ERNN where the number of lags is 1 and the number of hidden layers is 73. Then the output of the network is obtained. In the next step, the stochastic component is then combined with the seasonal component to complete the model as Eq. (1). The comparison between actual data and Fourier-ERNN prediction is shown in Fig. 7. Fig. 7 The comparison between actual data and Fourier-ERNN prediction 4.3. Models Evaluation As a result of the Fourier OU process, there are relatively higher errors. The RMSE of 2.29997 indicates that the average squared difference between the actual and predicted values is large, indicating that the OU process is ineffective to capture in capturing the precise fluctuations of temperature data. According to the MAE value of 1.81456, the predicted values are off by approximately 1.81 units from the actual values. The performance of each model is evaluated by RMSE and MAE and shown in Table 3. Table 3 The performance of each model Models RMSE MAE Fourier OU process 2.29997 1.81456 Fourier-ERNN 0.10670 0.03661 In comparison to the Fourier-ERNN model, the Fourier-ERNN model shows significantly better performance with significantly lower error metrics. An RMSE of 0.10670 means that the predicted values are much closer to the actual values, with smaller squared errors. The MAE of 0.03661 indicates that, on average, the predicted values are off by only 0.03661 units from the actual values, which is relatively small. Advances in Technology Innovation, vol. 10, no. 3, 2025, pp. 296-308 306 5. Discussion The findings confirm that the Fourier-ERNN model performs better than the Fourier OU process in predicting the daily average temperature of Chiang Mai, Thailand. The comparison of RMSE and MAE values shows that the Fourier-ERNN model provides more accurate forecasts by capturing seasonal trends and random variations more effectively. The RMSE of the Fourier-ERNN model is 0.10670, which is much lower than the 2.29997 obtained from the Fourier OU process, highlighting the advantage of the hybrid neural network approach. The observed enhancement in prediction accuracy aligns with previous studies that have demonstrated the efficacy of ANNs in handling complex temperature dynamics. Prior research has shown that recurrent neural networks, particularly LSTM and Elman networks, can effectively model temperature fluctuations by capturing non-linear relationships in historical climate data. The results highlighted the advantages of deep learning models over traditional stochastic methods [20-21]. This suggests that integrating a Fourier series for seasonality adjustment with ERNN for stochastic modeling can provide a robust framework for temperature prediction. However, several limitations are acknowledged in this study. The accuracy of the Fourier-ERNN model depends on hyperparameter tuning and training data selection, which may affect generalizability under changing climate trends. Periodic updates and recalibration are required. The dataset from 2005 to 2021 may not fully capture extreme climate events or long-term temperature shifts. Additionally, only temperature data were used, while including factors such as humidity, air pressure, and wind speed could improve prediction accuracy. 6. Conclusions In this study, historical weather data from Chiang Mai, Thailand, were analyzed to develop a predictive model for daily average temperatures. The model incorporates a Fourier series to account for seasonal trends, along with stochastic components modeled using an Ornstein-Uhlenbeck (OU) process and an Elman Recurrent Neural Network (ERNN). The research aims to evaluate the model's accuracy and explore its applications in understanding climate patterns and mitigating risks. Based on the findings, the main conclusions are as follows: (1) Based on RMSE and MAE metrics, the Fourier-ERNN model significantly outperforms the OU process in predicting daily average temperatures. (2) The Fourier-ERNN framework effectively captures both seasonal trends and nonlinear dynamics inherent in temperature data. (3) The developed model enhances climate understanding in Chiang Mai and provides actionable insights for agriculture, tourism, and financial sectors vulnerable to temperature fluctuations. (4) The study demonstrates that the temperature model can be utilized to design weather derivative contracts, enabling industries such as agriculture and energy to hedge against financial risks posed by extreme temperatures. Acknowledgement Acknowledgment is extended to the Thailand Meteorological Department for providing data support. Appreciation is also conveyed to the Development and Promotion of Science and Technology Talents Project Scholarship and the Department of Statistics, Faculty of Science, Chiang Mai University, for their support of this research. Conflicts of Interest The authors declare no conflict of interest. Advances in Technology Innovation, vol. 10, no. 3, 2025, pp. 296-308 307 References [1] A. Limsakul, et al., “Updated Basis Knowledge of Climate Change Summarized from the First Part of Thailand’s Second Assessment Report on Climate Change,” Applied Environmental Research, vol. 41, no. 2, pp. 1-12, 2019. [2] M. Kiguchi, et al., “A Review of Climate-Change Impact and Adaptation Studies for the Water Sector in Thailand,” Environmental Research Letters, vol. 16, article no. 023004, 2021. [3] S. Sedtha, M. Pramanik, S. Szabo, K. Wilson, and K. S. Park, “Climate Change Perception and Adaptation Strategies to Multiple Climatic Hazards: Evidence from the Northeast of Thailand,” Environmental Development, vol. 48, article no. 100906, 2023. [4] K. Z. Tong, A. Liu, and A. Liu, “Modeling Temperature and Pricing Weather Derivatives Based on Subordinate Ornstein-Uhlenbeck Processes,” Green Finance, vol. 2, pp. 1-19, 2020. [5] T. Berhane, A. Shibabaw, G. Awgichew, and A. Walelgn, “Pricing of Weather Derivatives Based on Temperature by Obtaining Market Risk Factor from Historical Data,” Modeling Earth Systems and Environment, vol. 7, pp. 871–884, 2021. [6] S. Prabakaran and J. P. Singh, “Modeling and Pricing of Weather Derivative Market,” Global Journal of Pure and Applied Mathematics, vol. 13, no. 12, pp. 8103–8126, 2017. [7] K. I. Quindala, D. C. Cuaresma, and J. Mamplata, “Modeling the Historical Temperature in the Province of Laguna Using Ornstein-Uhlenbeck Process,” European Journal of Pure and Applied Mathematics, vol. 14, pp. 327-339, 2021. [8] J. Wang, J. Wang, W. Fang, and H. Niu, “Financial Time Series Prediction Using Elman Recurrent Random Neural Networks,” Computational Intelligence and Neuroscience, vol. 2016, article no. 4742515, 2016. [9] D. Zhang, et al., “Evolving Elman Neural Networks Based State-of-Health Estimation for Satellite Lithium-Ion Batteries,” Journal of Energy Storage, vol. 59, article no. 106571, 2023. [10] M. D. Eggen, K. R. Dahl, S. P. Näsholm, and S. Mæland, “Stochastic Modeling of Stratospheric Temperature,” Mathematical Geosciences, vol. 54, pp. 651-678, 2022. [11] M. Darus and C. Taib, “Modelling Temperature Using CARMA Processes with Stochastic Speed of Mean Reversion for Temperature Insurance Pricing,” Malaysian Journal of Mathematical Sciences, vol. 16, no. 2, pp. 273-288, 2022. [12] A. Giorgini, R. S. Mamon, and M. R. Rodrigo, “A Stochastic Harmonic Oscillator Temperature Model for the Valuation of Weather Derivatives,” Mathematics, vol. 9, no. 22, article no. 2890, 2021. [13] B. Žmuk and M. Kovač, “Ornstein-Uhlenbeck Process and GARCH Model for Temperature Forecasting in Weather Derivatives Valuation,” Croatian Review of Economic, Business and Social Statistics, vol. 6, no. 1, pp. 27-42, 2020. [14] A. Alfonsi and N. Vadillo, “A Stochastic Volatility Model for the Valuation of Temperature Derivatives,” IMA Journal of Management Mathematics, vol. 35, no. 4, pp. 737–785, 2024. [15] M. S. Khan, J. Ivoke, M. Nobahar, and F. Amini, “Artificial Neural Network (ANN) Based Soil Temperature Model of Highly Plastic Clay,” Geomechanics and Geoengineering, vol. 17, no. 4, pp. 1230-1246, 2021. [16] P. Anushka, A. H. MD, and R. UPAKA, “Comparison of Different Artificial Neural Network (ANN) Training Algorithms to Predict the Atmospheric Temperature in Tabuk, Saudi Arabia,” Mausam, vol. 71, no. 2, pp. 233-244, 2020. [17] R. A. Kazeem, J. U. Amakor, O. M. Ikumapayi, S. A. Afolalu, and W. A. Oke, “Modelling the Effect of Temperature on Power Generation at a Nigerian Agricultural Institute,” Mathematical Modelling of Engineering Problems, vol. 9, no. 3, pp. 645-654, 2022. [18] P. Joshi and A. Ganju, “Maximum and Minimum Temperature Prediction over Western Himalaya Using Artificial Neural Network,” Mausam, vol. 63, no. 2, pp. 283-290, 2012. [19] G. Araujo and F. A. Andrade, “Post-Processing Air Temperature Weather Forecast Using Artificial Neural Networks with Measurements from Meteorological Stations,” Applied Sciences, vol. 12, no. 14, article no. 7131, 2022. [20] M. Bilgili, A. Ozbek, A. Yildirim, and E. Simsek, “Artificial Neural Network Approach for Monthly Air Temperature Estimations and Maps,” Journal of Atmospheric and Solar-Terrestrial Physics, vol. 242, article no. 106000, 2023. [21] E. A. Nketiah, L. Chenlong, J. Yingchuan, and S. A. Aram, “Recurrent Neural Network Modeling of Multivariate Time Series and Its Application in Temperature Forecasting,” PLoS ONE, vol. 18, no. 5, article no. e0285713, 2023. [22] X. Dai, J. Liu, and Y. Li, “A Recurrent Neural Network Using Historical Data to Predict Time Series Indoor PM2.5 Concentrations for Residential Buildings,” Indoor Air, vol. 31, no. 3, pp. 1228-1237, 2021. [23] S. A. Gyamerah and V. Owusu, “Short- and Long-Term Weather Prediction Based on a Hybrid of CEEMDAN, LMD, and ANN,” PLoS ONE, vol. 19, no. 7, article no. e0304754, 2024. [24] U. Leith, “Modeling a Periodic Signal Using Fourier Series,” Journal of Applied Mathematics and Physics, vol. 12, pp. 841-860, 2024. Advances in Technology Innovation, vol. 10, no. 3, 2025, pp. 296-308 308 [25] E. Ekpenyong and C. Omekara, “Application of Fourier Series Analysis to Temperature Data,” Global Journal of Mathematical Sciences, vol. 7, no. 1, pp. 5-13, 2008. [26] Q. Wang, J. Feng, F. Han, W. Wu, and S. Gao, “Analysis and Prediction of Grain Temperature from Air Temperature to Ensure the Safety of Grain Storage,” International Journal of Food Properties, vol. 23, no. 1, pp. 1200-1213, 2020. [27] Y. Zong‐chang, “Fourier Analysis‐Based Air Temperature Movement Analysis and Forecast,” IET Signal Processing, vol. 7, no. 1, pp. 14-24, 2013. [28] C. Y. Tang and S. X. Chen, “Parameter Estimation and Bias Correction for Diffusion Processes,” Journal of Econometrics, vol. 149, no. 1, pp. 65-81, 2009. [29] T. Guillod, P. Papamanolis, and J. W. Kolar, “Artificial Neural Network (ANN) Based Fast and Accurate Inductor Modeling and Design,” IEEE Open Journal of Power Electronics, vol. 1, pp. 284-299, 2020. [30] M. A. Rubi, S. Chowdhury, A. A. A. Rahman, A. Meero, N. M. Zayed, and K. A. Islam, “Fitting Multi-Layer Feed Forward Neural Network and Autoregressive Integrated Moving Average for Dhaka Stock Exchange Price Predicting,” Emerging Science Journal, vol. 6, no. 5, pp. 1046-1061, 2022. Copyright© by the authors. Licensee TAETI, Taiwan. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY-NC) license (https://creativecommons.org/licenses/by-nc/4.0/).