Financial data calibration method and device, electronic equipment and storage medium
By using long short-term memory and autoregressive differential moving average models to conduct in-depth analysis of price spread characteristics during exchange closures, and combining this with matrix operations using hardware accelerators, the problem of inaccurate financial data caused by domestic exchanges switching to overseas quotes was solved, ensuring the accuracy and continuity of client-side data.
Patent Information
- Application Number
- CN202511126706.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-12
- Publication Date
- 2025-11-25
AI Technical Summary
Switching to overseas exchange quotes during the closure of domestic exchanges caused inaccurate financial data display on the client side, resulting in losses for users.
By acquiring real-time and historical price spread sequences and event-marked data, feature extraction and vector encoding are performed using long short-term memory models and autoregressive differential moving average models. Model weights are dynamically configured, and matrix operations are performed using hardware accelerators to calibrate financial data and display it in real time.
It ensured the accuracy of client-side financial data, minimized user losses, and achieved a smooth transition during price switching.
Smart Images

Figure CN121009523A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of artificial intelligence or other related technical fields, in particular, to a financial data calibration method and device, electronic equipment and storage medium. BACKGROUND
[0002] In the field of financial transactions, especially in transactions involving cross-market or multi-exchange, the real-time and accuracy of data are key elements to ensure fair, transparent and efficient transactions. However, when the closing period of domestic and foreign market exchanges occurs, the traditional transaction system faces a series of challenges, which are particularly prominent in the field of commodities with global transaction attributes such as precious metals, foreign exchange and energy. If the domestic market closes and no longer updates the price, investors will face an information vacuum and cannot judge the value change of the assets they hold in the international market.
[0003] In order to ensure that related transaction businesses can be smoothly executed during the closing period of the domestic exchange, the related technology often relies on the quotation of the overseas market, and switches the quotation data provided by other exchanges at the moment of closing to fill the information gap during the closing period of the domestic market, and keeps the continuity of the price curve. But this switching method will have the risk of price adjustment, which will lead to inaccurate display of financial data on the client side, thereby causing huge losses to users.
[0004] In view of the above problems, no effective solution has been proposed so far. SUMMARY
[0005] The embodiments of the present application provide a financial data calibration method and device, electronic equipment and storage medium to at least solve the technical problem that the switching of the quotation of the overseas exchange in the closing period of the domestic exchange in the related technology leads to inaccurate display of financial data on the client side.
[0006] According to an aspect of an embodiment of the present application, a financial data calibration method is provided, comprising: acquiring a real-time spread sequence and a historical spread sequence, and collecting event marker data of a target period; performing feature extraction and vector coding on the real-time spread sequence, the historical spread sequence and the event marker data to obtain a spread feature vector; inputting the spread feature vector into a spread calibration model to output a spread sequence of the target period, wherein the spread calibration model is a machine learning model pre-constructed for calculating the spread sequence in a future period of time, including a long short-term memory model and an autoregressive difference moving average model; calibrating the basis financial data through the spread sequence of the target period to obtain calibrated financial data, and displaying the calibrated financial data to the client, wherein the basis financial data is calculated based on a preset calculation rule.
[0007] Further, the step of inputting the spread feature vector into the spread calibration model and outputting the spread sequence of the target period includes: inputting the spread feature vector into the long short-term memory model in the spread calibration model, capturing the spread change trend in the spread feature vector through the long short-term memory model, outputting the first spread sequence data and the historical residual sequence data of the target period; inputting the first spread sequence data and the historical residual sequence data into the autoregressive moving average model in the spread calibration model, capturing the periodic change trend in the historical residual sequence data through the autoregressive moving average model, predicting the residual sequence data of the target period based on the periodic change trend, and correcting the first spread sequence data based on the residual sequence data to obtain the second spread sequence data of the target period and output; and weighting and fusing the first spread sequence data and the second spread sequence data of the target period to obtain the spread sequence of the target period.
[0008] Further, the financial data calibration method further includes: obtaining a liquidity index, and comparing the liquidity index with a preset liquidity index threshold to obtain a comparison result; and dynamically configuring the weight values corresponding to the long short-term memory model and the autoregressive moving average model based on the comparison result.
[0009] Further, the liquidity index threshold includes a first liquidity index threshold and a second liquidity index threshold, the first liquidity index threshold is less than the second liquidity index threshold, and the step of dynamically configuring the weight values corresponding to the long short-term memory model and the autoregressive moving average model based on the comparison result includes: in a case where the liquidity index is less than the first liquidity index threshold, the weight value configured for the long short-term memory model is greater than the weight value configured for the autoregressive moving average model; in a case where the liquidity index is greater than or equal to the first liquidity index threshold and less than or equal to the second liquidity index threshold, the weight value configured for the long short-term memory model is equal to the weight value configured for the autoregressive moving average model; and in a case where the liquidity index is greater than the second liquidity index threshold, the weight value configured for the long short-term memory model is less than the weight value configured for the autoregressive moving average model.
[0010] Further, the step of obtaining the real-time spread sequence and the historical spread sequence includes: obtaining real-time spread data and historical spread data, and performing data cleaning on the real-time spread data and the historical spread data, wherein the data cleaning includes removing outliers and filling missing values; and arranging the cleaned real-time spread data and the cleaned historical spread data according to timestamps to obtain the real-time spread sequence and the historical spread sequence.
[0011] Further, before acquiring the real-time spread data and the historical spread data, the method further comprises: listening to a preset trigger event based on a listening mechanism; and generating a trigger instruction in a case where the preset trigger event is listened to, wherein the trigger instruction is used to instruct a financial data calibration operation.
[0012] Further, the financial data calibration method further comprises: configuring a hardware accelerator for the spread calibration model; and accelerating matrix operation of the spread calibration model by using the hardware accelerator.
[0013] According to another aspect of the embodiment of the present application, a financial data calibration device is further provided, comprising: an acquisition unit configured to acquire real-time spread sequences and historical spread sequences, and collect event marker data of a target period; an encoding unit configured to perform feature extraction and vector encoding on the real-time spread sequences, the historical spread sequences and the event marker data to obtain spread feature vectors; an output unit configured to input the spread feature vectors into a spread calibration model, and output spread sequences of the target period, wherein the spread calibration model is a machine learning model pre-constructed for calculating spread sequences in a future period of time, and comprises a long short-term memory model and an autoregressive moving average model; and a calibration unit configured to calibrate basic financial data by using the spread sequences of the target period to obtain calibrated financial data, and display the calibrated financial data to a client, wherein the basic financial data is calculated based on a preset calculation rule.
[0014] Further, the output unit comprises: a first output module configured to input the spread feature vectors into the long short-term memory model in the spread calibration model, capture spread change trends in the spread feature vectors by using the long short-term memory model, and output first spread sequence data and historical residual sequence data of the target period; a second output module configured to input the first spread sequence data and the historical residual sequence data into the autoregressive moving average model in the spread calibration model, capture periodic change trends in the historical residual sequence data by using the autoregressive moving average model, predict residual sequence data of the target period based on the periodic change trends, correct the first spread sequence data based on the residual sequence data, obtain second spread sequence data of the target period, and output the second spread sequence data; and a first fusion module configured to perform weighted fusion on the first spread sequence data and the second spread sequence data of the target period to obtain spread sequences of the target period.
[0015] Further, the financial data calibration apparatus further comprises a first comparison module, configured to obtain a liquidity index, and compare the liquidity index with a preset liquidity index threshold to obtain a comparison result; and a first configuration module, configured to dynamically configure weight values corresponding to the long short-term memory model and the autoregressive moving average differencing model based on the comparison result.
[0016] Further, the liquidity index threshold comprises a first liquidity index threshold and a second liquidity index threshold, the first liquidity index threshold is smaller than the second liquidity index threshold, and the first configuration module comprises: a first configuration submodule, configured to, in a case where the liquidity index is smaller than the first liquidity index threshold, configure a weight value for the long short-term memory model to be greater than a weight value configured for the autoregressive moving average differencing model; a second configuration submodule, configured to, in a case where the liquidity index is greater than or equal to the first liquidity index threshold and smaller than or equal to the second liquidity index threshold, configure a weight value for the long short-term memory model to be equal to a weight value configured for the autoregressive moving average differencing model; and a third configuration submodule, configured to, in a case where the liquidity index is greater than the second liquidity index threshold, configure a weight value for the long short-term memory model to be smaller than a weight value configured for the autoregressive moving average differencing model.
[0017] Further, the obtaining unit comprises: a first obtaining module, configured to obtain real-time spread data and historical spread data, and perform data cleaning on the real-time spread data and the historical spread data, wherein the data cleaning comprises removing outliers and filling missing values; and a first arrangement module, configured to arrange the cleaned real-time spread data and the cleaned historical spread data according to timestamps to obtain the real-time spread sequence and the historical spread sequence.
[0018] Further, the financial data calibration apparatus further comprises a first listening module, configured to listen to a preset trigger event based on a listening mechanism; and a first generation module, configured to generate a trigger instruction in a case where the preset trigger event is listened to, wherein the trigger instruction is used to instruct a financial data calibration operation.
[0019] Further, the financial data calibration apparatus further comprises a second configuration module, configured to configure a hardware accelerator for the spread calibration model; and a first acceleration module, configured to accelerate matrix operation of the spread calibration model by using the hardware accelerator.
[0020] According to another aspect of the embodiment of the present application, a computer readable storage medium is further provided, which comprises a stored computer program, wherein the computer program controls a device where the computer readable storage medium is located to perform any of the above financial data calibration methods when the computer program is running.
[0021] According to another aspect of the embodiments of the present application, an electronic device is also provided, which comprises one or more processors and a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement any of the above financial data calibration methods.
[0022] According to another aspect of the embodiments of the present application, a computer program product is also provided, which comprises a computer program, wherein the computer program, when executed by a processor, implements any of the above financial data calibration methods.
[0023] In the present application, by the following steps: acquiring real-time spread sequence and historical spread sequence, and collecting event marking data of a target period, then performing feature extraction and vector coding on the real-time spread sequence, the historical spread sequence and the event marking data to obtain a spread feature vector, inputting the spread feature vector into a spread calibration model, outputting the spread sequence of the target period, wherein the spread calibration model is a machine learning model pre-constructed for calculating the spread sequence in a future period of time, including a long short-term memory model and an autoregressive difference moving average model, and finally calibrating the basic financial data through the spread sequence of the target period to obtain calibrated financial data, and displaying the calibrated financial data to a client, wherein the basic financial data is calculated based on a preset calculation rule.
[0024] In the present application, according to the real-time spread sequence, the historical spread sequence and the pre-marked event data, the spread calibration model pre-constructed is used to perform deep analysis and matrix operation on the spread change trend from multiple angles, calculate the spread sequence of the target period, and calibrate the quotation data according to the spread sequence, which is displayed on the client in real time, thereby ensuring the accuracy of the client financial data, minimizing user loss, and further solving the technical problem that the inaccurate client financial data is caused by switching the quotation of the overseas exchange in the closing interval of the domestic exchange in the related art. BRIEF DESCRIPTION OF DRAWINGS
[0025] The accompanying drawings, which are included to provide a further understanding of the application and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application. In the drawings:
[0026] Figure 1 Fig. 1 shows a hardware structure block diagram of a computer terminal (or mobile device) for implementing the financial data calibration method;
[0027] Figure 2 Fig. 2 is a flowchart of an optional financial data calibration method according to an embodiment of the present application.
[0028] Figure 3 is a schematic diagram of an optional financial data calibration process according to an embodiment of the present application;
[0029] Figure 4 is a schematic diagram of an optional financial data calibration device according to an embodiment of the present application;
[0030] Figure 5 is a hardware structure block diagram of an electronic device (or mobile device) for performing a financial data calibration method according to an embodiment of the present application. DETAILED DESCRIPTION
[0031] In order to make the personnel in the technical field better understand the present application scheme, the technical scheme in the embodiment of the present application will be described clearly and completely in the following by combining with the drawings in the embodiment of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should belong to the scope of protection of the present application.
[0032] It should be noted that the terms "first", "second" and the like in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device including a series of steps or units need not be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0033] It should be noted that the financial data calibration method and device in the present application can be used in the field of artificial intelligence to calibrate financial data based on artificial intelligence, and can also be used in any field other than the field of artificial intelligence to calibrate financial data based on artificial intelligence. The application field of the financial data calibration method and device in the present application is not limited.
[0034] It should be noted that the information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for display, analyzed data, etc.) involved in the present application are information and data authorized by the user or authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of related data comply with relevant laws, regulations and standards, necessary security measures are taken, do not violate public order and good customs, and provide corresponding operation portal for user to choose authorization or refusal. For example, interfaces are provided between the system and related users or institutions to provide corresponding operation portals for users to choose to agree or refuse automatic decision results; if the user chooses to refuse, the expert decision process is entered.
[0035] The following embodiments of the present application can be applied to various financial data calibration systems / applications / devices. The present application uses a machine learning model to automatically capture the trend of price difference changes, thereby calculating the price difference sequence in the future period, and calibrating the price data according to the price difference sequence, realizing smooth transition of price switching, and guaranteeing the accuracy of client display data.
[0036] The present application will be described in detail below in conjunction with various embodiments.
[0037] Embodiment one
[0038] According to an embodiment of the present application, an embodiment of a financial data calibration method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described herein can be executed in an order different from that shown herein.
[0039] The method embodiment provided by the embodiment one of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 A hardware structure block diagram of a computer terminal (or mobile device) for implementing a financial data calibration method is shown. As shown in Figure 1 The computer terminal 10 (or mobile device) can include one or more processors 102 (the processor 102 can include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission device 106 for communication function. In addition, it can also include a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which can be included as one of the ports in the BUS bus), a network interface, a power supply and / or a camera. Those skilled in the art can understand that Figure 1The illustrated architecture is merely a schematic and does not impose a limitation on the architecture of the electronic device described above. For example, the computer terminal 10 can further include more or less components than those shown, or have a different configuration of the components. The various components shown can be implemented in hardware, software, firmware, or any combination thereof. Figure 1 Figure 1
[0040] It should be noted that the one or more processors 102 and / or other data processing circuitry described above can be generally referred to herein as "data processing circuitry". The data processing circuitry can be embodied in whole or in part as software, hardware, firmware, or any combination thereof. In addition, the data processing circuitry can be a single standalone processing module, or incorporated in whole or in part into any of the other elements of the computer terminal 10 (or mobile device). As referred to in embodiments of the present application, the data processing circuitry serves as a processor to control, for example, the selection of the variable resistance terminal path connected to the interface.
[0041] The memory 104 can be used to store software programs of application software and modules, such as program instructions / data storage means corresponding to the financial data calibration method in embodiments of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, i.e. implements the financial data calibration method described above. The memory 104 can include a high-speed random access memory, and can further include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 can further include a memory remotely disposed relative to the processor 102, which can be connected to the computer terminal 10 through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0042] The transmission device 106 is used to receive or send data via a network. Specific examples of the network can include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (NIC), which can be connected to other network devices through a base station so as to be able to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet in a wireless manner.
[0043] The display can be, for example, a touch screen type liquid crystal display (LCD), which can enable a user to interact with the user interface of the computer terminal 10 (or mobile device).
[0044] In the above-described operating environment, the present application provides a method for calibrating financial data, comprising the steps of: Figure 2 The financial data calibration method shown in the figure, the implementation subject of the method is a financial data calibration system.
[0045] Figure 2 The flow chart of an optional financial data calibration method according to an embodiment of the application is shown in the figure, which comprises the following steps: Figure 2
[0046] Financial products, especially commodities and currencies, are affected by global supply and demand. When the market of a country or region is closed, the market of other countries or regions may still be trading, which means that market information and price changes will not stop due to the closure of a market. For example, after the Shanghai Gold Exchange closes, the New York Mercantile Exchange and the London Metal Exchange may still be trading commodities such as gold and copper. Price changes in these overseas markets will reflect the latest global information, including economic data releases, policy announcements, natural disasters, etc., which are important factors affecting commodity prices. From the perspective of investors and traders, they need a continuous price curve to track market trends and make decisions. If the domestic market no longer updates prices after closing, investors will face an information vacuum and be unable to judge the value changes of their assets in the international market. Therefore, the calibration of financial quotation data after closing is crucial, and real-time and accurate financial data can avoid users from making wrong decisions due to inaccurate client quotation data, thereby causing huge economic losses.
[0047] Some optional embodiments further comprise, before acquiring the real-time spread data and the historical spread data, listening to a preset trigger event based on a listening mechanism; and generating a trigger instruction in a case where the preset trigger event is listened to, wherein the trigger instruction is used to instruct the financial data calibration operation.
[0048] In the embodiment of the application, in order to ensure the automatic execution of financial data calibration, a listening component is arranged to listen to a preset trigger event, and the preset trigger event can be a stock exchange closing event. When the listening component listens to the occurrence of the preset trigger event, the built-in trigger instruction generation process is activated immediately. The trigger instruction has a function similar to an alarm signal inside the system, which immediately notifies the data processing component to start the financial data calibration operation, so as to ensure that the system can make appropriate adjustments at the first time of market environment change, so as to maintain the continuity and accuracy of the quotation.
[0049] Step S201, acquiring a real-time spread sequence and a historical spread sequence, and collecting event marker data of a target period.
[0050] In the above step S201, the spread refers to the price difference between two exchanges, for example, the price difference between the domestic exchange and the overseas exchange A. Through the above steps, financial data is collected from multiple dimensions. First, the real-time spread sequence of financial transaction products such as precious metals, foreign exchange, and energy in domestic and foreign markets is obtained in real time through a market data interface, ensuring the timeliness of the data, which is one of the important inputs of the dynamic prediction model. In addition to real-time data, historical spread sequences in the past period, such as the spread data between the domestic exchange and the overseas exchange A in the past month, are also collected. The historical spread sequence provides a reference for long-term trends and periodic changes in the market. At the same time, events that may affect the market spread in the target period, such as exchange rate intervention and major economic data release, are monitored and recorded. These event marker data are considered as key external factors that affect market dynamics, which can help the prediction model more accurately understand the reasons for the spread change.
[0051] Further, the steps of obtaining real-time spread sequence and historical spread sequence include: obtaining real-time spread data and historical spread data, and performing data cleaning on the real-time spread data and the historical spread data, wherein the data cleaning includes removing outliers and filling missing values; arranging the cleaned real-time spread data and historical spread data according to the time stamp to obtain the real-time spread sequence and the historical spread sequence.
[0052] Specifically, when obtaining the real-time spread sequence and the historical spread sequence, the system will collect real-time spread data and historical spread data, which represent the current market dynamics and the market performance in the past period, respectively. Real-time spread data captures the immediate spread between domestic and foreign markets, while historical spread data covers the trend of past spread changes, providing rich reference data for prediction operations. Subsequently, data cleaning operations are performed on the collected spread data. Data cleaning can include removing outliers and filling missing values, etc. Outliers can be detected and eliminated using the 3σ principle to prevent abnormal values from misleading model operations and ensure the reliability of the analysis results. Missing values can be filled using interpolation or prediction based on adjacent data points to maintain data continuity and avoid blank periods during model analysis. Subsequently, the cleaned real-time spread data and historical spread data are sorted to ensure that the data are arranged in chronological order, thereby converting the original data into sequence form to obtain the real-time spread sequence and the historical spread sequence.
[0053] In step S202, feature extraction and vector encoding are performed on the real-time spread sequence, the historical spread sequence, and the event marker data to obtain a spread feature vector.
[0054] In the above step S202, the preliminarily collected real-time spread sequence, historical spread sequence and event marking data are converted into a form that can be processed by a machine learning model, i.e. a spread feature vector. Short-term market fluctuation features are extracted from real-time spread data, such as spread change trend in the last few minutes, fluctuation amplitude, etc. These features reflect the current market dynamics in real time. At the same time, long-term trend features are extracted from historical data, including average spread, periodic fluctuation, market trend, etc. in the past few hours, days or weeks, providing a historical perspective for the prediction model. The event marking data is analyzed to extract features such as event type, occurrence time, and possible impact on the market, helping the model to assess the impact of external events on the spread.
[0055] The extracted features are then converted into numerical vectors for ease of processing by machine learning models. The encoding process ensures that each feature can be accurately interpreted by the model, and the vector form also facilitates mathematical operations such as matrix multiplication, etc.
[0056] Step S203, input the spread feature vector into the spread calibration model, and output the spread sequence of the target period.
[0057] In the above step S203, the spread feature vector is analyzed in depth by the spread calibration model, which evaluates the market spread trend from multiple angles and thus estimates the spread sequence in the future period. The spread calibration model is a machine learning model pre-constructed for calculating the spread sequence in the future period, including a long short-term memory model and an autoregressive moving average model. The long short-term memory model can capture the short-term trend changes of the spread sequence and identify the recent market fluctuation patterns. The autoregressive moving average model is responsible for predicting the long-term periodic fluctuation of the spread sequence, which can fit historical spread data and identify and predict future periodic trends. The combination of the long short-term memory model and the autoregressive moving average model aims to capture spread features at different time scales, thereby improving the accuracy and robustness of the evaluation.
[0058] Further, the step of inputting the spread feature vector into the spread calibration model and outputting the spread sequence of the target period comprises: inputting the spread feature vector into a long short-term memory model in the spread calibration model, capturing the spread change trend in the spread feature vector through the long short-term memory model, and outputting the first spread sequence data and the historical residual sequence data of the target period; inputting the first spread sequence data and the historical residual sequence data into an autoregressive moving average model in the spread calibration model, capturing the periodic change trend in the historical residual sequence data through the autoregressive moving average model, predicting the residual sequence data of the target period based on the periodic change trend, and correcting the first spread sequence data based on the residual sequence data to obtain and output the second spread sequence data of the target period; and weighting and fusing the first spread sequence data and the second spread sequence data of the target period to obtain the spread sequence of the target period.
[0059] Specifically, when outputting the spread sequence of the target period through the spread calibration model, the spread feature vector is input into the long short-term memory model to capture the long-term dependence relationship in the time series data. By capturing the spread change trend in the spread feature vector and applying the spread change trend to evaluate the spread sequence data in the future period, the first spread sequence data is obtained. In addition, the model calculates and outputs the historical residual sequence data, which reflects the difference between the model prediction and the actual historical data, and provides a basis for subsequent model calculation.
[0060] Based on the preliminary evaluation, the first spread sequence data and the historical residual sequence data are further input into the autoregressive moving average model. The periodic change trend of the time series data is analyzed and captured. The autoregressive moving average model extracts the periodic change trend in the historical residual sequence data and predicts the residual sequence data of the target period. Subsequently, the second spread sequence data is obtained by correcting the first spread sequence data with the residual. The output of the autoregressive moving average model is essentially an optimization of the output of the long short-term memory model, which incorporates the periodic characteristics of the sequence change and improves the accuracy of the prediction.
[0061] Finally, the first spread sequence data and the second spread sequence data are fused by weighting to obtain the spread sequence of the target period, i.e., the first spread sequence data, the weight value corresponding to the first spread sequence data, the second spread sequence data, and the weight value corresponding to the second spread sequence data are weighted and calculated to obtain the spread sequence of the target period. This fusion process is achieved by assigning appropriate weights to each sequence, and the selection of the weights can be dynamically configured. The purpose of the fusion is to integrate the advantages of the two models. The first spread sequence data reflects the immediate trend, while the second spread sequence data incorporates the long-term change trend and is periodically corrected. The final spread sequence can more accurately calibrate the financial data.
[0062] Further, the financial data calibration method further comprises: obtaining a liquidity index, and comparing the liquidity index with a preset liquidity index threshold to obtain a comparison result; and dynamically configuring weight values corresponding to the long short-term memory model and the autoregressive moving average model based on the comparison result.
[0063] Specifically, the embodiment of the present application dynamically adjusts the weight values corresponding to the models based on the liquidity index. First, the system obtains a liquidity index reflecting market liquidity in real time. This index is usually calculated based on market order book depth, trading volume, trading frequency and other data, and can effectively reflect the activity level of the market. Then, the liquidity index is compared with the preset liquidity index threshold of the system to obtain a comparison result. The preset threshold can be set according to the conventional liquidity level of the market, and is used to distinguish different states of high, medium and low market liquidity.
[0064] The calculation formula of the weight value of the long short-term memory model can be represented as: α = 1 / (1+e (-k×(L-T)) ), where α is the weight value of the long short-term memory model, L is the current liquidity index, T is the preset liquidity index threshold, and k is an adjustment parameter used to control the speed of weight change. Then the weight value of the autoregressive moving average model is represented as: β = 1-α.
[0065] Further, the liquidity index threshold includes a first liquidity index threshold and a second liquidity index threshold, the first liquidity index threshold is less than the second liquidity index threshold, and the step of dynamically configuring the weight values corresponding to the long short-term memory model and the autoregressive moving average model based on the comparison result comprises: in the case that the liquidity index is less than the first liquidity index threshold, the weight value configured for the long short-term memory model is greater than the weight value configured for the autoregressive moving average model; in the case that the liquidity index is greater than or equal to the first liquidity index threshold and less than or equal to the second liquidity index threshold, the weight value configured for the long short-term memory model is equal to the weight value configured for the autoregressive moving average model; and in the case that the liquidity index is greater than the second liquidity index threshold, the weight value configured for the long short-term memory model is less than the weight value configured for the autoregressive moving average model.
[0066] The comparison result determines the weight distribution of the long short-term memory model and the autoregressive difference moving average model. When the liquidity index is higher than the preset threshold, it indicates that the market liquidity is good, at this time the system tends to give a higher weight to the long short-term memory model, because the long short-term memory model can quickly respond to the instantaneous changes of the market and capture the short-term spread trend. On the contrary, when the liquidity index is lower than the preset threshold, i.e. the market liquidity is poor, the autoregressive difference moving average model will be given a higher weight, because the autoregressive difference moving average model evaluates the long-term periodic change trend based on historical data, and its prediction result is more stable and not easily affected by the instantaneous market fluctuations.
[0067] Further, the financial data calibration method further comprises: configuring a hardware accelerator for the spread calibration model; and accelerating the matrix operation of the spread calibration model by the hardware accelerator.
[0068] In an optional embodiment, a hardware accelerator is configured for the spread calibration model in the embodiment of the present application to significantly improve the performance of the model in processing matrix operations and ensure the timeliness and accuracy of data calibration. Since there are a large number of matrix multiplication and convolution operations in the long short-term memory model, and the spread sequence is complex and the data volume is large, the calculation efficiency is low, and the operation speed of the model can be significantly accelerated by configuring a hardware accelerator. After deploying the hardware accelerator, the model is compressed to a format suitable for running on a specific hardware accelerator. Then, necessary parameter adjustments such as batch size, operation precision, etc. are made to ensure efficient operation of the model on the accelerator.
[0069] In step S204, the base financial data is calibrated by the spread sequence of the target period to obtain calibrated financial data, and the calibrated financial data is displayed to the client.
[0070] In the above step S204, after the spread sequence of the target period is calculated, the base financial data of the target period is calibrated based on the spread data in the spread sequence. The base financial data can be the quote data of the exchange corresponding to the spread, which is generally calculated based on a preset calculation rule. Different exchanges have different base financial data calculation rules. Finally, the calibrated financial data of the target period is displayed in real time to the client, including but not limited to the trading software, mobile application or web page of the financial institution. So that users can view the latest calibrated financial data in time and make more accurate trading decisions.
[0071] By the above steps, the real-time spread sequence and the historical spread sequence are obtained, and the event marking data of the target period is collected, and then the real-time spread sequence, the historical spread sequence and the event marking data are subjected to feature extraction and vector encoding to obtain a spread feature vector, the spread feature vector is input into a spread calibration model, and a spread sequence of the target period is output, wherein the spread calibration model is a machine learning model pre-constructed for calculating the spread sequence in a future period of time, including a long short-term memory model and an autoregressive difference moving average model, and finally the basis financial data is calibrated by the spread sequence of the target period to obtain calibrated financial data, and the calibrated financial data is displayed to the client, wherein the basis financial data is calculated based on a preset calculation rule.
[0072] In the embodiment, according to the real-time spread sequence, the historical spread sequence and the pre-marked event data, the spread calibration model pre-constructed is used to perform deep analysis and matrix operation on the spread change trend from multiple angles, to calculate the spread sequence of the target period, and to calibrate the quotation data according to the spread sequence and display it on the client in real time, thereby ensuring the accuracy of the client financial data, minimizing user loss, and solving the technical problem that the way of switching the quotation of the overseas exchange in the closing interval of the domestic exchange leads to inaccurate display of the client financial data in the related art.
[0073] The following will be described in detail in combination with another optional specific embodiment.
[0074] Figure 3 is a schematic diagram of an optional financial data calibration process according to an embodiment of the application, as Figure 3 shown, the financial data calibration process includes:
[0075] Step one, start;
[0076] Step two, data collection;
[0077] A reference exchange is selected, and multi-dimensional data is collected based on the reference exchange, including but not limited to real-time spread data, historical spread data and event marking data between the target exchange and the reference exchange, and the event marking data specifically refers to significant events and related data that will affect the transaction price of a financial product.
[0078] The above collected data is cleaned and arranged to obtain real-time spread sequence and historical spread sequence and event marking data.
[0079] Step three, feature extraction, vector encoding;
[0080] Step four, model operation;
[0081] The pre-constructed spread calibration model includes a long short-term memory model and an autoregressive difference average model, the long short-term memory model captures the short-term spread change trend, and the autoregressive difference average model fits the periodic fluctuation of the spread sequence, and the spread sequences output by the two are weighted and fused to calculate.
[0082] The weight values corresponding to the long short-term memory model and the autoregressive difference average model are dynamically configured based on the liquidity index.
[0083] Step five, data calibration;
[0084] The spread sequence of the target period is combined to calibrate the financial data given by the reference exchange and displayed in real time on the client, so as to provide more accurate quotes for the user to make more accurate trading decisions.
[0085] Step six, end.
[0086] In the embodiment of the application, a machine learning model is used to automatically capture the spread change trend, so as to calculate the spread sequence in a future period of time, and then calibrate the price data according to the spread sequence, realize smooth transition of price switching, and guarantee the accuracy of the data displayed on the client.
[0087] The following will be described in detail in combination with another embodiment.
[0088] Embodiment two
[0089] The financial data calibration device provided in the embodiment includes a plurality of implementation units, each implementation unit corresponds to each implementation step in the above-mentioned embodiment one, and the specific implementation manner and beneficial effects can refer to the foregoing method embodiment, which will not be described here again.
[0090] Figure 4 It is a schematic diagram of an optional financial data calibration device according to the embodiment of the application, as shown in Figure 4 The financial data calibration device can include an acquisition unit 41, an encoding unit 42, an output unit 43 and a calibration unit 44, wherein,
[0091] The acquisition unit 41 is used to acquire real-time spread sequences and historical spread sequences, and collect event marker data of a target period;
[0092] The encoding unit 42 is used to perform feature extraction and vector encoding on the real-time spread sequences, the historical spread sequences and the event marker data to obtain spread feature vectors;
[0093] The output unit 43 is configured to input the spread feature vector into a spread calibration model to output a spread sequence of the target period, where the spread calibration model is a machine learning model pre-constructed for calculating the spread sequence in a future period, including a long short-term memory model and an autoregressive difference moving average model.
[0094] The calibration unit 44 is configured to calibrate the basic financial data based on the spread sequence of the target period to obtain calibrated financial data, and display the calibrated financial data to the client.
[0095] The above financial data calibration device, through the acquisition unit 41, acquires the real-time spread sequence and the historical spread sequence, and collects event marker data of the target period; through the encoding unit 42, the real-time spread sequence, the historical spread sequence and the event marker data are subjected to feature extraction and vector encoding to obtain a spread feature vector; through the output unit 43, the spread feature vector is input into a spread calibration model to output a spread sequence of the target period, where the spread calibration model is a machine learning model pre-constructed for calculating the spread sequence in a future period, including a long short-term memory model and an autoregressive difference moving average model; through the calibration unit 44, the basic financial data is calibrated based on the spread sequence of the target period to obtain calibrated financial data, and the calibrated financial data is displayed to the client, where the basic financial data is calculated based on a preset calculation rule.
[0096] In the embodiment, according to the real-time spread sequence, the historical spread sequence and the pre-labeled event data, the spread calibration model pre-constructed is used to perform deep analysis and matrix operation on the spread change trend from multiple angles, to calculate the spread sequence of the target period, and to calibrate the quotation data according to the spread sequence, and to display on the client in real time, so as to guarantee the accuracy of the financial data of the client, to minimize the loss of the user, and to solve the technical problem that in the related art, the mode of switching the quotation of the overseas exchange in the closing interval of the domestic exchange leads to inaccurate display of the financial data of the client.
[0097] Further, the output unit comprises: a first output module, configured to input the spread feature vector into a long short-term memory model in the spread calibration model, capture a spread change trend in the spread feature vector through the long short-term memory model, and output first spread sequence data and historical residual sequence data of the target period; a second output module, configured to input the first spread sequence data and the historical residual sequence data into an autoregressive moving average difference model in the spread calibration model, capture a periodic change trend in the historical residual sequence data through the autoregressive moving average difference model, predict residual sequence data of the target period based on the periodic change trend, correct the first spread sequence data based on the residual sequence data, obtain second spread sequence data of the target period, and output the second spread sequence data; and a first fusion module, configured to perform weighted fusion on the first spread sequence data and the second spread sequence data of the target period to obtain a spread sequence of the target period.
[0098] Further, the financial data calibration device further comprises: a first comparison module, configured to obtain a liquidity index, compare the liquidity index with a preset liquidity index threshold, and obtain a comparison result; and a first configuration module, configured to dynamically configure weight values corresponding to the long short-term memory model and the autoregressive moving average difference model based on the comparison result.
[0099] Further, the liquidity index threshold comprises a first liquidity index threshold and a second liquidity index threshold, the first liquidity index threshold is smaller than the second liquidity index threshold, and the first configuration module comprises: a first configuration submodule, configured to, in a case where the liquidity index is smaller than the first liquidity index threshold, configure a weight value for the long short-term memory model to be greater than a weight value configured for the autoregressive moving average difference model; a second configuration submodule, configured to, in a case where the liquidity index is greater than or equal to the first liquidity index threshold and smaller than or equal to the second liquidity index threshold, configure a weight value for the long short-term memory model to be equal to a weight value configured for the autoregressive moving average difference model; and a third configuration submodule, configured to, in a case where the liquidity index is greater than the second liquidity index threshold, configure a weight value for the long short-term memory model to be smaller than a weight value configured for the autoregressive moving average difference model.
[0100] Further, the obtaining unit comprises: a first obtaining module, configured to obtain real-time spread data and historical spread data, and perform data cleaning on the real-time spread data and the historical spread data, wherein the data cleaning comprises removing outliers and filling missing values; and a first arrangement module, configured to arrange the cleaned real-time spread data and the historical spread data according to timestamps to obtain real-time spread sequences and historical spread sequences.
[0101] Further, the financial data calibration apparatus further comprises: a first monitoring module, configured to monitor the preset trigger event based on a monitoring mechanism; and a first generation module, configured to generate a trigger instruction in a case where the preset trigger event is monitored, wherein the trigger instruction is used to instruct to perform the financial data calibration operation.
[0102] Further, the financial data calibration apparatus further comprises: a second configuration module, configured to configure a hardware accelerator for the spread calibration model; and a first acceleration module, configured to accelerate the matrix operation of the spread calibration model by using the hardware accelerator.
[0103] It should be noted that the above-mentioned acquisition unit 41, encoding unit 42, output unit 43, and calibration unit 44 correspond to steps S201 to S204 in Embodiment One, and the above-mentioned units have the same instances and application scenarios as the corresponding steps, but are not limited to the content disclosed in Embodiment One. It should be noted that the above-mentioned modules or units can be hardware components or software components stored in a memory (for example, memory 104) and processed by one or more processors (for example, processors 102a, 102b,..., 102n), or can be a part of the device and can run in the computer terminal 10 provided in Embodiment One.
[0104] The application will be described in detail below in conjunction with another alternative embodiment.
[0105] Embodiment Three
[0106] The embodiments of the application can also provide an electronic device, Figure 5 is a hardware structure block diagram of an electronic device (or mobile device) that can optionally execute the financial data calibration method according to the embodiments of the application, as Figure 5 shown, the electronic device can include one or more (only one is shown in the figure) processors 502, a memory 504, a storage controller, and a peripheral interface, wherein the peripheral interface is connected with a radio frequency module, an audio module, and a display. Figure 5
[0107] The memory can be used to store software programs and modules, such as program instructions / modules corresponding to the methods and devices in the embodiments of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, implements the above-mentioned method. The memory can include a high-speed random access memory, and can also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some examples, the memory can further include a memory remotely arranged with respect to the processor, and these remote memories can be connected to the terminal through a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.
[0108] The processor can call information and application programs stored in the memory through the transmission device to perform the following steps: acquiring real-time spread sequences and historical spread sequences, and collecting event marking data of a target period; performing feature extraction and vector coding on the real-time spread sequences, the historical spread sequences and the event marking data to obtain spread feature vectors; inputting the spread feature vectors into a spread calibration model to output spread sequences of the target period, wherein the spread calibration model is a machine learning model pre-constructed for calculating spread sequences in a future period of time, including a long short-term memory model and an autoregressive moving average difference model; calibrating the basic financial data through the spread sequences of the target period to obtain calibrated financial data, and displaying the calibrated financial data to the client, wherein the basic financial data is calculated based on a preset calculation rule.
[0109] The processor can also call information and application programs stored in the memory through the transmission device to perform the following steps: inputting the spread feature vectors into the long short-term memory model in the spread calibration model, capturing the spread change trend in the spread feature vectors through the long short-term memory model, and outputting first spread sequence data and historical residual sequence data of the target period; inputting the first spread sequence data and the historical residual sequence data into the autoregressive moving average difference model in the spread calibration model, capturing the periodic change trend in the historical residual sequence data through the autoregressive moving average difference model, predicting residual sequence data of the target period based on the periodic change trend, and correcting the first spread sequence data based on the residual sequence data to obtain second spread sequence data of the target period and output; weighting and fusing the first spread sequence data and the second spread sequence data of the target period to obtain the spread sequences of the target period.
[0110] The processor can also call information and application programs stored in the memory through the transmission device to perform the following steps: acquiring a liquidity index, and comparing the liquidity index with a preset liquidity index threshold to obtain a comparison result; and dynamically configuring weight values corresponding to the long short-term memory model and the autoregressive moving average difference model based on the comparison result.
[0111] The processor can further call information and application programs stored in the memory through the transmission device to perform the following steps: the liquidity index threshold includes a first liquidity index threshold and a second liquidity index threshold, the first liquidity index threshold is smaller than the second liquidity index threshold, and the step of dynamically configuring weight values corresponding to the long short-term memory model and the autoregressive moving average difference model based on the comparison result includes: in the case that the liquidity index is less than the first liquidity index threshold, the weight value configured for the long short-term memory model is greater than the weight value configured for the autoregressive moving average difference model; in the case that the liquidity index is greater than or equal to the first liquidity index threshold and less than or equal to the second liquidity index threshold, the weight value configured for the long short-term memory model is equal to the weight value configured for the autoregressive moving average difference model; and in the case that the liquidity index is greater than the second liquidity index threshold, the weight value configured for the long short-term memory model is smaller than the weight value configured for the autoregressive moving average difference model.
[0112] The processor can further call information and application programs stored in the memory through the transmission device to perform the following steps: obtaining real-time spread data and historical spread data, and performing data cleaning on the real-time spread data and the historical spread data, wherein the data cleaning includes removing outliers and filling missing values; and arranging the cleaned real-time spread data and the historical spread data according to timestamps to obtain a real-time spread sequence and a historical spread sequence.
[0113] The processor can further call information and application programs stored in the memory through the transmission device to perform the following steps: listening to a preset trigger event based on a listening mechanism; and generating a trigger instruction in the case that the preset trigger event is listened to, wherein the trigger instruction is used to instruct a financial data calibration operation.
[0114] Further, the financial data calibration method further includes: configuring a hardware accelerator for the spread calibration model; and accelerating matrix operations of the spread calibration model through the hardware accelerator.
[0115] By adopting the embodiment of the present application, a financial data calibration scheme is provided. According to the real-time spread sequence, the historical spread sequence and the pre-labeled event data, the spread change trend is deeply analyzed and matrix operated from multiple angles through the pre-constructed spread calibration model, the spread sequence of the target period is calculated, and the quotation data is calibrated according to the spread sequence and displayed in real time on the client, so that the accuracy of the client financial data is ensured, the user loss is minimized, and the technical problem that the inaccurate client financial data is caused by the mode of switching the quotation of the overseas exchange in the closed market interval of the domestic exchange in the related art is solved.
[0116] Those skilled in the art can understand that, Figure 5The structure shown is only schematic, and the electronic device can also be a smart phone, a tablet computer, a palm computer, a Mobile Internet Device (MID), a PAD, or the like terminal device. Figure 5 It does not limit the structure of the electronic device described above. For example, the electronic device can further include more or less components (such as a network interface, a display device, etc.) than those shown in the figure, or have a different configuration from that shown in the figure. Figure 5 Figure 5 The electronic device shown in the figure is only schematic, and the electronic device can also be a smart phone, a tablet computer, a palm computer, a Mobile Internet Device (MID), a PAD, or the like terminal device.
[0117] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the terminal device related hardware through a program, and the program can be stored in a computer readable storage medium, which can include a flash disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, etc.
[0118] The application will be described below in combination with another alternative embodiment.
[0119] Embodiment Four
[0120] The embodiment of the application further provides a computer readable storage medium. Optionally, in the embodiment of the application, the computer readable storage medium can be used to save the program code executed by the financial data calibration method provided in the embodiment one.
[0121] Optionally, in the embodiment of the application, the storage medium can be located in any one of the computer terminals in the computer terminal group in the computer network, or in any one of the mobile terminals in the mobile terminal group.
[0122] The embodiment of the application further provides a computer program product, when executed on a data processing device, is adapted to execute the steps of the financial data calibration method: acquiring a real-time spread sequence and a historical spread sequence, and collecting event label data of a target period; performing feature extraction and vector coding on the real-time spread sequence, the historical spread sequence and the event label data to obtain a spread feature vector; inputting the spread feature vector into a spread calibration model to output a spread sequence of the target period, wherein the spread calibration model is a machine learning model pre-constructed for calculating the spread sequence in a future period of time, and includes a long short-term memory model and an autoregressive difference moving average model; calibrating the basis financial data through the spread sequence of the target period to obtain calibrated financial data, and displaying the calibrated financial data to a client, wherein the basis financial data is calculated based on a preset calculation rule.
[0123] The embodiment of the present application also provides a computer program product, when executed on a data processing device, is adapted to execute the steps of the financial data calibration method: inputting the spread feature vector into a long short-term memory model in the spread calibration model, capturing the spread change trend in the spread feature vector through the long short-term memory model, and outputting the first spread sequence data and the historical residual sequence data of the target period; inputting the first spread sequence data and the historical residual sequence data into an autoregressive moving average difference model in the spread calibration model, capturing the periodic change trend in the historical residual sequence data through the autoregressive moving average difference model, predicting the residual sequence data of the target period based on the periodic change trend, and correcting the first spread sequence data based on the residual sequence data to obtain the second spread sequence data of the target period and output; and performing weighted fusion on the first spread sequence data and the second spread sequence data of the target period to obtain the spread sequence of the target period.
[0124] The embodiment of the present application also provides a computer program product, when executed on a data processing device, is adapted to execute the steps of the financial data calibration method: obtaining the liquidity index, comparing the liquidity index with the preset liquidity index threshold to obtain a comparison result, and dynamically configuring the weight values corresponding to the long short-term memory model and the autoregressive moving average difference model based on the comparison result.
[0125] The embodiment of the present application also provides a computer program product, when executed on a data processing device, is adapted to execute the steps of the financial data calibration method: the liquidity index threshold includes a first liquidity index threshold and a second liquidity index threshold, the first liquidity index threshold is smaller than the second liquidity index threshold, and the step of dynamically configuring the weight values corresponding to the long short-term memory model and the autoregressive moving average difference model based on the comparison result includes: in the case that the liquidity index is smaller than the first liquidity index threshold, the weight value configured for the long short-term memory model is greater than the weight value configured for the autoregressive moving average difference model; in the case that the liquidity index is greater than or equal to the first liquidity index threshold and smaller than or equal to the second liquidity index threshold, the weight value configured for the long short-term memory model is equal to the weight value configured for the autoregressive moving average difference model; and in the case that the liquidity index is greater than the second liquidity index threshold, the weight value configured for the long short-term memory model is smaller than the weight value configured for the autoregressive moving average difference model.
[0126] The embodiment of the present application also provides a computer program product, when executed on a data processing device, is adapted to execute the steps of the financial data calibration method: obtaining real-time spread data and historical spread data, and performing data cleaning on the real-time spread data and the historical spread data, wherein the data cleaning includes removing outliers and filling missing values; arranging the cleaned real-time spread data and the cleaned historical spread data according to timestamps to obtain real-time spread sequences and historical spread sequences.
[0127] The embodiment of the present application further provides a computer program product, when executed on a data processing device, is suitable for executing the procedures of the financial data calibration method: listening to preset trigger events based on a listening mechanism; and generating a trigger instruction in the case that the preset trigger event is listened to, wherein the trigger instruction is used for instructing to perform a financial data calibration operation.
[0128] The embodiment of the present application further provides a computer program product, when executed on a data processing device, is suitable for executing the procedures of the financial data calibration method: configuring a hardware accelerator for a vega calibration model; and accelerating matrix operation of the vega calibration model by the hardware accelerator.
[0129] The above-mentioned serial numbers of the embodiments of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments.
[0130] In the above-mentioned embodiments of the present application, the description of each embodiment has its own emphasis, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.
[0131] In several embodiments provided in the present application, it should be understood that the disclosed technical contents can be implemented by other ways. Among them, the above-mentioned device embodiments are only schematic, for example, the division of the units can be a logical function division, and actual implementation can have another division way, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units or modules shown or discussed can be indirect coupling or communication connection through some interfaces, units or modules, which can be electrical or other forms.
[0132] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, that is, they can be located in one place, or can be distributed to multiple units. Part or all of the units can be selected to achieve the purpose of the embodiment scheme according to actual needs.
[0133] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be realized in the form of hardware or in the form of software functional unit.
[0134] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application, essentially or in other words, the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions to make a computer device (which can be a personal computer, a server or a network device, etc.) execute all or part of the steps of the methods described in various embodiments of the present application. The aforementioned storage medium includes: a U disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store program codes.
[0135] The above is only the preferred embodiment of the present application, and it should be pointed out that for those skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, and these improvements and refinements should be considered as the protection scope of the present application.
Claims
1. A financial data calibration method, characterized in that, include: Obtain real-time and historical price spread sequences, and collect event-marked data for the target time period; Feature extraction and vector encoding are performed on the real-time price spread sequence, the historical price spread sequence, and the event marker data to obtain the price spread feature vector; The price spread feature vector is input into the price spread calibration model, and the price spread sequence of the target period is output. The price spread calibration model is a pre-built machine learning model for calculating the price spread sequence in the future period, including a long short-term memory model and an autoregressive differential moving average model. The basic financial data is calibrated using the price difference sequence of the target period to obtain calibrated financial data, which is then displayed to the client. The basic financial data is calculated based on preset calculation rules.
2. The method according to claim 1, characterized in that, The steps of inputting the price spread feature vector into the price spread calibration model and outputting the price spread sequence for the target time period include: The price spread feature vector is input into the long short-term memory model in the price spread calibration model. The long short-term memory model captures the price spread change trend in the price spread feature vector and outputs the first price spread sequence data and historical residual sequence data for the target period. The first price spread sequence data and the historical residual sequence data are input into the autoregressive differential moving average model in the price spread calibration model. The autoregressive differential moving average model captures the periodic change trend in the historical residual sequence data. Based on the periodic change trend, the residual sequence data for the target period is predicted. The first price spread sequence data is corrected based on the residual sequence data to obtain the second price spread sequence data for the target period and output it. The first price spread sequence data and the second price spread sequence data for the target time period are weighted and fused to obtain the price spread sequence for the target time period.
3. The method according to claim 2, characterized in that, The financial data calibration method also includes: Obtain the liquidity index and compare it with a preset liquidity index threshold to obtain the comparison result; Based on the comparison results, the weight values corresponding to the Long Short-Term Memory model and the Autoregressive Differential Moving Average model are dynamically configured.
4. The method according to claim 3, characterized in that, The liquidity index threshold includes a first liquidity index threshold and a second liquidity index threshold, wherein the first liquidity index threshold is less than the second liquidity index threshold. The step of dynamically configuring the weight values corresponding to the long short-term memory model and the autoregressive difference moving average model based on the comparison results includes: When the liquidity index is less than the first liquidity index threshold, the weight value configured for the long short-term memory model is greater than the weight value configured for the autoregressive difference moving average model. When the liquidity index is greater than or equal to the first liquidity index threshold and less than or equal to the second liquidity index threshold, the weight value configured for the long short-term memory model is equal to the weight value configured for the autoregressive difference moving average model. When the liquidity index is greater than the second liquidity index threshold, the weight value configured for the long short-term memory model is less than the weight value configured for the autoregressive moving average model.
5. The method according to claim 1, characterized in that, The steps to obtain real-time spread sequences and historical spread sequences include: Acquire real-time price difference data and historical price difference data, and perform data cleaning on the real-time price difference data and the historical price difference data, wherein the data cleaning includes removing outliers and filling in missing values; The cleaned real-time price difference data and the historical price difference data are arranged according to timestamps to obtain the real-time price difference sequence and the historical price difference sequence.
6. The method according to claim 1, characterized in that, Before obtaining real-time and historical price spread data, the following is also included: The system listens for preset trigger events based on a listening mechanism. Upon detecting the occurrence of the preset trigger event, a trigger instruction is generated, wherein the trigger instruction is used to instruct a financial data calibration operation to be performed.
7. The method according to claim 1, characterized in that, Also includes: Configure a hardware accelerator for the price spread calibration model; The matrix operations of the price difference calibration model are accelerated using the hardware accelerator.
8. A financial data calibration device, characterized in that, include: The acquisition unit is used to acquire real-time price spread sequences and historical price spread sequences, and to collect event tag data for the target time period; The encoding unit is used to perform feature extraction and vector encoding on the real-time price spread sequence, the historical price spread sequence and the event marker data to obtain a price spread feature vector. The output unit is used to input the price difference feature vector into the price difference calibration model and output the price difference sequence of the target period. The price difference calibration model is a pre-built machine learning model for calculating the price difference sequence in the future period, including a long short-term memory model and an autoregressive differential moving average model. The calibration unit is used to calibrate the basic financial data using the price difference sequence of the target time period to obtain calibrated financial data, and then display the calibrated financial data to the client. The basic financial data is calculated based on preset calculation rules.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein, when the computer program is executed, it controls the device on which the computer-readable storage medium is located to perform the financial data calibration method according to any one of claims 1 to 7.
10. An electronic device, characterized in that, It includes one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the financial data calibration method according to any one of claims 1 to 7.
11. A computer program product, characterized in that, The computer program product includes a computer program, wherein the computer program, when executed by a processor, implements the financial data calibration method according to any one of claims 1 to 7.
