An adaptive hp-filtering method based on convex optimization of spectral characteristic function

By transforming the selection of λ into an optimization problem of the trend term's spectral characteristics, and combining binary tree traversal and fast iteration techniques, the problem of adaptive selection of λ in the HP filtering method is solved, realizing fast adaptive filtering, reducing computational complexity, and promoting the application of the HP filtering method in fields such as satellite telemetry and industrial monitoring.

CN117220644BActive Publication Date: 2026-08-04BEIHANG UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIHANG UNIV
Filing Date
2023-09-28
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

In fields such as satellite telemetry data prediction and industrial monitoring data prediction, existing HP filtering methods lack effective means to adaptively select the parameter λ, hindering their widespread application in these fields.

Method used

The selection of λ is transformed into an optimization problem of the spectral characteristics of the trend term. By designing the spectral characteristic function and using a binary tree traversal method, combined with fast iteration techniques, the adaptive selection of parameter λ in the HP filtering method is achieved, thereby reducing computational complexity.

Benefits of technology

It significantly reduces computational complexity, enables fast adaptive filtering, and promotes the flexible application of the HP filtering method in different fields.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117220644B_ABST
    Figure CN117220644B_ABST
Patent Text Reader

Abstract

This invention provides an adaptive HP filtering method based on convex optimization of the spectral characteristic function. The method includes converting the numerical value of the fluctuation term coefficient λ in the HP filtering method into the value of the trend term spectral characteristic function, and calculating the trend term spectral characteristic function value using a downward convexity discrimination method based on binary tree traversal. Based on the continuous monotonicity property of the trend term spectral characteristic function value, the selection of the value of λ is transformed into a convex optimization problem of the trend term spectral characteristic function value, and the optimal λ is quickly solved using a bisection method, ultimately obtaining the optimal λ value. Adaptive HP filtering is then performed based on the optimal λ value. This invention effectively achieves adaptive selection of the HP filtering parameter λ and significantly reduces computational complexity, realizing fast adaptive filtering.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of computer and big data processing technology, specifically to an adaptive HP (Hodrick-Prescott) filtering method based on convex optimization of spectral characteristic functions. Background Technology

[0002] The Hodrick-Prescott (HP) filtering method was first proposed by Hodrick and Prescott in 1980 when analyzing the post-war economic climate in the United States. This method has been widely applied in the analysis of time series data and macroeconomic trends. HP filtering is a state-space analysis method for time series data, aiming to minimize the variance of fluctuations. HP filtering can be viewed as an approximate high-pass filter, its theoretical basis being spectral analysis of time series. Spectral analysis treats a time series as a superposition of components of different frequencies. High-frequency filtering of time series aims to separate the higher-frequency components from all these different frequency components, removing the lower-frequency components, that is, removing the long-term trend term, while measuring the short-term random fluctuation term.

[0003] The trend and fluctuation terms obtained by the HP filtering method are controlled by a single parameter λ. The larger λ is, the closer the trend term is to linear, and vice versa. Currently, researchers in the fields of economics and finance have obtained empirical values ​​of the parameter λ for different time scales such as year, quarter, month, and day from a large amount of historical data and related studies.

[0004] However, in other fields, such as satellite telemetry data prediction and industrial monitoring data prediction, high-quality parameters λ cannot be obtained due to limitations such as diverse data types, the emergence of new data, and relatively limited historical data. Furthermore, since there is no intuitive observational information corresponding to λ in the HP filtering method, there is a lack of effective means to adaptively select λ, hindering the widespread application of this method in other fields. Summary of the Invention

[0005] The technical solution of this invention addresses the shortcomings and deficiencies of existing technologies by providing an adaptive HP filtering method based on convex optimization of the spectral characteristic function. This method transforms the selection of λ into a problem of optimizing the spectral characteristics of the trend term. Through the design and quantitative analysis of the spectral characteristic function, combined with rapid iteration techniques, the adaptive selection of the HP filtering parameter λ is effectively achieved, significantly reducing computational complexity and realizing adaptive fast filtering.

[0006] The technical solution of the present invention is as follows:

[0007] In a first aspect, the present invention provides an adaptive HP filtering method based on convex optimization of the spectral characteristic function, comprising the following steps:

[0008] Step 1: Convert the numerical value of the fluctuation term coefficient λ in the HP filtering method into the trend term spectral characteristic function value, and use the convex discrimination method based on binary tree traversal to calculate the trend term spectral characteristic function value;

[0009] Step 2: Based on the continuous monotonicity of the trend term spectral characteristic function value, the selection of the value of λ is transformed into the solution process of a convex optimization problem of the trend term spectral characteristic function value, and the bisection method is used to quickly solve for the optimal λ, and finally the optimal λ value is obtained.

[0010] Step 3: Perform adaptive HP filtering based on the optimal λ value.

[0011] Optionally, in step one, the formula for converting the value of λ into the trend term spectral characteristic function is as follows:

[0012]

[0013] Let λ be the trend term spectral characteristic function;

[0014] μ λ (x i x j Two different points x i x j The degree of downward convexity between them;

[0015] 1≤i, j≤m, i≠j, i, j are discrete points on the spectrum;

[0016] m represents the range of values ​​for i and j, where i = 1, 2, ..., m;

[0017]

[0018] f λ (x i ) and f λ (x j ) are discrete spectrum values.

[0019] Optionally, in step one, the trend term spectral characteristic function value is calculated using a convex discrimination method based on binary tree traversal. The specific implementation steps are as follows:

[0020] (1) Use the value of λ to perform HP filtering decomposition on the original time series data, and perform discrete Fourier transform on the obtained trend term to obtain discrete spectrum values.

[0021] (2) Construct a binary tree structure, where the root node is a discrete pair of points (x1, x2, x3) representing the minimum and maximum frequencies. m ), i = 1, 2, ..., m;

[0022] (3) Use the midpoint of the discrete point pair and the two points of the root node to form two new discrete point pairs as their two child nodes;

[0023] (4) Repeat the process in (3) to build the child nodes of each node, and obtain the entire binary tree structure;

[0024] (5) Traverse the discrete point pairs (x, y) in each node. i x j And calculate the degree of convexity μ between the two points. λ (x i x j );

[0025] (6) Select the minimum value of the downward convexity as the value of the trend term spectral characteristic function.

[0026] Optionally, in step two, the formula for solving a convex optimization problem that converts the selection of λ into the spectral characteristic function value is as follows:

[0027]

[0028] Optionally, in step two, the process of using the bisection method to quickly solve for the optimal λ and finally obtain the optimal λ value is as follows: narrowing the range of λ values, judging the λ value at the midpoint of the range, updating the optimal λ value range until the termination condition is met, and finally obtaining the midpoint λ value is the optimal λ value.

[0029] The specific implementation is as follows:

[0030] (1) Determine the discrete set of values ​​for λ as {λ1, λ2, ..., λ}. n}, where n is the total number of discrete values ​​obtained by λ, and the lower limit λ1 and upper limit λ are set for λ. n ,ensure and

[0031] (2) Using the bisection method, select the midpoint between the upper and lower limits of λ as the current λ value to be judged, and calculate the spectral characteristic function value of the current λ value to be judged;

[0032] (3) Use the current λ value to narrow the range of λ values. If the trend term spectrum characteristic function value is less than 0, then select the value as the new lower limit; otherwise, select the value as the new upper limit.

[0033] (4) Repeat the process of (2) and (3) to continuously update the range of λ values. When the distance between the upper and lower limits of λ is less than a certain set threshold, select the midpoint between the upper and lower limits at this time. This value is the optimal λ value.

[0034] In a second aspect, the present invention provides an electronic device, including a processor and a processor;

[0035] Memory, used to store computer programs;

[0036] The processor is used to execute computer programs stored in memory, and during execution, it implements the aforementioned adaptive HP filtering method based on convex optimization of spectral characteristic functions.

[0037] Thirdly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed, it implements the aforementioned adaptive HP filtering method based on convex optimization of spectral characteristic function.

[0038] The advantages of this invention compared to the prior art are:

[0039] (1) This invention transforms the selection of λ into the solution process of the optimization problem of the trend term spectrum characteristics. By designing and quantitatively analyzing the spectrum characteristic function and combining it with fast iteration technology, the adaptive selection of parameter λ of the HP filtering method is effectively realized, and the computational complexity is significantly reduced, thus realizing fast adaptive filtering.

[0040] (2) This invention constructs a method for traversing and discriminating convex characteristics of discrete points in the spectrum based on a binary tree structure, which promotes the realization of fast spectrum convex characteristic discrimination and further realizes fast adaptive filtering.

[0041] (3) This invention uses the bisection method to quickly narrow the optimal λ value range, significantly reducing the computational complexity of the λ value range locking process, and further realizing fast adaptive filtering, providing a new solution for the flexible application of HP filtering decomposition methods in various fields. Attached Figure Description

[0042] Figure 1 A flowchart of an adaptive HP filtering method based on convex optimization of spectral characteristic function is provided for an embodiment of the present invention;

[0043] Figure 2 These are trend term curves under different λ parameters provided in the embodiments of the present invention. The solid line represents λ = 10. 5 The trend term curve obtained by time filtering, and the other dashed lines are λ=10 respectively. 7 10 9 10 11 The trend curve over time;

[0044] Figure 3The spectrum of the trend term under different λ parameters provided in the embodiments of the present invention is shown; the solid line represents λ = 10. 5 The discrete spectrum of the trend term obtained by time filtering, and the other dashed lines represent λ = 10. 7 10 9 The discrete spectrum of the trend term over time;

[0045] Figure 4 The trend term curve obtained by the adaptive HP filtering method provided in this embodiment of the invention has an adaptive λ value of 100931. Detailed Implementation

[0046] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0047] Previous HP filtering methods primarily relied on empirically setting the value of λ. However, since the impact of λ on the filtering result is not intuitive, there is currently a lack of effective means to adaptively select λ. Therefore, this invention expresses λ as a spectral function of the trend term after filtering, and equates the selection of λ to solving for the minimum value of this spectral function. This solution process conforms to convex optimization, providing a feasible means for adaptive selection of λ. To quickly calculate the spectral function value corresponding to λ, this invention proposes a method based on binary tree traversal. To quickly filter out the λ with the smallest spectral function value, a bisection method is proposed to rapidly narrow down the optimal range of λ values.

[0048] The following is a more detailed explanation with reference to the accompanying drawings.

[0049] like Figure 1 As shown in the figure, the adaptive HP filtering method based on convex optimization of the spectral characteristic function provided by the present invention specifically includes the following steps:

[0050] S1. The numerical values ​​of the fluctuation term coefficient λ in the HP filtering method are transformed into the spectral characteristic function values ​​of the trend term, which can be directly measured. Specifically, this includes:

[0051] S1.1 Determine the relationship between the value of λ and the spectrum of the trend term. For example... Figure 2 and Figure 3 As shown, the solid line represents a case where the trend term fluctuates more significantly and the high-frequency part of the spectrum has sharp peaks, while the dashed line represents a case where the trend term is smoother and the spectrum has a more convex downward characteristic. Therefore, the larger λ is, the more stable the trend term is, indicating that as λ increases, the high-frequency part of the trend term spectrum decreases continuously until the spectrum amplitude curve exhibits a strictly convex downward characteristic; Figure 2 The solid line in the middle is λ = 105 The trend term curve obtained by time filtering, and the other dashed lines are λ=10 respectively. 7 10 9 10 11 The trend curve over time; Figure 3 The solid line in the middle is λ = 10 5 The trend term curve obtained by time filtering, and the other dashed lines are λ=10 respectively. 7 10 9 10 11 The trend curve of time, Figure 2 , 3 By analyzing the trend terms and their discrete spectra obtained from different λ values, the rationality of converting the numerical value of the fluctuation term coefficient λ in the HP filtering method in this embodiment of the invention into a trend term spectral characteristic function value that can be intuitively measured is explained.

[0052] S1.2 Since the input data in practical applications is mainly in discrete form, it is assumed that in the case of λ, the discrete spectrum obtained by the discrete Fourier transform of the trend term sequence is {f}. λ (x i If |i=1,2,…,m}, then define two distinct points x. i x j The degree of downward convexity between points (1≤i, j≤m, i≠j, i, j are discrete points on the spectrum) is μ. λ (x i x j ), see the following formula (1) for details:

[0053]

[0054] f λ (x i ) and f λ (x j These are the discrete spectrum values;

[0055] S1.3, in formula (1) μ λ The minimum value of (x1, x2) in the range 1≤i, j≤m is defined as the trend term spectral characteristic function under the current λ condition. See the following formula (2) for details:

[0056]

[0057] m represents the range of values ​​for i and j, where i = 1, 2, ..., m.

[0058] S2. Based on the continuous monotonicity of the trend term's spectral characteristic function, the process of transforming the selection of the value of λ into solving a convex optimization problem of the spectral characteristic function value includes:

[0059] S2.1 Based on the characteristic analysis of the trend term after HP filtering decomposition under different λ values, it is known that as λ increases, the high-frequency part of the discrete spectrum of the trend term decreases. In the spectrum, this manifests as a decrease in the peak values ​​of the high-frequency part, changing from a non-convex curve to a convex curve. Therefore... It is monotonically increasing relative to λ;

[0060] S2.2 When λ = 0, the trend term is the original sequence signal. If the original sequence signal contains high-frequency information, then... It must be less than 0; as λ approaches infinity, the trend term approaches a straight line. It must be greater than 0; according to the Intermediate Value Theorem and For the continuity property of , there must exist λ0 such that If λ is a discrete value, then there must exist λ0 such that... And for any other value λ′, we have or This λ0 is the optimal value;

[0061] S2.3 Therefore, the optimal value of λ satisfies In λ, it makes The minimum value, i.e., the value of λ, is transformed into a convex optimization of the trend term spectral characteristic function value, as shown in equation (3):

[0062]

[0063] S3. Calculate the trend term spectral characteristic function value corresponding to the characteristic λ value using a binary tree traversal-based convex discrimination method. Specifically, this includes:

[0064] S3.1. Perform HP filtering decomposition on the original time series data using a specific λ value, and then perform a discrete Fourier transform on the obtained trend term to obtain the discrete spectrum {f}. λ (x i |i = 1, 2, ..., m};

[0065] S3.2 Construct a binary tree structure, where the root node represents the discrete pair (x1, x2, x3) of the minimum and maximum frequencies. m );

[0066] S3.3, Select x1 and x m midpoint x mid Using x mid Set node (x1, x) m The points are divided into two new discrete point pairs (x1, x2, x3). mid ) and (x mid x m ) as its two child nodes;

[0067] S3.4 Repeat the process in S3.3 to build the child nodes of each node, and obtain the entire binary tree structure;

[0068] S3.5, Traverse the discrete point pairs (x) in each node i x j And calculate its degree of convexity μ. λ (x i x j );

[0069] S3.6 Select the minimum value of the downward convexity as the value of the trend term spectral characteristic function.

[0070] S3.7 The computational complexity of the embodiments of the present invention does not exceed that of equation (4):

[0071]

[0072] Therefore, the computational complexity of this embodiment of the invention does not exceed O(2m).

[0073] S4. Use the bisection method to quickly narrow down the range of optimal λ values, and judge the λ values ​​of the points in the range to update the range of optimal λ values ​​until the termination condition is met.

[0074] S4.1. Determine the discrete set of values ​​for λ as {λ1, λ2, ..., λ}. n}, where n is the total number of discrete values ​​obtained by λ, and its initial lower limit λ is set. l =λ1 and upper limit λ h =λ n ,ensure Head

[0075] S4.2. Using the bisection method, select the upper limit λ. h and lower limit λ l The midpoint λ mid As the current λ value to be judged, calculate the current λ value to be judged. mid Spectral characteristic function value of the value

[0076] S4.3. Use the current λ value to narrow the range of λ values. If the trend term spectral characteristic function value... Then choose λ mid For the new lower limit λ l ;like Then choose λ mid For the new upper limit λ h ;

[0077] S4.4 Repeat steps S3.2 and S3.4 to continuously update the range of λ values. When the distance between the upper and lower limits of λ is less than the set threshold δ1, select the midpoint between the upper and lower limits at this time. This value is the optimal λ value. Use the optimal λ value to perform adaptive HP filtering.

[0078] S4.5 The embodiments of the present invention have a computational complexity of O(log₂n), and ultimately achieve fast filtering.

[0079] like Figure 4 As shown, is Figure 2 The trend term obtained by the adaptive HP filtering method in the embodiment can be seen by comparison. By using the λ obtained by the adaptive HP filtering method of the present invention to filter the data, the obtained trend term can simultaneously meet the two requirements of smoothing and preserving the nonlinear characteristics of the data. Therefore, this value is the optimal λ value.

[0080] In summary, this invention utilizes the optimal λ value for adaptive HP filtering, significantly reducing computational complexity and achieving fast adaptive filtering.

[0081] Based on the same inventive concept, another embodiment of the present invention provides an electronic device (e.g., a computer, server, smartphone, etc.) including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed, it implements the method provided in the aforementioned embodiment of the present invention.

[0082] Based on the same inventive concept, another embodiment of the present invention provides a computer-readable storage medium (e.g., ROM / RAM, disk, optical disk), which stores a computer program. When the computer program is executed by a computer, it implements the method provided in the aforementioned embodiment of the present invention.

[0083] The above embodiments are provided merely for the purpose of describing the present invention and are not intended to limit the scope of the invention. The scope of the invention is defined by the appended claims. Various equivalent substitutions and modifications made without departing from the spirit and principles of the invention should be covered within the scope of the invention.

Claims

1. An adaptive HP filtering method based on convex optimization of spectral characteristic function, characterized in that, include: Step 1: Convert the numerical value of the fluctuation term coefficient λ in the HP filtering method into the trend term spectral characteristic function value, and use the convex discrimination method based on binary tree traversal to calculate the trend term spectral characteristic function value; Step 2: Based on the continuous monotonicity of the trend term spectral characteristic function value, the selection of the value of λ is transformed into the solution process of a convex optimization problem of the trend term spectral characteristic function value, and the bisection method is used to quickly solve for the optimal λ, and finally the optimal λ value is obtained. Step 3: Perform adaptive HP filtering based on the optimal λ value; In step one, the formula for converting the value of λ into the value of the trend term spectral characteristic function is as follows: for The trend term spectrum characteristic function; For two different points , The degree of downward convexity between them; , , These are discrete points on the spectrum; express Range of values ; ; and These are discrete spectrum values; The trend term spectral characteristic function value is calculated using a convex discrimination method based on binary tree traversal. The specific implementation steps are as follows: (1) Use The numerical values ​​are used to perform HP filtering decomposition on the original time series data, and the obtained trend term is subjected to discrete Fourier transform to obtain discrete spectrum values. (2) Construct a binary tree structure, where the root node is a discrete pair of the minimum and maximum points in the frequency range. , ; (3) Use the midpoint of the discrete point pair and the two points of the root node to form two new discrete point pairs as their two child nodes; (4) Repeat the process in (3) to build the child nodes of each node to obtain the entire binary tree structure; (5) Traverse the discrete point pairs in each node And calculate the degree of convexity between the two points. ; (6) Select the minimum value of the downward convexity as the value of the trend term spectral characteristic function. .

2. The adaptive HP filtering method based on convex optimization of spectral characteristic function according to claim 1, characterized in that: In step two, The formula for solving the convex optimization problem of selecting the spectral characteristic function value is as follows: 。 3. The adaptive HP filtering method based on convex optimization of spectral characteristic function according to claim 2, characterized in that: In step two, the process of quickly solving for the optimal λ using the bisection method and finally obtaining the optimal λ value is as follows: narrowing the range of λ values, judging the λ value at the midpoint of the range, updating the optimal λ value range until the termination condition is met, and finally obtaining the midpoint λ value is the optimal λ value. The specific implementation is as follows: (1) Determine The discrete set of values ​​is , where n is The total number of discrete values ​​obtained, set lower limit and upper limit ,ensure and ; (2) Using the dichotomy method, select The midpoint between the upper and lower limits is used as the current point to be judged. Value, calculate the current value to be judged The spectral characteristic function value of the value; (3) Using the current one to be judged value reduction The range of values ​​for the trend term spectral characteristic function is such that if the value is less than 0, then this value is selected as the new lower limit. Conversely, if the value is not specified, then that value is chosen as the new upper limit. (4) Repeat the process in (2) and (3) and update continuously. The range of values ​​for , when When the distance between the upper and lower limits is less than a certain set threshold, the midpoint between the upper and lower limits at this point is selected, and this value is considered optimal. value.

4. An electronic device, characterized in that, Including memory and processor; Memory, used to store computer programs; A processor is used to execute a computer program stored in memory, which, when executed, implements the adaptive HP filtering method based on convex optimization of spectral characteristic function as described in any one of claims 1-3.

5. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed, it implements the adaptive HP filtering method based on convex optimization of spectral characteristic function as described in any one of claims 1-3.