Method and device for correcting abnormal foreign exchange falling period point, medium and terminal
By automatically calculating and processing market data differences, real-time correction of foreign exchange swap points is achieved, real-time problems caused by manual correction are solved, and the accuracy and efficiency of trading decisions are improved.
Patent Information
- Application Number
- CN202510581856.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-07
- Publication Date
- 2025-08-08
AI Technical Summary
In the prior art, relying on manual correction of abnormal foreign exchange swap points in the foreign exchange swap fixed curve leads to poor real-time performance, affecting trading decisions and quotation accuracy.
By obtaining the current foreign exchange transaction data for the target period, determining the data status according to the abnormal foreign exchange transaction data judgment rules, and calculating the difference of each market data, adding and processing with the previous foreign exchange swap point, automatically correcting the abnormal foreign exchange swap point.
Automatic correction of abnormal foreign exchange swap points is realized, real-time and correction efficiency are improved, and the complexity of swap points calculation under the synergy of market data is simplified.
Smart Images

Figure CN120450865A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the fields of data processing technology and finance, and in particular to a method, device, medium, and terminal for correcting abnormal foreign exchange swap points. Background Art
[0002] In the foreign exchange market, to ensure the accuracy of trading quotes, market participants typically use the FX swap fixing curve published daily by the China Foreign Exchange Trading System (CFETS) as a key pricing benchmark. Generally, the data provided by this FX swap fixing curve is relatively accurate. However, for products with low trading activity, due to sparse market transactions, the raw transaction data on which the FX swap fixing curve relies is susceptible to the influence of occasional trading, which can cause the FX swap fixing curve to deviate from actual market conditions. When a FX swap fixing curve that deviates from actual market conditions is used, the valuation data can differ significantly, leading to market participants making erroneous trading decisions or irrational quotes, resulting in trading losses. Therefore, it is necessary to promptly correct abnormal FX swap points.
[0003] However, in the prior art, abnormal foreign exchange swap points in the foreign exchange swap fixing curve are usually corrected manually, resulting in poor real-time performance. Summary of the Invention
[0004] In view of this, the present application provides a method, apparatus, medium, and terminal for correcting abnormal foreign exchange swap points. The main purpose is to address the problem of poor real-time performance caused by the existing reliance on manual correction of abnormal foreign exchange swap points in the foreign exchange swap fixing curve.
[0005] According to one aspect of the present application, a method for correcting abnormal foreign exchange swap points is provided, comprising:
[0006] Get the current foreign exchange transaction data of the target period;
[0007] determining the status of the current foreign exchange transaction data according to a rule for determining abnormal foreign exchange transaction data corresponding to the target period;
[0008] If the status of the current foreign exchange transaction data is abnormal, the second differences between each item of the current first market data and the previous first market data corresponding to the target term are calculated based on the items of previous first market data corresponding to the target term, the term parameter corresponding to the target term, and the first differences between each item of the current second market data and the previous second market data corresponding to the preset base term. The previous foreign exchange swap point corresponding to the target term and the sum of each of the second differences are added together to obtain the revised current foreign exchange swap point for the target term.
[0009] Preferably, the calculating of the second differences between each item of the current first market data corresponding to the target period and the previous first market data based on each item of the previous first market data corresponding to the target period, the term parameter corresponding to the target period, and the first differences between each item of the current second market data corresponding to the preset benchmark period and the previous second market data includes:
[0010] Calculate the second basis difference between the current first basis difference and the previous first basis difference using the basis difference calculation formula based on the previous first spot exchange rate, the previous first target currency interest rate, the term parameter corresponding to the target term, and the first basis difference between the current second basis difference and the previous second basis difference;
[0011] The second benchmark currency interest rate difference between the current first benchmark currency interest rate and the previous first benchmark currency interest rate is calculated using the benchmark currency interest rate difference calculation formula based on the previous first spot exchange rate, the previous first target currency interest rate, the term parameter corresponding to the target term, and the first benchmark currency interest rate difference between the current second benchmark currency interest rate and the previous second benchmark currency interest rate.
[0012] Calculate the second target currency interest rate difference between the current first target currency interest rate and the previous first target currency interest rate using the target currency interest rate difference calculation formula based on the previous first spot exchange rate, the previous first benchmark currency interest rate, the previous first basis difference, the previous first target currency interest rate, the term parameter corresponding to the target term, and the first target currency interest rate difference between the current second target currency interest rate and the previous second target currency interest rate;
[0013] The second spot exchange rate difference between the current first spot exchange rate and the previous first spot exchange rate is calculated using the spot exchange rate difference calculation formula based on the previous first target currency interest rate, the previous first benchmark currency interest rate, the previous first basis, the term parameter corresponding to the target term, and the first spot exchange rate difference between the current second spot exchange rate and the previous second spot exchange rate.
[0014] Preferably, the process of adding the previous foreign exchange swap point corresponding to the target term and the sum of each of the second differences to obtain the current foreign exchange swap point after the target term is revised includes:
[0015] Summing the second basis difference, the second base currency interest rate difference, the second base currency interest rate difference, and the second spot exchange rate difference to obtain a sum of the second differences;
[0016] Obtain the status of the previous foreign exchange transaction data corresponding to the target period;
[0017] If the status of the previous foreign exchange transaction data is abnormal, obtaining a corrected status of the previous foreign exchange transaction data;
[0018] If the status of the revised previous foreign exchange transaction data is normal, summing the revised previous foreign exchange swap point and the sum of each of the second differences to obtain the revised current foreign exchange swap point for the target term;
[0019] If the status of the revised previous foreign exchange transaction data is abnormal, the previous foreign exchange swap point and the sum of each of the second differences are added together to obtain the revised current foreign exchange swap point for the target term.
[0020] Preferably, the term parameter is used to represent the ratio between the actual number of days that have passed during the term and the number of days in a year.
[0021] Preferably, after determining the status of the current foreign exchange transaction data according to the abnormal foreign exchange transaction data determination rule corresponding to the target period, the method further includes:
[0022] If the status of the current foreign exchange transaction data is normal, obtaining the status of the previous foreign exchange transaction data corresponding to the target period;
[0023] If the status of the previous foreign exchange transaction data is normal, the previous foreign exchange swap point is obtained to verify the current foreign exchange swap point based on the previous foreign exchange swap point.
[0024] Preferably, the first market data includes a first basis, a first benchmark currency interest rate, a first target currency interest rate and a first spot exchange rate, and the second market data includes a second basis, a second benchmark currency interest rate, a second target currency interest rate and a second spot exchange rate.
[0025] Preferably, the current foreign exchange transaction data includes a current transaction price and a current transaction volume, and determining the status of the current foreign exchange transaction data according to the abnormal foreign exchange transaction data determination rule corresponding to the target period includes:
[0026] Obtaining abnormal foreign exchange transaction data determination rules corresponding to the target period, the abnormal foreign exchange transaction data determination rules including a maximum transaction price threshold and a minimum transaction volume threshold;
[0027] If the current transaction price is greater than or equal to the maximum transaction price threshold, and / or if the current transaction volume is less than or equal to the minimum transaction volume threshold, then the status of the current foreign exchange transaction data is determined to be abnormal.
[0028] According to another aspect of the present application, a device for correcting abnormal foreign exchange swap points is provided, comprising:
[0029] A foreign exchange transaction data acquisition module is used to obtain the current foreign exchange transaction data of the target period;
[0030] a foreign exchange transaction status determination module, configured to determine the status of the current foreign exchange transaction data according to a determination rule for abnormal foreign exchange transaction data corresponding to the target period;
[0031] an abnormal foreign exchange swap point correction module configured to, if the status of the current foreign exchange transaction data is abnormal, calculate, based on each item of previous first market data corresponding to the target term, the term parameter corresponding to the target term, and the first difference between each item of current second market data corresponding to a preset base term and the previous second market data, respectively, a second difference between each item of current first market data corresponding to the target term and the previous first market data; and sum the previous foreign exchange swap point corresponding to the target term and each item of the second difference to obtain the corrected current foreign exchange swap point for the target term.
[0032] Preferably, the abnormal foreign exchange swap point correction module is used to:
[0033] Calculate the second basis difference between the current first basis difference and the previous first basis difference using the basis difference calculation formula based on the previous first spot exchange rate, the previous first target currency interest rate, the term parameter corresponding to the target term, and the first basis difference between the current second basis difference and the previous second basis difference;
[0034] The second benchmark currency interest rate difference between the current first benchmark currency interest rate and the previous first benchmark currency interest rate is calculated using the benchmark currency interest rate difference calculation formula based on the previous first spot exchange rate, the previous first target currency interest rate, the term parameter corresponding to the target term, and the first benchmark currency interest rate difference between the current second benchmark currency interest rate and the previous second benchmark currency interest rate.
[0035] Calculate the second target currency interest rate difference between the current first target currency interest rate and the previous first target currency interest rate using the target currency interest rate difference calculation formula based on the previous first spot exchange rate, the previous first benchmark currency interest rate, the previous first basis difference, the previous first target currency interest rate, the term parameter corresponding to the target term, and the first target currency interest rate difference between the current second target currency interest rate and the previous second target currency interest rate;
[0036] The second spot exchange rate difference between the current first spot exchange rate and the previous first spot exchange rate is calculated using the spot exchange rate difference calculation formula based on the previous first target currency interest rate, the previous first benchmark currency interest rate, the previous first basis, the term parameter corresponding to the target term, and the first spot exchange rate difference between the current second spot exchange rate and the previous second spot exchange rate.
[0037] Preferably, the abnormal foreign exchange swap point correction module is further configured to:
[0038] Summing the second basis difference, the second base currency interest rate difference, the second base currency interest rate difference, and the second spot exchange rate difference to obtain a sum of the second differences;
[0039] Obtain the status of the previous foreign exchange transaction data corresponding to the target period;
[0040] If the status of the previous foreign exchange transaction data is abnormal, obtaining a corrected status of the previous foreign exchange transaction data;
[0041] If the status of the revised previous foreign exchange transaction data is normal, summing the revised previous foreign exchange swap point and the sum of each of the second differences to obtain the revised current foreign exchange swap point for the target term;
[0042] If the status of the revised previous foreign exchange transaction data is abnormal, the previous foreign exchange swap point and the sum of each of the second differences are added together to obtain the revised current foreign exchange swap point for the target term.
[0043] Preferably, the term parameter is used to represent the ratio between the actual number of days that have passed during the term and the number of days in a year.
[0044] Preferably, after the foreign exchange transaction status determination module, the device further includes a verification module for:
[0045] If the status of the current foreign exchange transaction data is normal, obtaining the status of the previous foreign exchange transaction data corresponding to the target period;
[0046] If the status of the previous foreign exchange transaction data is normal, the previous foreign exchange swap point is obtained to verify the current foreign exchange swap point based on the previous foreign exchange swap point.
[0047] Preferably, the first market data includes a first basis, a first benchmark currency interest rate, a first target currency interest rate and a first spot exchange rate, and the second market data includes a second basis, a second benchmark currency interest rate, a second target currency interest rate and a second spot exchange rate.
[0048] Preferably, the current foreign exchange transaction data includes the current transaction price and the current transaction volume, and the foreign exchange transaction status determination module is configured to:
[0049] Obtaining abnormal foreign exchange transaction data determination rules corresponding to the target period, the abnormal foreign exchange transaction data determination rules including a maximum transaction price threshold and a minimum transaction volume threshold;
[0050] If the current transaction price is greater than or equal to the maximum transaction price threshold, and / or if the current transaction volume is less than or equal to the minimum transaction volume threshold, then the status of the current foreign exchange transaction data is determined to be abnormal.
[0051] According to another aspect of the present application, a storage medium is provided, wherein the storage medium stores at least one executable instruction, wherein the executable instruction causes a processor to execute operations corresponding to the above-mentioned method for correcting abnormal foreign exchange swap points.
[0052] According to another aspect of the present application, there is provided a terminal, comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus;
[0053] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute operations corresponding to the above-mentioned method for correcting abnormal foreign exchange swap points.
[0054] By means of the above technical solution, the technical solution provided by the embodiment of the present application has at least the following advantages:
[0055] The present application provides a method, apparatus, medium, and terminal for correcting abnormal foreign exchange swap points. The method comprises the following steps: first, obtaining current foreign exchange transaction data for a target period; second, determining the status of the current foreign exchange transaction data based on a determination rule for abnormal foreign exchange transaction data corresponding to the target period; and finally, if the status of the current foreign exchange transaction data is abnormal, calculating second differences between each item of current first market data corresponding to the target period and the previous first market data based on items of previous first market data corresponding to the target period, term parameters corresponding to the target period, and first differences between each item of current second market data corresponding to a preset base period and the previous second market data. The method then adds the previous foreign exchange swap point corresponding to the target period and the sum of each of the second differences to obtain the corrected current foreign exchange swap point for the target period. Compared with the prior art, when abnormal foreign exchange transaction data is detected, the embodiment of the present application quantifies the impact of various market data on the foreign exchange swap point within a target period based on the previous foreign exchange transaction data, and obtains the corrected current foreign exchange swap point. This achieves automatic correction of abnormal foreign exchange swap points and improves the real-time nature of abnormal foreign exchange swap point correction. Furthermore, by using the fluctuation range of various market data over a one-year period as a benchmark, the complexity of swap point calculation under the coordinated influence of various market data is simplified, thereby improving the efficiency of correcting abnormal foreign exchange swap points.
[0056] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Various other advantages and benefits will become apparent to those skilled in the art upon reading the detailed description of the preferred embodiment below. The accompanying drawings are for illustration purposes only and are not to be considered as limiting the present application. The same reference symbols are used throughout the drawings to represent the same components. In the drawings:
[0058] Figure 1 A flow chart of a method for correcting abnormal foreign exchange swap points provided by an embodiment of the present application is shown;
[0059] Figure 2 A flow chart of another method for correcting abnormal foreign exchange swap points provided by an embodiment of the present application is shown;
[0060] Figure 3 A block diagram of a device for correcting abnormal foreign exchange swap points provided by an embodiment of the present application is shown;
[0061] Figure 4A schematic diagram of the structure of a terminal provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0062] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0063] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology, and application system that uses digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use knowledge to achieve optimal results.
[0064] Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interaction systems, and mechatronics. AI software technologies primarily encompass computer vision, robotics, biometrics, speech processing, natural language processing, and machine learning / deep learning.
[0065] Based on this, in one embodiment, Figure 1 As shown, a method for correcting abnormal foreign exchange swap points is provided. The method is described by applying it to a computer device such as a server. The server can be a standalone server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms, such as financial platforms. The method includes the following steps:
[0066] 101. Obtain the current foreign exchange transaction data for the target period.
[0067] The target term includes, but is not limited to, an 18-month term, a 2-year term, a 3-year term, etc.; foreign exchange transaction data includes, but is not limited to, transaction prices and transaction volumes, with transaction prices representing the bid-ask spread at the same time. In this embodiment of the present application, the current execution end may be a foreign exchange swap fixing curve drawing module.
[0068] 102. Determine the status of the current foreign exchange transaction data based on the abnormal foreign exchange transaction data determination rules corresponding to the target period.
[0069] The abnormal foreign exchange transaction data determination rules may include a maximum transaction price threshold and a minimum transaction volume. In the embodiment of the present application, when any one of the abnormal foreign exchange transaction data determination rules is met, the status of the current foreign exchange transaction data can be determined to be abnormal.
[0070] 103. If the status of the current foreign exchange transaction data is abnormal, the second differences between each item of the current first market data corresponding to the target term and the previous first market data are calculated based on the items of the previous first market data corresponding to the target term, the term parameter corresponding to the target term, and the first differences between each item of the current second market data corresponding to the preset base term and the previous second market data. The previous foreign exchange swap point corresponding to the target term and the sum of the second differences are then added together to obtain the current foreign exchange swap point after adjustment for the target term.
[0071] Among them, the first market data includes the first basis, the first benchmark currency interest rate, the first target currency interest rate and the first spot exchange rate; the second market data includes the second basis, the second benchmark currency interest rate, the second target currency interest rate and the second spot exchange rate. The benchmark currency interest rate is used to represent the RMB interest rate, and the target currency interest rate is used to represent the USD interest rate; the term parameter is used to represent the ratio between the actual number of days in the term and the number of days in a year; the preset benchmark term is used to represent a one-year term; the first difference is used to represent the fluctuation range of various market data corresponding to the preset benchmark term; the second difference is used to represent the fluctuation range of various market data corresponding to the target term.
[0072] Compared with the prior art, when abnormal foreign exchange transaction data is detected, the embodiment of the present application quantifies the impact of various market data on the foreign exchange swap point within a target period based on the previous foreign exchange transaction data, and obtains the corrected current foreign exchange swap point. This achieves automatic correction of abnormal foreign exchange swap points and improves the real-time nature of abnormal foreign exchange swap point correction. Furthermore, by using the fluctuation range of various market data over a one-year period as a benchmark, the complexity of swap point calculation under the coordinated influence of various market data is simplified, thereby improving the efficiency of correcting abnormal foreign exchange swap points.
[0073] The embodiment of the present application provides another method for correcting abnormal foreign exchange swap points, such as Figure 2 As shown, the method includes:
[0074] 201. Obtain the current foreign exchange transaction data for the target period.
[0075] The current foreign exchange transaction data includes the current transaction price and the current transaction volume.
[0076] 202. Determine the status of the current foreign exchange transaction data based on the abnormal foreign exchange transaction data determination rule corresponding to the target period.
[0077] The abnormal foreign exchange transaction data determination rules include a maximum transaction price threshold and a minimum transaction volume threshold. For example, for a one-year period, the maximum transaction price threshold is 100, and the minimum transaction volume threshold is 1; for an 18-month period, the maximum transaction price threshold is 150, and the minimum transaction volume threshold is 1; for a two-year period, the maximum transaction price threshold is 200, and the minimum transaction volume threshold is 1; for a three-year period, the maximum transaction price threshold is 300, and the minimum transaction volume threshold is 1, etc. Assuming the target period is 18 months, the abnormal foreign exchange transaction data determination rules corresponding to 18 months are first obtained: the maximum transaction price threshold is 150, and the minimum transaction volume threshold is 1; further, if the current transaction price is greater than or equal to 100, and / or the current transaction volume is less than or equal to 1, the current foreign exchange transaction data is determined to be abnormal.
[0078] Accordingly, step 202 of the embodiment specifically includes: obtaining a rule for determining abnormal foreign exchange transaction data corresponding to the target period, where the rule for determining abnormal foreign exchange transaction data includes a maximum transaction price threshold and a minimum transaction volume threshold; if the current transaction price is greater than or equal to the maximum transaction price threshold, and / or if the current transaction volume is less than or equal to the minimum transaction volume threshold, determining that the status of the current foreign exchange transaction data is abnormal.
[0079] 203. If the status of the current foreign exchange transaction data is abnormal, the second differences between each item of the current first market data corresponding to the target period and the previous first market data are calculated based on the items of the previous first market data corresponding to the target period, the term parameter corresponding to the target period, and the first differences between each item of the current second market data corresponding to the preset benchmark period and the previous second market data.
[0080] It should be noted that, first, based on the fluctuation range of the swap point of the one-year term (i.e. the preset benchmark term), the current foreign exchange swap point correction model of the target term is constructed.
[0081]
[0082] Among them, F represents the forward price, S represents the spot price, r repo represents the benchmark currency interest rate, r sofr represents the target currency interest rate, Basis represents the basis, and tenor represents the term (e.g., if it is 18 months, then tenor = 1.5).
[0083] Furthermore, since the swap point P at time t t =FS, then
[0084]
[0085] In order to simplify the calculation complexity of the swap point, in the embodiment of the present application, (1+r sofr ) tenor Converted to 1+tenor×r sofr , based on this,
[0086]
[0087] Furthermore, the foreign exchange swap point is affected by the basis, the benchmark currency interest rate, the target currency interest rate, and the spot interest rate. Since the curve of the target term swap point changing over time is parallel to the curve of the preset benchmark term swap point changing over time, assuming that ΔBasis(18M,t)≈ΔBasis(1Y,t), Δr repo (18M,t)≈Δr repo (1Y,t),Δr sofr (18M,t)≈Δr sofr (1Y,t),Δr spot (18M,t)≈Δr spot (1Y,t), the following formula can be derived, taking the target period of 18 months as an example:
[0088] The formula for calculating the initial basis difference is:
[0089]
[0090] Where ΔP Basis (18M,t) represents the second basis difference, r spot (18M,t-1) represents the previous first spot exchange rate, tenor represents the term, r sofr (18M,t-1) represents the previous first target currency interest rate, and ΔBasis(1Y,t) represents the first basis difference;
[0091] The calculation formula for the initial benchmark currency interest rate difference is:
[0092]
[0093] Where ΔP repo (18M,t) represents the interest rate difference of the second benchmark currency, Δr repo (1Y,t) represents the interest rate differential of the first benchmark currency;
[0094] The calculation formula for the initial target currency interest rate difference is:
[0095]
[0096] Where ΔP sofr (18M,t) represents the interest rate difference of the second target currency, r repo (18M,t-1) represents the previous first benchmark currency interest rate, Basis(18M,t-1) represents the previous first basis, Δr sofr (1Y,t) represents the interest rate differential of the second target currency;
[0097] The formula for calculating the initial spot exchange rate difference is:
[0098]
[0099] Where ΔP spot (18M,t) represents the second spot exchange rate difference, Δr spot (1Y,t) represents the first spot exchange rate difference.
[0100] Furthermore, in actual considerations, due to holidays, adjusted leave, etc., the actual number of affected days may not be a full 18 months, that is, tenor is not exactly equal to 1.5. Based on this, in the embodiment of the present application, the term tenor is replaced by the term parameter tenor_t, which represents the ratio between the actual number of days in the term and the number of days in a year, that is,
[0101]
[0102] Among them, during_date(t) represents the actual number of days that have passed the deadline.
[0103] It is understandable that the impact of a one-day change in maturity on the foreign exchange swap point can be expressed as the following formula:
[0104]
[0105] By replacing the term tenor in the above formulas for calculating the initial basis difference, the initial base currency interest rate difference, the initial target currency interest rate difference, and the initial spot exchange rate difference with the term parameter tenor_t, we can obtain the following formula:
[0106] Basis difference calculation formula,
[0107]
[0108] Among them, tenor_t represents the term parameter;
[0109] The calculation formula for the benchmark currency interest rate difference is:
[0110]
[0111] Target currency interest rate difference calculation formula,
[0112]
[0113] The formula for calculating the spot exchange rate difference is:
[0114]
[0115] Accordingly, step 203 of the embodiment specifically includes: the first market data includes a first basis, a first benchmark currency interest rate, a first target currency interest rate, and a first spot exchange rate; the second market data includes a second basis, a second benchmark currency interest rate, a second target currency interest rate, and a second spot exchange rate.
[0116] Based on the previous first spot exchange rate, the previous first target currency interest rate, the term parameter corresponding to the target term, and the first basis difference between the current second basis and the previous second basis, the second basis difference between the current first basis and the previous first basis is calculated using the basis difference calculation formula; based on the previous first spot exchange rate, the previous first target currency interest rate, the term parameter corresponding to the target term, and the first benchmark currency interest rate difference between the current second benchmark currency interest rate and the previous second benchmark currency interest rate, the second benchmark currency interest rate difference between the current first benchmark currency interest rate and the previous first benchmark currency interest rate is calculated using the benchmark currency interest rate difference calculation formula; based on the previous first spot exchange rate, the previous first benchmark currency interest rate, the first benchmark currency interest rate difference between the current second benchmark currency interest rate and the previous second benchmark currency interest rate The second target currency interest rate difference between the current first target currency interest rate and the previous first target currency interest rate is calculated using the target currency interest rate difference calculation formula based on the first target currency interest rate, the previous first basis difference, the previous first target currency interest rate, the term parameter corresponding to the target term, and the first target currency interest rate difference between the current second target currency interest rate and the previous second target currency interest rate. The second spot exchange rate difference between the current first spot exchange rate and the previous first spot exchange rate is calculated using the spot exchange rate difference calculation formula based on the previous first target currency interest rate, the previous first benchmark currency interest rate, the previous first basis difference, the term parameter corresponding to the target term, and the first spot exchange rate difference between the current second spot exchange rate and the previous second spot exchange rate.
[0117] 204. Sum the second basis difference, the second benchmark currency interest rate difference, the second benchmark currency interest rate difference, and the second spot exchange rate difference to obtain the sum of the second differences.
[0118] 205. Add the previous foreign exchange swap point corresponding to the target term and the sum of the second differences to obtain the current foreign exchange swap point after the target term is adjusted.
[0119] It should be noted that step 205 of the embodiment is divided into the following two situations:
[0120] In case 1, the status of the previous foreign exchange transaction data is abnormal, and the status of the revised previous foreign exchange transaction data is normal. In this case, the revised previous foreign exchange swap point and the sum of the second differences are added to obtain the revised current foreign exchange swap point for the target term. The revised previous foreign exchange transaction data is obtained based on the revised previous foreign exchange swap point.
[0121] In the second scenario, if the status of the previous foreign exchange transaction data is abnormal and the status of the revised previous foreign exchange transaction data is also abnormal, then the previous foreign exchange swap point (i.e., the actual foreign exchange swap point) and the sum of the second differences are added together to obtain the current foreign exchange swap point after correction for the target term.
[0122] In one embodiment of the present application, for further definition and explanation, the embodiment method corresponding to step 103 of the embodiment further includes: if the status of the current foreign exchange transaction data is normal, obtaining the status of the previous foreign exchange transaction data corresponding to the target period; if the status of the previous foreign exchange transaction data is normal, obtaining the previous foreign exchange swap point, so as to verify the current foreign exchange swap point based on the previous foreign exchange swap point.
[0123] In the embodiment of the present application, when the status of the current foreign exchange transaction data is normal, it is divided into the following two situations:
[0124] In case (1), the status of the previous foreign exchange transaction data is normal. In this case, the previous foreign exchange swap point is used to verify the current foreign exchange swap point.
[0125] In case (2), the status of the previous foreign exchange transaction data is abnormal. Since it is invalid to use abnormal data to verify normal data, no processing is performed in this case.
[0126] The present application provides a method for correcting abnormal foreign exchange swap points. The method comprises the following steps: first, obtaining current foreign exchange transaction data for a target period; second, determining the status of the current foreign exchange transaction data according to a determination rule for abnormal foreign exchange transaction data corresponding to the target period; and finally, if the status of the current foreign exchange transaction data is abnormal, calculating second differences between each item of current first market data corresponding to the target period and the previous first market data based on items of previous first market data corresponding to the target period, term parameters corresponding to the target period, and first differences between each item of current second market data corresponding to a preset base period and the previous second market data. The method then adds the previous foreign exchange swap point corresponding to the target period and each of the second differences to obtain the corrected current foreign exchange swap point for the target period. Compared with the prior art, when abnormal foreign exchange transaction data is detected, the embodiment of the present application quantifies the impact of various market data on the foreign exchange swap point within a target period based on the previous foreign exchange transaction data, and obtains the corrected current foreign exchange swap point. This achieves automatic correction of abnormal foreign exchange swap points and improves the real-time nature of abnormal foreign exchange swap point correction. Furthermore, by using the fluctuation range of various market data over a one-year period as a benchmark, the complexity of swap point calculation under the coordinated influence of various market data is simplified, thereby improving the efficiency of correcting abnormal foreign exchange swap points.
[0127] Furthermore, as a response to the above Figure 1 The embodiment of the present application provides a correction device for abnormal foreign exchange swap points, such as Figure 3 As shown, the device includes:
[0128] Foreign exchange transaction data acquisition module 31, foreign exchange transaction status determination module 32, abnormal foreign exchange swap point correction module 33;
[0129] A foreign exchange transaction data acquisition module 31 is used to acquire the current foreign exchange transaction data of the target period;
[0130] a foreign exchange transaction status determination module 32 for determining the status of the current foreign exchange transaction data according to a determination rule for abnormal foreign exchange transaction data corresponding to the target period;
[0131] The abnormal foreign exchange swap point correction module 33 is configured to, if the status of the current foreign exchange transaction data is abnormal, calculate, based on each item of previous first market data corresponding to the target term, the term parameter corresponding to the target term, and the first difference between each item of current second market data corresponding to the preset base term and the previous second market data, respectively, a second difference between each item of current first market data corresponding to the target term and the previous first market data, and add the previous foreign exchange swap point corresponding to the target term and the sum of each of the second differences to obtain the corrected current foreign exchange swap point for the target term.
[0132] In a specific application scenario, the abnormal foreign exchange swap point correction module is used to:
[0133] Calculate the second basis difference between the current first basis difference and the previous first basis difference using the basis difference calculation formula based on the previous first spot exchange rate, the previous first target currency interest rate, the term parameter corresponding to the target term, and the first basis difference between the current second basis difference and the previous second basis difference;
[0134] The second benchmark currency interest rate difference between the current first benchmark currency interest rate and the previous first benchmark currency interest rate is calculated using the benchmark currency interest rate difference calculation formula based on the previous first spot exchange rate, the previous first target currency interest rate, the term parameter corresponding to the target term, and the first benchmark currency interest rate difference between the current second benchmark currency interest rate and the previous second benchmark currency interest rate.
[0135] Calculate the second target currency interest rate difference between the current first target currency interest rate and the previous first target currency interest rate using the target currency interest rate difference calculation formula based on the previous first spot exchange rate, the previous first benchmark currency interest rate, the previous first basis difference, the previous first target currency interest rate, the term parameter corresponding to the target term, and the first target currency interest rate difference between the current second target currency interest rate and the previous second target currency interest rate;
[0136] The second spot exchange rate difference between the current first spot exchange rate and the previous first spot exchange rate is calculated using the spot exchange rate difference calculation formula based on the previous first target currency interest rate, the previous first benchmark currency interest rate, the previous first basis, the term parameter corresponding to the target term, and the first spot exchange rate difference between the current second spot exchange rate and the previous second spot exchange rate.
[0137] In a specific application scenario, the abnormal foreign exchange swap point correction module is further used to:
[0138] Summing the second basis difference, the second base currency interest rate difference, the second base currency interest rate difference, and the second spot exchange rate difference to obtain a sum of the second differences;
[0139] Obtain the status of the previous foreign exchange transaction data corresponding to the target period;
[0140] If the status of the previous foreign exchange transaction data is abnormal, obtaining a corrected status of the previous foreign exchange transaction data;
[0141] If the status of the revised previous foreign exchange transaction data is normal, summing the revised previous foreign exchange swap point and the sum of each of the second differences to obtain the revised current foreign exchange swap point for the target term;
[0142] If the status of the revised previous foreign exchange transaction data is abnormal, the previous foreign exchange swap point and the sum of each of the second differences are added together to obtain the revised current foreign exchange swap point for the target term.
[0143] In a specific application scenario, the term parameter is used to represent the ratio between the actual number of days that have passed during the term and the number of days in a year.
[0144] In a specific application scenario, after the foreign exchange transaction status determination module, the device further includes a verification module, which is used to:
[0145] If the status of the current foreign exchange transaction data is normal, obtaining the status of the previous foreign exchange transaction data corresponding to the target period;
[0146] If the status of the previous foreign exchange transaction data is normal, the previous foreign exchange swap point is obtained to verify the current foreign exchange swap point based on the previous foreign exchange swap point.
[0147] In a specific application scenario, the first market data includes a first basis, a first benchmark currency interest rate, a first target currency interest rate and a first spot exchange rate, and the second market data includes a second basis, a second benchmark currency interest rate, a second target currency interest rate and a second spot exchange rate.
[0148] In a specific application scenario, the current foreign exchange transaction data includes the current transaction price and the current transaction volume. The foreign exchange transaction status determination module is configured to:
[0149] Obtaining abnormal foreign exchange transaction data determination rules corresponding to the target period, the abnormal foreign exchange transaction data determination rules including a maximum transaction price threshold and a minimum transaction volume threshold;
[0150] If the current transaction price is greater than or equal to the maximum transaction price threshold, and / or if the current transaction volume is less than or equal to the minimum transaction volume threshold, then the status of the current foreign exchange transaction data is determined to be abnormal.
[0151] The present application provides a device for correcting abnormal foreign exchange swap points. The device first obtains current foreign exchange transaction data for a target period; secondly, determines the status of the current foreign exchange transaction data based on a determination rule for abnormal foreign exchange transaction data corresponding to the target period; and finally, if the status of the current foreign exchange transaction data is abnormal, calculates second differences between each item of current first market data corresponding to the target period and the previous first market data based on items of previous first market data corresponding to the target period, a term parameter corresponding to the target period, and first differences between each item of current second market data corresponding to a preset base period and the previous second market data. The device then adds the previous foreign exchange swap point corresponding to the target period and the sum of each of the second differences to obtain the corrected current foreign exchange swap point for the target period. Compared with the prior art, when abnormal foreign exchange transaction data is detected, the embodiment of the present application quantifies the impact of various market data on the foreign exchange swap point within a target period based on the previous foreign exchange transaction data, and obtains the corrected current foreign exchange swap point. This achieves automatic correction of abnormal foreign exchange swap points and improves the real-time nature of abnormal foreign exchange swap point correction. Furthermore, by using the fluctuation range of various market data over a one-year period as a benchmark, the complexity of swap point calculation under the coordinated influence of various market data is simplified, thereby improving the efficiency of correcting abnormal foreign exchange swap points.
[0152] According to one embodiment of the present application, a storage medium is provided, wherein the storage medium stores at least one executable instruction. The computer-executable instruction can execute the method for correcting abnormal foreign exchange swap points in any of the above method embodiments.
[0153] Based on this understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, USB flash drive, mobile hard disk, etc.), including a number of instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each implementation scenario of the present application.
[0154] Figure 4 A schematic diagram of the structure of a terminal provided according to an embodiment of the present application is shown. The specific embodiment of the present application does not limit the specific implementation of the computer device.
[0155] like Figure 4As shown, the terminal may include: a processor (processor) 402 , a communications interface (Communications Interface) 404 , a memory (memory) 406 , and a communication bus 408 .
[0156] The processor 402 , the communication interface 404 , and the memory 406 communicate with each other via a communication bus 408 .
[0157] The communication interface 404 is used to communicate with other devices such as clients or other servers.
[0158] The processor 402 is configured to execute the program 410 , and specifically, may execute the relevant steps in the embodiment of the method for correcting abnormal foreign exchange swap points.
[0159] Specifically, the program 410 may include program codes, which include computer operation instructions.
[0160] Processor 402 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application. The one or more processors included in a computer device may be processors of the same type, such as one or more CPUs, or may be processors of different types, such as one or more CPUs and one or more ASICs.
[0161] The memory 406 is used to store the program 410. The memory 406 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0162] The program 410 may be specifically configured to cause the processor 402 to perform the following operations:
[0163] Get the current foreign exchange transaction data of the target period;
[0164] determining the status of the current foreign exchange transaction data according to a rule for determining abnormal foreign exchange transaction data corresponding to the target period;
[0165] If the status of the current foreign exchange transaction data is abnormal, the second differences between each item of the current first market data and the previous first market data corresponding to the target term are calculated based on the items of previous first market data corresponding to the target term, the term parameter corresponding to the target term, and the first differences between each item of the current second market data and the previous second market data corresponding to the preset base term. The previous foreign exchange swap point corresponding to the target term and the sum of each of the second differences are added together to obtain the revised current foreign exchange swap point for the target term.
[0166] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the hardware and software resources of the physical device used to correct abnormal foreign exchange swap points, supporting the execution of the information processing program and other software and / or programs. The network communication module is used to enable communication between components within the storage medium and with other hardware and software within the physical information processing device.
[0167] Each embodiment in this specification is described in a progressive manner, with each embodiment focusing on its differences from the other embodiments. References to the same or similar parts between the various embodiments are sufficient. For system embodiments, since they largely correspond to method embodiments, their description is relatively simple. For relevant parts, references to the description of the method embodiments are sufficient.
[0168] The methods and systems of the present application may be implemented in many ways. For example, the methods and systems of the present application may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above order of steps for the method is for illustration only, and the steps of the method of the present application are not limited to the order specifically described above, unless otherwise specifically stated. In addition, in some embodiments, the present application may also be implemented as programs recorded in a recording medium, which include machine-readable instructions for implementing the methods according to the present application. Therefore, the present application also covers recording media that store programs for executing the methods according to the present application.
[0169] Obviously, those skilled in the art should understand that the modules or steps of the present application described above can be implemented using a general-purpose computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices. Alternatively, they can be implemented using program code executable by the computing device, so that they can be stored in a storage device and executed by the computing device. In some cases, the steps shown or described can be performed in a different order than herein, or they can be made into separate integrated circuit modules, or multiple modules or steps can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0170] The above description is merely a preferred embodiment of the present application and is not intended to limit the present application. Persons skilled in the art will readily appreciate that various modifications and variations are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present application shall be included within the scope of protection of the present application.
Claims
1. A method for correcting abnormal foreign exchange swap points, characterized in that: include: Get the current foreign exchange transaction data of the target period; determining the status of the current foreign exchange transaction data according to a rule for determining abnormal foreign exchange transaction data corresponding to the target period; If the status of the current foreign exchange transaction data is abnormal, the second differences between each item of the current first market data and the previous first market data corresponding to the target term are calculated based on the items of previous first market data corresponding to the target term, the term parameter corresponding to the target term, and the first differences between each item of the current second market data and the previous second market data corresponding to the preset base term. The previous foreign exchange swap point corresponding to the target term and the sum of each of the second differences are added together to obtain the revised current foreign exchange swap point for the target term.
2. The method according to claim 1, characterized in that The calculating, based on each item of previous first market data corresponding to the target term, the term parameter corresponding to the target term, and the first difference between each item of current second market data and the previous second market data corresponding to a preset base term, the second difference between each item of current first market data and the previous first market data comprises: Calculate the second basis difference between the current first basis difference and the previous first basis difference using the basis difference calculation formula based on the previous first spot exchange rate, the previous first target currency interest rate, the term parameter corresponding to the target term, and the first basis difference between the current second basis difference and the previous second basis difference; The second benchmark currency interest rate difference between the current first benchmark currency interest rate and the previous first benchmark currency interest rate is calculated using the benchmark currency interest rate difference calculation formula based on the previous first spot exchange rate, the previous first target currency interest rate, the term parameter corresponding to the target term, and the first benchmark currency interest rate difference between the current second benchmark currency interest rate and the previous second benchmark currency interest rate. Calculate the second target currency interest rate difference between the current first target currency interest rate and the previous first target currency interest rate using the target currency interest rate difference calculation formula based on the previous first spot exchange rate, the previous first benchmark currency interest rate, the previous first basis difference, the previous first target currency interest rate, the term parameter corresponding to the target term, and the first target currency interest rate difference between the current second target currency interest rate and the previous second target currency interest rate; The second spot exchange rate difference between the current first spot exchange rate and the previous first spot exchange rate is calculated using the spot exchange rate difference calculation formula based on the previous first target currency interest rate, the previous first benchmark currency interest rate, the previous first basis, the term parameter corresponding to the target term, and the first spot exchange rate difference between the current second spot exchange rate and the previous second spot exchange rate.
3. The method according to claim 2, characterized in that The process of adding the previous foreign exchange swap point corresponding to the target term and the sum of each of the second differences to obtain the current foreign exchange swap point after the target term is revised includes: Summing the second basis difference, the second base currency interest rate difference, the second base currency interest rate difference, and the second spot exchange rate difference to obtain a sum of the second differences; Obtain the status of the previous foreign exchange transaction data corresponding to the target period; If the status of the previous foreign exchange transaction data is abnormal, obtaining a corrected status of the previous foreign exchange transaction data; If the status of the revised previous foreign exchange transaction data is normal, summing the revised previous foreign exchange swap point and the sum of each of the second differences to obtain the revised current foreign exchange swap point for the target term; If the status of the revised previous foreign exchange transaction data is abnormal, the previous foreign exchange swap point and the sum of each of the second differences are added together to obtain the revised current foreign exchange swap point for the target term.
4. The method according to claim 2, characterized in that The term parameter is used to represent the ratio between the actual number of days that have passed during the term and the number of days in a year.
5. The method according to claim 1, wherein After determining the status of the current foreign exchange transaction data according to the abnormal foreign exchange transaction data determination rule corresponding to the target period, the method further includes: If the status of the current foreign exchange transaction data is normal, obtaining the status of the previous foreign exchange transaction data corresponding to the target period; If the status of the previous foreign exchange transaction data is normal, the previous foreign exchange swap point is obtained to verify the current foreign exchange swap point based on the previous foreign exchange swap point.
6. The method according to claim 1, characterized in that The first market data includes a first basis, a first benchmark currency interest rate, a first target currency interest rate and a first spot exchange rate, and the second market data includes a second basis, a second benchmark currency interest rate, a second target currency interest rate and a second spot exchange rate.
7. The method according to claim 1, characterized in that The current foreign exchange transaction data includes a current transaction price and a current transaction volume. The determining of the status of the current foreign exchange transaction data according to the abnormal foreign exchange transaction data determination rule corresponding to the target period includes: Obtaining abnormal foreign exchange transaction data determination rules corresponding to the target period, the abnormal foreign exchange transaction data determination rules including a maximum transaction price threshold and a minimum transaction volume threshold; If the current transaction price is greater than or equal to the maximum transaction price threshold, and / or if the current transaction volume is less than or equal to the minimum transaction volume threshold, then the status of the current foreign exchange transaction data is determined to be abnormal.
8. A device for correcting abnormal foreign exchange swap points, characterized in that: include: A foreign exchange transaction data acquisition module is used to obtain the current foreign exchange transaction data of the target period; a foreign exchange transaction status determination module, configured to determine the status of the current foreign exchange transaction data according to a determination rule for abnormal foreign exchange transaction data corresponding to the target period; an abnormal foreign exchange swap point correction module configured to, if the status of the current foreign exchange transaction data is abnormal, calculate, based on each item of previous first market data corresponding to the target term, the term parameter corresponding to the target term, and the first difference between each item of current second market data corresponding to a preset base term and the previous second market data, respectively, a second difference between each item of current first market data corresponding to the target term and the previous first market data; and sum the previous foreign exchange swap point corresponding to the target term and each item of the second difference to obtain the corrected current foreign exchange swap point for the target term.
9. A storage medium storing at least one executable instruction, characterized in that: The executable instructions enable the processor to execute operations corresponding to the method for correcting abnormal foreign exchange swap points according to any one of claims 1 to 7.
10. A terminal comprising: A processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, wherein the executable instruction enables the processor to perform operations corresponding to the method for correcting abnormal foreign exchange swap points according to any one of claims 1 to 7.