A traffic flow risk assessment method based on ARMA-GARCH-VaR model
By combining the ARMA-GARCH-VaR model with the autoregressive moving average and generalized autoregressive conditional heteroskedasticity model, the accuracy problem of traffic flow risk assessment is solved and more accurate risk assessment and management recommendations are provided.
Patent Information
- Application Number
- CN202410033745.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-10
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2044-01-10
AI Technical Summary
The existing VaR model has poor application effect in traffic flow risk assessment and cannot effectively combine the complex factors and volatility of traffic flow, resulting in inaccurate assessment.
The ARMA-GARCH-VaR model is adopted, which combines the autoregressive moving average model ARMA and the generalized autoregressive conditional heteroskedasticity model GARCH to evaluate the risk of traffic flow through data preprocessing, time series analysis and VaR value calculation.
It achieves a more accurate assessment of traffic flow risks and provides a basis for traffic managers to make decisions in traffic planning, design and safety. The assessment results are highly accurate and can reflect the characteristics and volatility of traffic sequences.
Smart Images

Figure CN118197040B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of traffic flow risk assessment, analysis and management technology in the field of big data transportation, and in particular to a traffic flow risk assessment method based on an ARMA-GARCH-VaR model. Background Art
[0002] With the acceleration of urbanization, traffic flow, as a key indicator for assessing urban traffic conditions, has become a key issue in urban transportation planning and management. Traffic flow is affected by a variety of complex factors, such as weather conditions, holidays, special events, and road construction projects. Its volatility and uncertainty pose significant challenges to traffic flow forecasting and management.
[0003] VaR (Value at Risk) models are widely used in the financial sector for risk assessment. They can predict the maximum possible loss of an investment portfolio at a specified confidence level. However, due to significant differences between the characteristics of traffic flow and financial markets, particularly in terms of traffic patterns, volatility, and susceptibility to external factors, directly applying VaR models to assessing traffic flow risk often fails to achieve satisfactory results. Furthermore, while some studies have attempted to use statistical models such as ARMA (autoregressive moving average) and GARCH (generalized autoregressive conditional heteroskedasticity) to predict traffic flow, most of these models only consider the time series characteristics of traffic flow and ignore the impact of traffic flow volatility on prediction results. Therefore, how to effectively combine these models with VaR models and innovatively apply them to the assessment of traffic flow risk has become an urgent issue. Summary of the Invention
[0004] In view of this, the purpose of the present invention is to provide a traffic flow risk assessment method based on the ARMA-GARCH-VaR model, which can comprehensively consider the key characteristics of traffic flow sequences and achieve a more accurate measurement of traffic flow risk.
[0005] To achieve the above object, the present invention adopts the following technical solution: a traffic flow risk assessment method based on the ARMA-GARCH-VaR model, comprising the following steps:
[0006] Step S1, data acquisition: collecting historical traffic flow data and its change rate;
[0007] Step S2, data processing: pre-process the sample data obtained in step S1, extract the required column attributes traffic volume and date; And Volatility(t)=|change(t)| calculates the traffic flow change rate and its volatility; the processed time series is divided into training sample set and test sample set;
[0008] Step S3, data analysis and model construction: In view of the complexity and uncertainty of traffic flow data and the defects in existing technologies, the autoregressive moving average model (ARMA) in traditional effective time series analysis methods is coupled with the generalized autoregressive heteroskedasticity model (GARCH). First, the time series stationarity test (ADF) is used to determine whether the traffic flow rate of change series is stationary. The null hypothesis of the ADF test is the existence of a unit root. If the obtained significance test statistic is less than three confidence levels, namely 10%, 5%, and 1%, the null hypothesis is rejected with the corresponding confidence level, indicating that the series data is stable and meets the conditions for establishing a GARCH model.
[0009] Step S4, establishing an ARMA (p, q) model to fit and model the traffic flow change rate series, where p and q are model orders;
[0010] Step S5, establishing a GARCH (m, s) model to fit the traffic flow change rate series and model the volatility of cryptocurrency, where m and s are the model orders;
[0011] Step S6: Calculate the VaR value according to the variance-covariance method to evaluate the value risk level of traffic flow.
[0012] In a preferred embodiment, the traffic flow is vehicle flow.
[0013] In a preferred embodiment, the traffic flow change rate sequence is determined to be a stationary sequence after ADF test.
[0014] In a preferred embodiment, the order of the ARMA (p, q) model is determined by an autocorrelation plot and a partial autocorrelation plot, and the time dependency of the traffic flow rate of change is further determined.
[0015] In a preferred embodiment, the order of the GARCH (m, s) model is determined by the autocorrelation diagram and the partial autocorrelation diagram, and the degree of fluctuation of the traffic flow change rate is further determined.
[0016] In a preferred embodiment, the VaR model is used to calculate the risk of traffic flow and further determine the potential impact of traffic flow fluctuations; the variance-covariance method is used to calculate VaR. If the traffic flow change rate sequence obeys the normal distribution, the corresponding VaR calculation formula is VaR=P t-1 Z α σ t , where VaR is the risk value on day t, σ is the variance, and Zα is the confidence level, α is the corresponding quantile, P t-1 is the rate of change of flow on day t-1.
[0017] In a preferred embodiment, the traffic flow risk of different traffic paths is evaluated, and the risks of different traffic paths are ranked according to the results of the ARMA-GARCH-VaR model to help traffic managers or users make decisions.
[0018] In a preferred embodiment, it also includes:
[0019] The accuracy of the VaR value is verified by Kupiec test. When the significance level α is given, the actual number of test days is N, the number of failure days is x, and the failure rate is The expected failure probability is 1-α; under the condition of the original hypothesis, the following LR statistic is introduced:
[0020] LR=-2*ln((1-α) N-x *α x )+2*ln((lp) N-x *p x ); If the LR value is within the confidence interval, it means that the model prediction result is relatively accurate. If the LR value is on the left side of the confidence interval, it means that the predicted loss is higher than the actual loss. If the LR value is on the right side of the confidence interval, it means that the predicted loss is lower than the actual loss.
[0021] In a preferred embodiment, the larger the VaR value, the greater the traffic flow risk, and more traffic management resources need to be invested to ensure smooth traffic; the smaller the VaR value, the smaller the traffic flow risk, and the investment in traffic management resources for the area or time period can be reduced accordingly.
[0022] In a preferred embodiment, risk assessment of traffic flow helps traffic managers make more reasonable decisions in aspects such as traffic control, road design, traffic flow prediction, and traffic safety.
[0023] Compared with the prior art, the present invention has the following beneficial effects:
[0024] 1. By establishing an ARMA-GARCH model framework, we can simultaneously fit the traffic flow growth rate series and volatility series, fully reflecting the characteristics of the traffic flow series and providing more accurate evaluation results. The goodness of fit test shows that the VaR prediction failure rate of this technical solution is close to the preset confidence level of 5%;
[0025] 2. The variance-covariance method is used to calculate VaR, which can directly reflect the risk level of traffic flow and facilitate risk management by traffic planning departments;
[0026] 3. The assessment results show that the traffic flow risk levels of the three main roads are different, which provides a theoretical basis for urban traffic planning;
[0027] 4. The Kupiec posterior test verifies the effectiveness of this model in traffic flow risk assessment, providing quantitative analysis for traffic planning departments to select and prevent risks. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 A flow chart of a traffic flow risk assessment method based on an ARMA-GARCH-VaR model according to a preferred embodiment of the present invention;
[0029] Figure 2 Traffic flow trend diagrams of three roads according to a preferred embodiment of the present invention;
[0030] Figure 3 This is a VaR value-at-risk graph calculated by modeling in a preferred embodiment of the present invention. DETAILED DESCRIPTION
[0031] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0032] It should be noted that the following detailed descriptions are illustrative and intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which the present application belongs.
[0033] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application; as used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form, and it should be understood that when the terms "comprise" and / or "include" are used in this specification, they indicate the presence of features, steps, operations, devices, components and / or their combinations.
[0034] Traffic congestion has become a serious problem for many cities. However, traffic flow is highly volatile and unstable, making it crucial to assess traffic flow risk. This paper uses the ARMA-GARCH-VaR model to measure road traffic flow risk and then evaluate and analyze potential traffic congestion scenarios.
[0035] refer to Figure 1-3 The present invention discloses a traffic flow risk assessment method based on the ARMA-GARCH-VaR model, which comprises the following steps:
[0036] S1: Collect the required historical road traffic flow data, including but not limited to the average daily traffic flow of a major road. The selected period is the past year, and the traffic flow value of the road is recorded every day. Figure 2 Data samples from the past year are displayed, allowing for a comprehensive analysis of fluctuations in road traffic flow.
[0037] S2: Preprocess the data set collected in S1 to obtain the time series required by the method of the present invention: The traffic flow change rate and volatility are calculated by Volatility(t)=|change(t)|;
[0038] S3: Perform statistical feature analysis on the time series obtained by S2: Normality test determines whether the continuous variable obeys or approximately obeys normal distribution. Most standard statistical test methods require that the data obey normal distribution. If the data does not obey normal distribution, the analysis conclusion obtained by evaluation is invalid. Figure 3 A histogram of road traffic flow data was drawn to describe the changing patterns of the road traffic flow change rate and volatility. The histograms of the traffic flow change rate of the three roads were bell-shaped (low at both ends, high in the middle, and symmetrical), which conforms to the normal distribution and is suitable for the method adopted by the present invention. The stationarity of the time series is necessary for establishing a GARCH model. The unit root test (ADF) is the main method to test whether the time series is stationary. If the series is stationary, there is no unit root; otherwise, there is a unit root. The null hypothesis of the ADF test is the existence of a unit root. If the obtained significance test statistic is less than three confidence levels (10%, 5%, and 1%), the null hypothesis is rejected with the corresponding confidence level, indicating that the series data is stable and meets the conditions for establishing a GARCH model. The ADF test results of the traffic flow change rate series were calculated, and the traffic flow change rate test statistic T was less than the critical value of 1% - 3.443, so the null hypothesis is rejected with a confidence level of 99%, that is, there is no unit root, indicating that the sequence data is stable and meets the conditions for establishing a GARCH model; time series has the characteristics of heteroscedasticity and volatility clustering, which is the modeling basis of the GARCH model. Therefore, performing an autocorrelation test on the nonlinear changes of the sequence can determine whether the GARCH model can be used; ARCH effect test is a necessary condition for establishing a GARCH model, mainly based on whether there is serial autocorrelation in the square term of the mean equation residual to determine whether the time series data has heteroscedasticity. The present invention uses the Ljung-Box statistic, and the null hypothesis is that the autocorrelation coefficient (ACF) values of the first m intervals of the residual square sequence are all 0, that is, the null hypothesis is that there is no autocorrelation in the residual sequence, that is, there is no ARCH effect, and the P value is used to determine whether to reject the null hypothesis;
[0039] S4: ARMA-GARCH Modeling: GARCH stands for generalized autoregressive conditional heteroskedasticity. Conditional heteroskedasticity is equivalent to conditional variance (volatility) in a time series. GARCH models use the concept of volatility clustering to model a series of volatility. Volatility clustering means that today's volatility depends on the volatility of the most recent time step. GARCH has conditional heteroskedasticity because the error term follows an autoregressive moving average pattern, which means that it is a function of the average of its past values. The general expression for the GARCH(m,s) model is α t =σ t ξ t , Among them, m and s are the orders of the GARCH model, ξ t is a sequence of independent and identically distributed random variables with a mean of 0 and a variance of 1, ensuring that the conditional variance is non-negative; the ARMA-GARCH model is a composite model that integrates the autoregressive moving average (ARMA) model and the generalized autoregressive conditional heteroskedasticity (GARCH) model, and is used to analyze and predict time series data. The ARMA-GARCH model aims to simultaneously capture two important characteristics of time series data: linear dynamic dependence (through the ARMA part) and volatility clustering (through the GARCH part); through the analysis and investigation of S3, the present invention selects the GARCH model for modeling. The GARCH model can well avoid the influence of the high-order moving average order on the fitting accuracy of the results. In order to determine the parameters in the model, the parameter values need to be fitted multiple times before the model is established to obtain a good fitting effect. The method for judging the fitting effect is the Akaike Information Criterion (AIC). The smaller the AIC value, the better the fitting effect.
[0040] S5: VaR calculation: Value at risk (VaR) is the value at risk at a certain confidence level. It is often used to measure financial risk and the maximum loss faced by financial assets in a certain period of time in the future. The present invention uses the variance-covariance method to calculate VaR. The variance-covariance method assumes that gains and losses are distributed, rather than assuming that the past affects the future. The corresponding VaR calculation formula is: VaR=P t-1 Z α σ t ; where f(x) is the probability density function of the traffic flow change rate, VaR is the risk value on day t, u is the mean, σ is the variance, Z α is the confidence level, α is the corresponding quantile, P t-1 is the rate of return on day t-1; according to the ARMA-GARCH model of S4, the predicted value of the variance can be obtained. Since the time series of the traffic flow change rate of the three roads meet the normal distribution, the VaR formula under the normal distribution is used for calculation, and the obtained VaR value is as follows: Figure 3After the VaR value is calculated using the GARCH model, it is necessary to test the accuracy of its risk. The present invention uses a simple and effective Kupiec failure rate test method for testing. The actual loss calculation formula is LR = -2*ln((1-α) N-x *α x )+2*ln((lp) N-x *p x ), if the LR value is within the confidence interval, it means that the model prediction result is relatively accurate; if the LR value is on the left side of the confidence interval, it means that the predicted loss is higher than the actual loss; if the LR value is on the right side of the confidence interval, it means that the predicted loss is lower than the actual loss;
[0041] S6: Analysis and evaluation of road traffic risks: At a 95% confidence level, the traffic flow risk (represented by the VaR value) of Road A has the smallest fluctuation range, which means that its traffic risk is relatively low; on the contrary, the traffic flow risk of Road C has the largest fluctuation range among the three roads, indicating that its traffic risk is the highest and the traffic flow changes are also large; in addition, for the three roads in October 2022, the VaR fluctuation is relatively gentle, indicating that the road traffic risk during this period is low; the daily traffic flow of the three roads all show a scattered distribution, which reveals the instability and high volatility of road traffic flow; among all roads, the daily traffic flow of Road B fluctuates the most, so there may be higher road traffic risks on Road B; in addition, the VaR curves of these three roads fluctuate greatly and cover most of the traffic flow range, which means that the predicted risk is higher; these findings provide important reference information for road traffic management departments, which helps to more effectively assess and respond to road traffic risks.
[0042] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent transformations made using the contents of the present invention's description and drawings, or directly or indirectly applied in related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A traffic flow risk assessment method based on the ARMA-GARCH-VaR model, characterized in that: The following steps are involved: Step S1, data acquisition: collecting historical traffic flow data and its change rate; Step S2, data processing: pre-process the sample data obtained in step S1, extract the required column attributes traffic volume and date; And Volatility(t)=|change(t)| calculates the traffic flow change rate and its volatility; the processed time series is divided into training sample set and test sample set; Step S3, data analysis and model construction: In view of the complexity and uncertainty of traffic flow data and the defects in existing technologies, the autoregressive moving average model (ARMA) in traditional effective time series analysis methods is coupled with the generalized autoregressive heteroskedasticity model (GARCH). First, the time series stationarity test (ADF) is used to determine whether the traffic flow rate of change series is stationary. The null hypothesis of the ADF test is the existence of a unit root. If the obtained significance test statistic is less than three confidence levels, namely 10%, 5%, and 1%, the null hypothesis is rejected with the corresponding confidence level, indicating that the series data is stable and meets the conditions for establishing a GARCH model. Step S4, establishing an ARMA (p, q) model to fit and model the traffic flow change rate series, where p and q are model orders; Step S5, establishing a GARCH (m, s) model to fit the traffic flow change rate series and modeling and analyzing the volatility of traffic flow, where m and s are the model orders; Step S6: Calculate the VaR value according to the variance-covariance method to evaluate the value risk level of traffic flow.
2. The traffic flow risk assessment method based on the ARMA-GARCH-VaR model according to claim 1 is characterized in that: The traffic flow is vehicle flow.
3. The traffic flow risk assessment method based on the ARMA-GARCH-VaR model according to claim 1 is characterized in that: The traffic flow rate change sequence is determined to be a stationary sequence after ADF test.
4. The traffic flow risk assessment method based on the ARMA-GARCH-VaR model according to claim 1 is characterized in that: The order of the ARMA (p, q) model is determined by the autocorrelation diagram and the partial autocorrelation diagram, and the time dependence of the traffic flow change rate is further determined.
5. The traffic flow risk assessment method based on the ARMA-GARCH-VaR model according to claim 1 is characterized in that: The order of the GARCH (m, s) model is determined by the autocorrelation diagram and the partial autocorrelation diagram, and the degree of fluctuation of the traffic flow change rate is further determined.
6. The traffic flow risk assessment method based on the ARMA-GARCH-VaR model according to claim 1 is characterized in that: The VaR model is used to calculate the risk of traffic flow and further determine the potential impact of traffic flow fluctuations. The variance-covariance method is used to calculate VaR. If the traffic flow change rate sequence obeys the normal distribution, the corresponding VaR calculation formula is VaR = P t-1 Z α σ t , where VaR is the risk value on day t, σ is the variance, and Z α is the confidence level, α is the corresponding quantile, P t-1 is the rate of change of flow on day t-1.
7. The traffic flow risk assessment method based on the ARMA-GARCH-VaR model according to claim 1 is characterized in that: It includes evaluating the traffic flow risks of different traffic paths, ranking the risks of different traffic paths according to the results of the ARMA-GARCH-VaR model, and helping traffic managers or users make decisions.
8. The traffic flow risk assessment method based on the ARMA-GARCH-VaR model according to claim 1 is characterized in that Also includes: The accuracy of the VaR value is verified by Kupiec test. When the significance level α is given, the actual number of test days is N, the number of failure days is x, and the failure rate is The expected failure probability is 1-α; under the condition of the original hypothesis, the following LR statistic is introduced: LR=-2*ln((1-α) N-x *α x )+2*ln((lp) N-x *p x ); If the LR value is within the confidence interval, it means that the model prediction result is relatively accurate. If the LR value is on the left side of the confidence interval, it means that the predicted loss is higher than the actual loss. If the LR value is on the right side of the confidence interval, it means that the predicted loss is lower than the actual loss.
9. The traffic flow risk assessment method based on the ARMA-GARCH-VaR model according to claim 1, characterized in that: The larger the VaR value, the greater the traffic flow risk, and more traffic management resources need to be invested to ensure smooth traffic; the smaller the VaR value, the smaller the traffic flow risk, and the investment in traffic management resources for the area or time period can be reduced accordingly.
10. The traffic flow risk assessment method based on the ARMA-GARCH-VaR model according to claim 1, wherein: Risk assessment of traffic flow helps traffic managers make more reasonable decisions in traffic control, road design, traffic flow forecasting and traffic safety.
Citation Information
Patent Citations
Traffic flow short time predicting method
CN103903452A
Method for analyzing uncertainty of passenger flow of urban mass transit terminal
CN104021430A