CN116563026A - Data aggregation method and device for foreign exchange transaction - Google Patents

Data aggregation method and device for foreign exchange transaction Download PDF

Info

Publication number
CN116563026A
CN116563026A CN202310612172.3A CN202310612172A CN116563026A CN 116563026 A CN116563026 A CN 116563026A CN 202310612172 A CN202310612172 A CN 202310612172A CN 116563026 A CN116563026 A CN 116563026A
Authority
CN
China
Prior art keywords
transaction
price
data
order information
time
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310612172.3A
Other languages
Chinese (zh)
Inventor
周魁
皇甫晓洁
张倩妮
王航
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202310612172.3A priority Critical patent/CN116563026A/en
Publication of CN116563026A publication Critical patent/CN116563026A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/90335Query processing
    • G06F16/90348Query processing by searching ordered data, e.g. alpha-numerically ordered data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/9035Filtering based on additional data, e.g. user or group profiles
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/9038Presentation of query results

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Development Economics (AREA)
  • General Business, Economics & Management (AREA)
  • Technology Law (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • Economics (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The application provides a data aggregation method and device for foreign exchange transaction, which relate to the field of data processing and can also be used in the financial field, and the data aggregation method comprises the following steps: determining the currency pair type and the transaction deadline of the foreign exchange transaction; according to the type of the currency pair and the transaction deadline, initial transaction data matched with the type of the currency pair and the transaction deadline are obtained from a multi-channel transaction market, wherein the initial transaction data comprises transaction time, transaction price and transaction amount; screening the initial transaction data according to the current time to obtain candidate transaction data, wherein the current time is the moment of acquiring the initial transaction data; and taking the transaction time, the transaction price and the transaction amount as aggregation dimensions, and performing aggregation processing on the candidate transaction data to obtain target transaction data. According to the method, the initial transaction data acquired from the multi-channel transaction market are screened and aggregated, so that high-quality target transaction data are obtained, and the rationality and the effectiveness of the transaction data are greatly improved.

Description

Data aggregation method and device for foreign exchange transaction
Technical Field
The application relates to the technical field of data processing, and can be used in the financial field, in particular to a data aggregation method and device for foreign exchange transaction.
Background
In the foreign exchange trading market among banks, the acquired market trading data are processed and analyzed to obtain a reference quotation, and quotations issued to exchanges are generated by further combining a quantitative trading algorithm. In the series of processes, the most important step is the construction of a reference market, and the quality of the reference market directly influences the calculation result of a quantitative transaction algorithm.
However, in the prior art, only a certain path of market transaction data is usually designated to be acquired, and simple operation modes such as duplication removal, filtering and the like are performed to construct a reference market. On one hand, a certain road market condition can not well reflect the situation of the whole foreign exchange trade market, on the other hand, the reference market condition obtained by simple operations such as duplicate removal and filtering often does not meet pyramid checking requirements and inverted checking requirements of foreign exchange trade on the market condition, and finally generated quotations are inaccurate and seriously interfere with the foreign exchange trade market.
Disclosure of Invention
Aiming at the problems in the prior art, the application provides a data aggregation method and device for foreign exchange transaction, which effectively improves the rationality and effectiveness of target transaction data.
In order to solve the technical problems, the application provides the following technical scheme:
In a first aspect, the present application provides a data aggregation method for a foreign exchange transaction, the method comprising:
determining the currency pair type and the transaction deadline of the foreign exchange transaction;
according to the currency pair type and the transaction deadline, initial transaction data matched with the currency pair type and the transaction deadline are obtained from a multi-channel transaction market, wherein the initial transaction data comprises transaction time, transaction price and transaction amount;
screening the initial transaction data according to the current time to obtain candidate transaction data, wherein the current time is the moment of acquiring the initial transaction data;
and taking the transaction time, the transaction price and the transaction amount as aggregation dimensions, and performing aggregation processing on the candidate transaction data to obtain target transaction data.
In some optional manners of this embodiment, the filtering the initial transaction data according to the current time to obtain candidate transaction data includes:
and removing the initial transaction data with the transaction time greater than the current time greater than a preset time threshold from the initial transaction data to obtain candidate transaction data.
In some optional manners of this embodiment, the transaction price includes a first direction transaction price and a second direction transaction price, the transaction amount includes a first direction transaction amount and a second direction transaction amount, and the aggregating the candidate transaction data with the transaction time, the transaction price, and the transaction amount as aggregate dimensions to obtain target transaction data includes:
Taking the transaction time, the first-direction transaction price and the first-direction transaction amount as aggregation dimensions, and performing first-direction aggregation operation on the candidate transaction data to obtain first-direction transaction data;
taking the transaction time, the second-direction transaction price and the second-direction transaction amount as aggregation dimensions, and performing second-direction aggregation operation on the candidate transaction data to obtain second-direction transaction data;
taking the transaction time, the first-direction transaction price, the second-direction price, the first-direction transaction amount and the second-direction transaction amount as aggregation dimensions, and performing bidirectional aggregation operation on the first-direction transaction data and the second-direction transaction data to obtain bidirectional transaction data, wherein the first-direction transaction data and the second-direction transaction data meet pyramid checking requirements, and the bidirectional transaction data meet hanging checking requirements;
and obtaining target transaction data based on the first-direction transaction data, the second-direction transaction data and the bidirectional transaction data.
In some optional manners of this embodiment, the performing a first direction aggregation operation on the candidate transaction data with the transaction time, the first direction transaction price and the first direction transaction amount as aggregation dimensions to obtain first direction transaction data includes:
Determining first direction order information in the candidate transaction data;
taking the transaction time, the first-direction transaction price and the first-direction transaction amount as aggregation dimensions, and performing first-direction aggregation operation on the first-direction order information to obtain first-direction transaction data;
wherein the first direction aggregation operation comprises:
re-ordering the first-direction order information according to the first-direction transaction price from large to small to obtain reordered first-direction order information, wherein if first-direction order information with the same transaction price exists, transaction time corresponding to the first-direction order information with the same transaction price is compared, and the first-direction order information with the transaction time farthest from the current time is removed; if the transaction time of the first-direction order information with the same transaction price is the same, comparing the first-direction transaction amount of the first-direction order information with the same transaction price, and eliminating the first-direction order information with the minimum first-direction transaction amount;
comparing the first-direction transaction amount in the reordered first-direction order information, and removing the first-direction order information, of which the first-direction transaction amount does not accord with the monotonically increasing characteristic, wherein if the first-direction order information with the same first-direction transaction amount exists, the transaction time corresponding to the first-direction order information with the same first-direction transaction amount is compared, and the first-direction order information of which the transaction time is farthest from the current time is removed.
In some optional manners of this embodiment, the performing a second direction aggregation operation on the candidate transaction data with the transaction time, the second direction transaction price, and the second direction transaction amount as aggregation dimensions to obtain second direction transaction data includes:
determining second direction order information in the candidate transaction data;
taking the transaction time, the second-direction transaction price and the second-direction transaction amount as aggregation dimensions, and performing second-direction aggregation operation on the second-direction order information to obtain second-direction transaction data;
wherein the second direction aggregation operation includes:
re-ordering the second direction order information according to the second direction transaction price from large to small to obtain reordered second direction order information, wherein if second direction order information with the same transaction price exists, transaction time corresponding to the second direction order information with the same transaction price is compared, and second direction order information with the transaction time farthest from the current time is removed; if the transaction time of the second-direction order information of the same transaction price is the same, comparing the second-direction transaction amount of the second-direction order information of the same transaction price, and eliminating the second-direction order information with the minimum second-direction transaction amount;
Comparing the second direction transaction amount in the reordered second direction order information, and removing the second direction order information of which the second direction transaction amount does not accord with the monotonically decreasing characteristic, wherein if second direction order information of the same second direction transaction amount exists, comparing the transaction time corresponding to the second direction order information of the same second direction transaction amount, and removing the second direction order information of which the transaction time is farthest from the current time.
In some optional manners of this embodiment, the aggregating step of performing a bidirectional aggregating operation on the first direction transaction data and the second direction transaction data to obtain bidirectional transaction data with the transaction time, the first direction transaction price, the second direction price, the first direction transaction amount, and the second direction transaction amount as aggregate dimensions includes:
determining an optimal first price of the first-direction transaction data from the first-direction transaction prices;
determining an optimal second price of the second direction transaction data from the second direction transaction prices;
in response to determining that the optimal first price is greater than or equal to the optimal second price, taking the transaction time, the first-direction transaction price, the second-direction transaction price, the first-direction transaction amount and the second-direction transaction amount as aggregation dimensions, and performing bidirectional aggregation operation on the first-direction transaction data and the second-direction transaction data to obtain bidirectional transaction data;
Wherein the bidirectional aggregation operation comprises:
step S1, comparing the transaction time of the first direction order information corresponding to the optimal first price and the transaction time of the second direction order information corresponding to the optimal second price, and eliminating one of the transaction time which is far away from the current time, wherein if the transaction time is the same, comparing the first direction transaction amount of the first direction order information corresponding to the optimal first price and the second direction transaction amount of the second direction order information corresponding to the optimal second price, and eliminating the smaller one;
and repeating the step S1 until the optimal first valence is determined to be less than the optimal second valence.
In a second aspect, the present application provides a data aggregation apparatus for a foreign exchange transaction, the apparatus comprising:
a determining module configured to determine a currency pair type and a transaction deadline of the foreign exchange transaction;
an acquisition module configured to acquire initial transaction data matching both the currency pair type and the transaction deadline from a multi-way transaction market according to the currency pair type and the transaction deadline, wherein the initial transaction data comprises transaction time, transaction price and transaction amount;
The screening module is configured to screen the initial transaction data according to the current time to obtain candidate transaction data, wherein the current time is the moment of acquiring the initial transaction data;
and the aggregation module is configured to aggregate the candidate transaction data by taking the transaction time, the transaction price and the transaction amount as aggregation dimensions to obtain target transaction data.
In a third aspect, the present application provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the data aggregation method for a foreign exchange transaction when the program is executed.
In a fourth aspect, the present application provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the data aggregation method for foreign exchange transactions.
In a fifth aspect, the present application provides a computer program product comprising computer programs/instructions which, when executed by a processor, implement the steps of the data aggregation method for foreign exchange transactions.
Aiming at the problems in the prior art, the application provides a data aggregation method and a data aggregation device for foreign exchange transaction, which are used for obtaining candidate transaction data by screening initial transaction data obtained from a multi-path transaction market; and the transaction time, the transaction price and the transaction amount are used as aggregation dimensions to aggregate the candidate transaction data, so that the target transaction data meeting pyramid checking requirements and reverse hanging checking requirements can be obtained, the rationality and the effectiveness of the target transaction data are greatly improved, and the market making quality is ensured.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the invention, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of one embodiment of a data aggregation method for a foreign exchange transaction according to the present application;
FIG. 2 is a flow chart of yet another embodiment of a data aggregation method for a foreign exchange transaction according to the present application;
FIG. 3 is a schematic diagram of an aggregation process of candidate transaction data according to one embodiment of the present application;
FIG. 4 is a schematic diagram of one embodiment of a data aggregation apparatus for foreign exchange transactions according to the present application;
fig. 5 is a block diagram of an electronic device for implementing a data aggregation method for foreign exchange transactions according to an embodiment of the present application.
Detailed Description
The following description of the technical solutions in the embodiments of the present application will be made clearly and completely with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
FIG. 1 shows a schematic flow chart of a data aggregation method for a foreign exchange transaction provided in one embodiment of the present application, as shown in FIG. 1, the method comprising the steps of:
step 101, determining the currency pair type and the transaction deadline of the foreign exchange transaction;
102, acquiring initial transaction data matched with the type of the currency pair and the transaction deadline from a multi-channel transaction market according to the type of the currency pair and the transaction deadline, wherein the initial transaction data comprises transaction time, transaction price and transaction amount;
step 103, screening the initial transaction data according to the current time to obtain candidate transaction data, wherein the current time is the moment of acquiring the initial transaction data;
and 104, taking the transaction time, the transaction price and the transaction amount as aggregation dimensions, and performing aggregation processing on the candidate transaction data to obtain target transaction data.
According to the data aggregation method for the foreign exchange transaction, candidate transaction data are obtained by screening initial transaction data obtained from a multi-path transaction market; and the transaction time, the transaction price and the transaction amount are used as aggregation dimensions to aggregate the candidate transaction data, so that the target transaction data meeting pyramid checking requirements and reverse hanging checking requirements can be obtained, the rationality and the effectiveness of the target transaction data are greatly improved, and the market making quality is ensured.
Each step of fig. 1 is described in detail below:
step 101, determining the currency pair type and the transaction deadline of the foreign exchange transaction.
In this embodiment, the trade data may be market quotations of the foreign exchange trade, and it should be understood that market quotations corresponding to different foreign exchange trade are different, so before quotation aggregation is performed, the currency pair type and trade term of the foreign exchange trade are determined first.
The currency pair type refers to the type of transaction pair between two different currencies in the transaction market. For example, the type of currency pair may be dollar/Renminbi, euro/Renminbi, etc., as not limited in this application. The trade term of a foreign exchange trade is generally designated by the foreign exchange market participant by self-negotiation, and is determined after the trade parties agree. For example, the trade deadline of the foreign exchange trade may be a spot trade or a long-term trade, etc., which is not limited in this application. Wherein, the spot transaction is a transaction that the two transaction parties immediately perform currency exchange after negotiating; a long-term transaction is a transaction in which both parties to the transaction are authorized to exchange money at a time in the future.
Step 102, according to the type of the currency pair and the transaction deadline, initial transaction data matched with the type of the currency pair and the transaction deadline are obtained from the multi-channel transaction market, wherein the initial transaction data comprise transaction time, transaction price and transaction amount.
In this embodiment, taking transaction data as a market for foreign exchange transaction, the currency pair type is dollar/rmb, the transaction period is spot, and obtaining an initial market matching with the currency pair type and the transaction period from a multi-channel transaction market through a market subscription module, where the initial market includes transaction time, transaction price, direction, layer number and transaction amount. Specifically, the trade time refers to quotation time, that is, the release time of the latest quotation of the financial products (such as stocks, foreign exchange, futures, etc.), for example, as shown in table 1, the quotation time is XX, month, XX, day, 14 points 56 minutes and 57 seconds; the trade price is a price of a commodity or service determined after agreement between the buyer and the seller, and as shown in table 1, in a foreign exchange trade, the price is generally an exchange rate. The trade volume refers to the total value of the trade price of the goods, services or assets involved in a certain trade multiplied by the number of trades between the buyer and the seller. As shown in Table 2, directions generally include a buy direction and a sell direction. In addition, the tier number represents a gear, and the exchange typically provides the exchange with a single or multiple market price to the exchange user and allows the user to place a market order for that price. The number of layers refers to the number of buy and sell order positions displayed in the market book. If only one bid price and one ask price are displayed on the market book, the number of layers is 1. If a plurality of single gears are displayed on the market, the higher the number of layers is, the deeper the market trading depth is.
It should be noted that, the current mainstream reference market acquisition mode designates a certain market as the reference market, but the market cannot reflect the situation of the whole market well in some cases. For example, when market information is displayed in a foreign exchange trading center, quotation is set as a reference, and the quotation floats up and down based on the price of the road, but when the mobility of the road is insufficient or market reflection is asynchronous due to any emergency, a larger price deviation occurs, so that the problem can be well avoided by constructing the reference quotation by integrating multi-way trading market quotations, wherein the multi-way trading market can be a road bank, a Deutsche bank and the like.
TABLE 1
In general, transaction data with better quality needs to satisfy:
the reverse hanging inspection requires: the bi-directional price of Buying (BID) and selling (ASK) has no back hanging, i.e. the price of the buyer is always lower than the price of the seller, otherwise, the price of the buyer is always lower than the price of the seller, and a benefit space exists.
Pyramid inspection: with the increase of the number of layers of the quotations, the price is worse, namely the buying price is lower and the selling price is higher. Meanwhile, the buying direction and the price of the seller are ranked from small to large according to the gear, and in the ranked prices, the larger the transaction amount of the buyer to the price is, the smaller the price of the buyer to the price is; for a seller to a price, the greater the seller to the transaction amount, the greater the seller to the price.
However, referring to the example of initial transaction data shown in table 1, for the selling direction, the selling price is higher and higher, and the corresponding buying amount does not satisfy the rule of larger and larger; likewise, for buying directions, buying prices are lower and lower, but buying amounts do not meet the rules of ever increasing trade.
Therefore, the initial transaction data obtained by direct subscription is low in quality, and pyramid checking or hanging-up checking is not met, so that the initial transaction data needs to be further processed.
Step 103, screening the initial transaction data according to the current time to obtain candidate transaction data, wherein the current time is the moment of acquiring the initial transaction data.
In this embodiment, the initial quotations obtained from the quotation subscription module flow into the quotation buffer pool to { trade time, trade volume: to ensure timeliness of the market, the cache pool always keeps the market in a specified time, for example, if the time threshold is set to 1 second, initial market before the current time exceeds 1 second is removed, and the initial market is taken as candidate market, and an example of the candidate market can refer to table 2.
The market quotation subscribes to the multi-channel foreign exchange transaction center, and once the quotation changes, the foreign exchange transaction market executes the action of quotation caching, namely the action of acquiring the initial transaction data.
TABLE 2
Transaction time Ask transaction amount Price of Ask Bid price Bid transaction amount Transaction time
10:00:00.123 8,000,000 6.3945
10:00:00.123 3,000,000 6.3943
10:00:00.123 4,000,000 6.3941
10:00:00.523 3,000,000 6.3940
10:00:00.523 2,000,000 6.3940
6.3940 1,000,000 10:00:00.123
6.3939 2,000,000 10:00:00.123
6.3939 3,000,000 10:00:00.123
6.3938 5,000,000 10:00:00.123
6.3937 7,000,000 10:00:00.123
And 104, taking the transaction time, the transaction price and the transaction amount as aggregation dimensions, and performing aggregation processing on the candidate transaction data to obtain target transaction data.
Still referring to the example of the candidate quotations shown in table 2, the sellers rank from small to large, and the larger the seller-to-transaction amount does not satisfy the price, the larger the transaction amount, for example, the seller-to-transaction amount 3000000 corresponding to the seller-to-price 6.3943 is smaller than the buyer-to-transaction amount 4000000 corresponding to the seller-to-price 6.3941; meanwhile, the price 6.3940 in the buying direction is equal to the price 6.3940 in the selling direction, and the buying and selling directions do not meet the requirement of hanging-upside-down inspection.
Therefore, in order to improve accuracy of the constructed quotation, in this embodiment, further processing is required to be performed on the candidate quotation, the transaction time, the transaction price and the transaction amount are taken as aggregation dimensions, and aggregation processing is performed on the candidate quotation to obtain the target quotation, so that the target quotation meets pyramid checking requirements and inverted checking requirements.
Examples of the target transaction data (target quotation) may refer to table 3, in which as the number of quotation layers increases, the buying price is lower and the selling price is higher in table 3. Meanwhile, the buying direction and the price of the seller are ranked from small to large according to the gear, and in the ranked prices, the larger the transaction amount of the buyer to the price is, the smaller the price of the buyer to the price is; for the price of the seller, the larger the transaction amount of the seller to the price is, the larger the price of the seller to the price is, and pyramid checking requirements are met; the buying direction price is lower than the selling direction price, and the reverse hanging checking requirement is met.
TABLE 3 Table 3
Transaction time Ask transaction amount Price of Ask Bid price Bid transaction amount Transaction time
10:00:00.123 8,000,000 6.3945
10:00:00.123 4,000,000 6.3941
10:00:00.523 3,000,000 6.3940
6.3939 3,000,000 10:00:00.123
6.3938 5,000,000 10:00:00.123
6.3937 7,000,000 10:00:00.123
According to the data aggregation method for the foreign exchange transaction, candidate transaction data are obtained by screening initial transaction data obtained from a multi-path transaction market; and the transaction time, the transaction price and the transaction amount are used as aggregation dimensions to aggregate the candidate transaction data, so that the target transaction data meeting pyramid checking requirements and reverse hanging checking requirements can be obtained, the rationality and the effectiveness of the target transaction data are greatly improved, and the market making quality is ensured.
With further reference to fig. 2, a further embodiment flow of a data aggregation method for a foreign exchange transaction is shown. As shown in fig. 2, the method comprises the steps of:
step 201, determining the currency pair type and the transaction deadline of the foreign exchange transaction.
In this embodiment, the description of step 201 refers to step 101, and the present application will not be described in detail herein.
Step 202, according to the type of the currency pair and the transaction deadline, initial transaction data matched with the type of the currency pair and the transaction deadline are obtained from the multi-channel transaction market, wherein the initial transaction data comprises transaction time, transaction price and transaction amount.
In this embodiment, the description of step 202 refers to step 102, and is not described in detail herein.
And 203, removing the initial transaction data with the transaction time greater than the current time greater than the preset time threshold from the initial transaction data to obtain candidate transaction data.
In this embodiment, to ensure timeliness of the market, the initial market in which the market time is greater than the preset time threshold from the current time is further removed from the initial market, where it should be understood that, for example, if the time threshold is set to 1 second, the initial market before the current time exceeds 1 second is all removed, that is, the cache pool always retains the market in the designated time, and the retained initial market is used as a candidate market.
Step 204, using the transaction time, the first-direction transaction price and the first-direction transaction amount as aggregation dimensions, and performing a first-direction aggregation operation on the candidate transaction data to obtain first-direction transaction data.
In this embodiment, the transaction time, the buyer-to-price and the buyer-to-transaction amount are used as aggregation dimensions, and the candidate quotations are subjected to a buyer-to-aggregation operation to obtain the buyer-to-quotations, for example, the buyer-to-transaction data can meet pyramid checking requirements by means of sorting, filtering and the like.
In some alternatives of this embodiment, step 204 further comprises:
step 2041, determining first direction order information in the candidate transaction data.
In this embodiment, the purchase order information in the candidate transaction data is determined, and as shown in fig. 3, the buyer price, the buyer transaction amount and the transaction time are the purchase order information in the candidate transaction data.
Step 2042, using the transaction time, the first-direction transaction price and the first-direction transaction amount as aggregation dimensions, and performing a first-direction aggregation operation on the first-direction order information to obtain first-direction transaction data.
In this embodiment, for example, the market time (i.e., transaction time), the buyer-to-price, and the buyer-to-transaction amount are taken as aggregation dimensions, and the buyer-to-aggregation operation is performed on the buyer information in fig. 3, so as to obtain the buyer-to-market (buyer-to-transaction data).
Wherein the first direction aggregation operation of an embodiment includes:
re-ordering the first-direction order information according to the first-direction transaction price from large to small to obtain reordered first-direction order information, wherein if the first-direction order information with the same transaction price exists, transaction time corresponding to the first-direction order information with the same transaction price is compared, and the first-direction order information with the transaction time farthest from the current time is removed; if the transaction time of the first-direction order information with the same transaction price is the same, comparing the first-direction transaction amount of the first-direction order information with the same transaction price, and eliminating the first-direction order information with the minimum first-direction transaction amount;
Comparing the first-direction transaction amount in the reordered first-direction order information, and removing the first-direction order information of which the first-direction transaction amount does not accord with the monotonically increasing characteristic, wherein if the first-direction order information of the same first-direction transaction amount exists, the transaction time corresponding to the first-direction order information of the same first-direction transaction amount is compared, and the first-direction order information of which the transaction time is farthest from the current time is removed.
For example, the first direction is a buying direction, i.e., the buyer-to-syndication operation includes:
reordering the buying list information from big to small according to the buying direction price to obtain reordered buying list information, wherein if buying list information with the same price exists, the market time corresponding to the buying list information with the same price is compared, and the buying list information with the market time farthest from the current time is removed; if the quotation time of the buying list information with the same price is the same, comparing the trading volume of the buying list information with the same price, and eliminating the buying list information with the smallest trading volume of the buying list information;
comparing the buying amount of the reordered buying information, and removing the buying information of which the buying amount does not accord with the monotonically increasing characteristic, wherein if the buying information of the same buying amount exists, the market time corresponding to the buying information of the same buying amount is compared, and the buying information of which the market time is farthest from the current time is removed.
Taking the order information shown in fig. 3 as an example to explain the buyer-to-aggregate operation, firstly, the buyer-to-price in the order information is satisfied from big to small, wherein two pieces of order information with price of 6.3939 exist, the market time corresponding to the two pieces of order information is also the same, and the market time is 10:00:00.123, and then the buyer-to-transaction amount of the two pieces of order information is compared, so that the order information with the buyer-to-transaction amount of 2000000 is removed. And then comparing the transaction amount of the buyer in the reordered buying bill information, and can see that the transaction amount of the buyer accords with the monotonically increasing characteristic. Finally, the buyer-to-transaction data shown in fig. 3 is obtained, which is clearly in compliance with the pyramid inspection requirements.
Step 205, using the transaction time, the second direction transaction price and the second direction transaction amount as aggregation dimensions, and performing a second direction aggregation operation on the candidate transaction data to obtain second direction transaction data.
According to the foregoing, the transaction price includes a buying direction price and a seller-to-price, and the transaction amount includes a buyer-to-transaction amount and a seller-to-transaction amount, and in this embodiment, for example, the transaction time, the seller-to-price, and the seller-to-transaction amount may be used as aggregation dimensions, and the seller-to-aggregation operation may be performed on the candidate quotations to obtain the seller-to-quotation, for example, by means of sorting, filtering, and the like, so that the seller-to-quotation meets the pyramid checking requirement.
In some alternatives of this embodiment, step 205 further comprises:
step 2051, determining second direction order information in the candidate transaction data.
In this embodiment, for example, the sales order information in the candidate quotation is determined, and as shown in fig. 3, the seller-to-price, the seller-to-transaction amount, and the transaction time are the sales order information in the candidate quotation.
Step 2052, using the transaction time, the second-direction transaction price and the second-direction transaction amount as aggregation dimensions, and performing a second-direction aggregation operation on the second-direction order information to obtain second-direction transaction data.
In this embodiment, for example, the transaction time, the seller-to-price, and the seller-to-transaction amount can be used as aggregation dimensions, and the seller-to-aggregation operation can be performed on the seller-to-aggregation information in fig. 3, so as to obtain seller-to-transaction data.
Wherein the second direction aggregation operation of an embodiment includes:
re-ordering the second direction order information according to the second direction transaction price from large to small to obtain reordered second direction order information, wherein if second direction order information with the same transaction price exists, transaction time corresponding to the second direction order information with the same transaction price is compared, and second direction order information with the transaction time farthest from the current time is removed; if the transaction time of the second-direction order information with the same transaction price is the same, comparing the second-direction transaction amount of the second-direction order information with the same transaction price, and eliminating the second-direction order information with the minimum second-direction transaction amount;
Comparing the second-direction transaction amount in the reordered second-direction order information, and removing the second-direction order information of which the second-direction transaction amount does not accord with the monotonically decreasing characteristic, wherein if the second-direction order information of the same second-direction transaction amount exists, the transaction time corresponding to the second-direction order information of the same second-direction transaction amount is compared, and the second-direction order information of which the transaction time is farthest from the current time is removed.
For example, the second direction is the vendor direction, i.e., vendor to aggregate operations include:
re-ordering the sales information from big to small according to the price of the sales direction to obtain reordered sales information, wherein if the sales information with the same price exists, the market time corresponding to the sales information with the same price is compared, and the sales information with the market time farthest from the current time is removed; if the quotation time of the sales information with the same price is the same, comparing the sales amount of the sales information with the same price to the transaction amount, and eliminating the sales information with the minimum sales amount from the seller to the transaction amount;
comparing the seller amount of the reordered sales information with the transaction amount, and removing the sales information of which the seller amount of the sales information does not accord with the monotonically decreasing characteristic, wherein if the sales information of the same seller amount of the sales information exists, the market time corresponding to the sales information of the same seller amount of the sales information is compared, and the sales information with the market time farthest from the current time is removed.
Taking the sales information shown in fig. 3 as an example to explain the operation of selling to aggregation, firstly, the order from big to small of the selling prices of the selling information is satisfied, wherein two pieces of sales information with the price of 6.3940 exist, the market time corresponding to the two pieces of sales information is the same, and the market time is 10:00:00.523, the selling amounts of the two pieces of sales information are compared, and therefore the sales information with the selling amount of 2000000 is removed. Then, comparing the seller-to-transaction amount in the reordered sales information, it can be seen that the seller-to-transaction amount 3000000 corresponding to the seller-to-price 6.3943 does not accord with the monotonically decreasing characteristic, and the piece of sales information is removed. Finally, the seller-to-transaction data shown in fig. 3 is obtained, which is evident to meet pyramid inspection requirements.
Step 206, using the transaction time, the first-direction transaction price, the second-direction price, the first-direction transaction amount and the second-direction transaction amount as aggregation dimensions, and performing bidirectional aggregation operation on the first-direction transaction data and the second-direction transaction data to obtain bidirectional transaction data, wherein the first-direction transaction data and the second-direction transaction data meet pyramid checking requirements, and the bidirectional transaction data meet reversing checking requirements.
In this embodiment, for example, the transaction time, the buyer-to-price, the seller-to-price, the buyer-to-transaction amount, and the seller-to-transaction amount are taken as aggregation dimensions, and the buyer-to-market and the seller-to-market are subjected to a buying-selling bi-directional aggregation operation, so as to obtain a buying-selling bi-directional market.
According to the foregoing, the price includes a buying direction price and a selling direction price, and the transaction amount includes a buying direction transaction amount and a selling direction transaction amount, and in this embodiment, the market time, the buying direction price, the selling direction price, the buying direction transaction amount and the selling direction transaction amount may be used as aggregation dimensions, and the buying and selling direction aggregation operation is performed on the buying direction market and the selling direction market to obtain a buying and selling direction market, for example, the buying and selling direction market may satisfy pyramid inspection requirements through sorting, comparing, filtering, and other manners.
In some alternatives of this embodiment, step 206 further comprises:
step 2061, determining an optimal first price of the first direction transaction data from the first direction transaction prices.
For example, from the buyer to the price, an optimal buying price for the buyer to the market is determined. In this embodiment, the higher the buyer-to-price is, the better, and thus, in the buyer-to-transaction data shown in fig. 3, 6.3940, which is the highest in the buyer-to-price, is the optimal buying price for the buyer-to-transaction data.
Step 2062, determining an optimal second price of the second direction transaction data from the second direction transaction prices.
For example, from the seller to the price, an optimal selling price for the seller to the market is determined. In this embodiment, the lower the seller-to-price, the better, and thus, in the seller-to-transaction data shown in fig. 3, 6.3940, which is the lowest in the seller-to-price, is the best selling price of the seller-to-transaction data.
Step 2063, in response to determining that the optimal first price is greater than or equal to the optimal second price, using the transaction time, the first-direction transaction price, the second-direction transaction price, the first-direction transaction amount and the second-direction transaction amount as aggregation dimensions, performing bidirectional aggregation operation on the first-direction transaction data and the second-direction transaction data to obtain bidirectional transaction data.
In this embodiment, for example, in response to determining that the optimal buying price is equal to or greater than the optimal selling price, the buying and selling bi-directional aggregation operation is performed on the buying and selling bi-directional quotation by taking the quotation time, the buying and selling price, the buying and selling transaction amount, and the selling transaction amount as aggregation dimensions, so as to obtain the buying and selling bi-directional quotation.
In this embodiment, when the optimal buying price is smaller than the optimal selling price, it can be ensured that all the buyer-to-price is smaller than the seller-to-price, so that the buying and selling bi-directional quotation meets the requirement of the reverse hanging check; when the optimal buying price is smaller than or equal to the optimal selling price, the price of all buyers is smaller than the price of sellers, and at the moment, the market time, the price of the buyers, the price of the sellers, the transaction amount of the buyers and the transaction amount of the sellers are required to be used as aggregation dimensions, and buying and selling two-way aggregation operation is carried out on the buying and selling and the market of the buyers, so that buying and selling two-way market meeting the requirement of the reverse hanging inspection is obtained.
Wherein the bidirectional aggregation operation of an embodiment comprises:
step S1, comparing transaction time of first-direction order information corresponding to the optimal first price and transaction time of second-direction order information corresponding to the optimal second price, and removing one with the longer transaction time from the current time, wherein if the transaction time is the same, comparing the first-direction transaction amount of the first-direction order information corresponding to the optimal first price and the second-direction transaction amount of the second-direction order information corresponding to the optimal second price, and removing the smaller one;
and repeatedly executing the step S1 until the optimal first valence is determined to be less than the optimal second valence.
For example, bi-directional is business bi-directional, i.e., business bi-directional aggregation operations include:
step S1, comparing the market time of the buying bill information corresponding to the optimal buying price and the selling bill information corresponding to the optimal selling price, and removing one with the market time far from the current time, wherein if the market time is the same, comparing the transaction amount of the buying bill information corresponding to the optimal buying price and the transaction amount of the selling bill information corresponding to the optimal selling price, and removing the smaller one;
and repeatedly executing the step S1 until the optimal buying price is determined to be smaller than the optimal selling price.
Taking the buyer-to-transaction data (buyer-to-market) and the seller-to-transaction data (seller-to-market) shown in fig. 3 as examples to describe the buying and selling bi-directional aggregation operation, firstly, the optimal buying price of the buyer-to-market is 6.3940, the optimal selling price of the seller-to-market is 6.3940, the two are the same, and the corresponding market time of the two is compared, obviously, the market time of the optimal buying price is 10:00:00.123 more distant from the current time than the market time of the optimal selling price of 10:00:00.523, and the buying order information of the optimal buying price 6.3940 should be removed; secondly, the processed optimal buying price of the buyer to the market is changed into 6.3939 in sequence, which is smaller than the optimal selling price 6.3940; the transaction data shown in fig. 3 is finally obtained in a two-way aggregate manner, which is obvious to meet the requirement of the reverse hanging inspection.
Step 207, obtaining target transaction data based on the first-direction transaction data, the second-direction transaction data and the bidirectional transaction data.
In the present embodiment, for example, the target quotation is obtained based on the quotation of the buyer to the quotation, the quotation of the seller to the quotation and the quotation of the buying and selling both directions. And summarizing the quotation of the buyer to the quotation, the quotation of the seller to the quotation and the quotation of the buying and selling directions, and obtaining the target quotation meeting the pyramid checking requirement and the reverse hanging checking requirement.
According to the data aggregation method for the foreign exchange transaction, candidate transaction data are obtained by screening initial transaction data; and the transaction time, the transaction price and the transaction amount are used as aggregation dimensions, candidate transaction data are aggregated, so that buyer-to-transaction data and seller-to-transaction data meeting pyramid checking requirements can be obtained, buying-selling bi-directional transaction data meeting reverse checking requirements are finally obtained, high-quality target transaction data are finally obtained, the rationality and the effectiveness of the transaction data are greatly improved, the target transaction data can be used for constructing more competitive marketing strategies subsequently, and the quotation accuracy is improved.
It should be noted that, in the technical scheme of the application, the acquisition, storage, use, processing and the like of the data all conform to relevant regulations of legal regulations.
With further reference to fig. 4, as an implementation of the data aggregation method for a foreign exchange transaction of the above figures, the present disclosure provides one embodiment of a data aggregation apparatus for a foreign exchange transaction, which apparatus corresponds to the method embodiment shown in fig. 1 or fig. 2.
As shown in fig. 4, the data aggregation apparatus includes:
a determining module 301 configured to determine a currency pair type and a transaction deadline for a foreign exchange transaction;
An acquisition module 302 configured to acquire initial transaction data matching both the currency pair type and the transaction deadline from the multi-way transaction market, wherein the initial transaction data includes transaction time, transaction price, and transaction amount;
the screening module 303 is configured to screen the initial transaction data according to the current time to obtain candidate transaction data, wherein the current time is the time of acquiring the initial transaction data;
the aggregation module 304 is configured to aggregate the candidate transaction data with the transaction time, the transaction price and the transaction amount as aggregation dimensions, so as to obtain target transaction data.
In some alternatives of this embodiment, the screening module is further configured to:
and removing the initial transaction data with the transaction time greater than the preset time threshold from the initial transaction data, and obtaining candidate transaction data.
In some alternatives of this embodiment, the transaction price comprises a first direction transaction price and a second direction transaction price, the transaction amount comprises a first direction transaction amount and a second direction transaction amount, and the aggregation module comprises:
the first direction aggregation unit is configured to take the transaction time, the first direction transaction price and the first direction transaction amount as aggregation dimensions, and perform first direction aggregation operation on the candidate transaction data to obtain first direction transaction data;
The second direction aggregation unit is configured to take the transaction time, the second direction transaction price and the second direction transaction amount as aggregation dimensions, and perform second direction aggregation operation on the candidate transaction data to obtain second direction transaction data;
the bidirectional aggregation unit is configured to take the transaction time, the first-direction transaction price, the second-direction price, the first-direction transaction amount and the second-direction transaction amount as aggregation dimensions, and perform bidirectional aggregation operation on the first-direction transaction data and the second-direction transaction data to obtain bidirectional transaction data, wherein the first-direction transaction data and the second-direction transaction data meet pyramid checking requirements, and the bidirectional transaction data meet reverse hanging checking requirements;
the target transaction data generation unit is configured to obtain target transaction data based on the first-direction transaction data, the second-direction transaction data and the bidirectional transaction data.
In some alternatives of this embodiment, the first direction aggregation unit is further configured to:
determining first direction order information in the candidate transaction data;
taking the transaction time, the first-direction transaction price and the first-direction transaction amount as aggregation dimensions, and performing first-direction aggregation operation on the first-direction order information to obtain first-direction transaction data;
Wherein the first direction aggregation operation comprises:
re-ordering the first-direction order information according to the first-direction transaction price from large to small to obtain reordered first-direction order information, wherein if the first-direction order information with the same transaction price exists, transaction time corresponding to the first-direction order information with the same transaction price is compared, and the first-direction order information with the transaction time farthest from the current time is removed; if the transaction time of the first-direction order information with the same transaction price is the same, comparing the first-direction transaction amount of the first-direction order information with the same transaction price, and eliminating the first-direction order information with the minimum first-direction transaction amount;
comparing the first-direction transaction amount in the reordered first-direction order information, and removing the first-direction order information of which the first-direction transaction amount does not accord with the monotonically increasing characteristic, wherein if the first-direction order information of the same first-direction transaction amount exists, the transaction time corresponding to the first-direction order information of the same first-direction transaction amount is compared, and the first-direction order information of which the transaction time is farthest from the current time is removed.
In some alternatives of this embodiment, the second direction aggregation unit is further configured to:
Determining second direction order information in the candidate transaction data;
taking the transaction time, the second-direction transaction price and the second-direction transaction amount as aggregation dimensions, and performing second-direction aggregation operation on the second-direction order information to obtain second-direction transaction data;
wherein the second direction aggregation operation comprises:
re-ordering the second direction order information according to the second direction transaction price from large to small to obtain reordered second direction order information, wherein if second direction order information with the same transaction price exists, transaction time corresponding to the second direction order information with the same transaction price is compared, and second direction order information with the transaction time farthest from the current time is removed; if the transaction time of the second-direction order information with the same transaction price is the same, comparing the second-direction transaction amount of the second-direction order information with the same transaction price, and eliminating the second-direction order information with the minimum second-direction transaction amount;
comparing the second-direction transaction amount in the reordered second-direction order information, and removing the second-direction order information of which the second-direction transaction amount does not accord with the monotonically decreasing characteristic, wherein if the second-direction order information of the same second-direction transaction amount exists, the transaction time corresponding to the second-direction order information of the same second-direction transaction amount is compared, and the second-direction order information of which the transaction time is farthest from the current time is removed.
In some alternatives of this embodiment, the bidirectional aggregation unit is further configured to:
determining an optimal first price of the first-direction transaction data from the first-direction transaction prices;
determining an optimal second price of the second direction transaction data from the second direction transaction prices;
in response to determining that the optimal first price is greater than or equal to the optimal second price, taking the transaction time, the first-direction transaction price, the second-direction transaction price, the first-direction transaction amount and the second-direction transaction amount as aggregation dimensions, performing bidirectional aggregation operation on the first-direction transaction data and the second-direction transaction data to obtain bidirectional transaction data;
wherein the bidirectional polymerization operation comprises:
step S1, comparing transaction time of first-direction order information corresponding to the optimal first price and transaction time of second-direction order information corresponding to the optimal second price, and removing one with the longer transaction time from the current time, wherein if the transaction time is the same, comparing the first-direction transaction amount of the first-direction order information corresponding to the optimal first price and the second-direction transaction amount of the second-direction order information corresponding to the optimal second price, and removing the smaller one;
and repeatedly executing the step S1 until the optimal first valence is determined to be less than the optimal second valence.
According to embodiments of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
An electronic device, comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the data aggregation method for a foreign exchange transaction of the foregoing embodiments.
A non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the data aggregation method for a foreign exchange transaction of the foregoing embodiment.
A computer program product comprising a computer program which, when executed by a processor, implements the data aggregation method for a foreign exchange transaction of the foregoing embodiments.
Fig. 5 shows a schematic block diagram of an example electronic device 400 that may be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 5, the apparatus 400 includes a computing unit 401 that can perform various suitable actions and processes according to a computer program stored in a Read Only Memory (ROM) 402 or a computer program loaded from a storage unit 408 into a Random Access Memory (RAM) 403. In RAM 403, various programs and data required for the operation of device 400 may also be stored. The computing unit 401, ROM 402, and RAM 403 are connected to each other by a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
Various components in device 400 are connected to I/O interface 405, including: an input unit 406 such as a keyboard, a mouse, etc.; an output unit 407 such as various types of displays, speakers, and the like; a storage unit 408, such as a magnetic disk, optical disk, etc.; and a communication unit 409 such as a network card, modem, wireless communication transceiver, etc. The communication unit 409 allows the device 400 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The computing unit 401 may be a variety of general purpose and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 401 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 401 performs the various methods and processes described above, such as a data aggregation method for a foreign exchange transaction.
For example, in some embodiments, the data aggregation method for a foreign exchange transaction may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as the storage unit 408. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 400 via the ROM 402 and/or the communication unit 409. When the computer program is loaded into RAM 403 and executed by computing unit 401, one or more of the steps of the data aggregation method for a foreign exchange transaction described above may be performed. Alternatively, in other embodiments, the computing unit 401 may be configured to perform the data aggregation method for the foreign exchange transaction in any other suitable way (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server incorporating a blockchain.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel or sequentially or in a different order, provided that the desired results of the technical solutions of the present disclosure are achieved, and are not limited herein.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (10)

1. A method of aggregating data for a foreign exchange transaction, comprising:
determining the currency pair type and the transaction deadline of the foreign exchange transaction;
according to the currency pair type and the transaction deadline, initial transaction data matched with the currency pair type and the transaction deadline are obtained from a multi-channel transaction market, wherein the initial transaction data comprises transaction time, transaction price and transaction amount;
screening the initial transaction data according to the current time to obtain candidate transaction data, wherein the current time is the moment of acquiring the initial transaction data;
and taking the transaction time, the transaction price and the transaction amount as aggregation dimensions, and performing aggregation processing on the candidate transaction data to obtain target transaction data.
2. The method of claim 1, wherein the screening the initial transaction data according to the current time to obtain candidate transaction data comprises:
and removing the initial transaction data with the transaction time greater than the current time greater than a preset time threshold from the initial transaction data to obtain candidate transaction data.
3. The method of claim 1, wherein the transaction price comprises a first direction transaction price and a second direction transaction price, the transaction amount comprises a first direction transaction amount and a second direction transaction amount, wherein the aggregating the candidate transaction data with the transaction time, the transaction price, and the transaction amount as aggregate dimensions to obtain target transaction data comprises:
Taking the transaction time, the first-direction transaction price and the first-direction transaction amount as aggregation dimensions, and performing first-direction aggregation operation on the candidate transaction data to obtain first-direction transaction data;
taking the transaction time, the second-direction transaction price and the second-direction transaction amount as aggregation dimensions, and performing second-direction aggregation operation on the candidate transaction data to obtain second-direction transaction data;
taking the transaction time, the first-direction transaction price, the second-direction price, the first-direction transaction amount and the second-direction transaction amount as aggregation dimensions, and performing bidirectional aggregation operation on the first-direction transaction data and the second-direction transaction data to obtain bidirectional transaction data, wherein the first-direction transaction data and the second-direction transaction data meet pyramid checking requirements, and the bidirectional transaction data meet hanging checking requirements;
and obtaining target transaction data based on the first-direction transaction data, the second-direction transaction data and the bidirectional transaction data.
4. The method of claim 3, wherein the performing a first direction aggregation operation on the candidate transaction data using the transaction time, the first direction transaction price, and the first direction transaction amount as aggregation dimensions to obtain first direction transaction data comprises:
Determining first direction order information in the candidate transaction data;
taking the transaction time, the first-direction transaction price and the first-direction transaction amount as aggregation dimensions, and performing first-direction aggregation operation on the first-direction order information to obtain first-direction transaction data;
wherein the first direction aggregation operation comprises:
re-ordering the first-direction order information according to the first-direction transaction price from large to small to obtain reordered first-direction order information, wherein if first-direction order information with the same transaction price exists, transaction time corresponding to the first-direction order information with the same transaction price is compared, and the first-direction order information with the transaction time farthest from the current time is removed; if the transaction time of the first-direction order information with the same transaction price is the same, comparing the first-direction transaction amount of the first-direction order information with the same transaction price, and eliminating the first-direction order information with the minimum first-direction transaction amount;
comparing the first-direction transaction amount in the reordered first-direction order information, and removing the first-direction order information, of which the first-direction transaction amount does not accord with the monotonically increasing characteristic, wherein if the first-direction order information with the same first-direction transaction amount exists, the transaction time corresponding to the first-direction order information with the same first-direction transaction amount is compared, and the first-direction order information of which the transaction time is farthest from the current time is removed.
5. The method of claim 3, wherein the second direction aggregating the candidate transaction data using the transaction time, the second direction transaction price, and the second direction transaction amount as aggregate dimensions to obtain second direction transaction data comprises:
determining second direction order information in the candidate transaction data;
taking the transaction time, the second-direction transaction price and the second-direction transaction amount as aggregation dimensions, and performing second-direction aggregation operation on the second-direction order information to obtain second-direction transaction data;
wherein the second direction aggregation operation includes:
re-ordering the second direction order information according to the second direction transaction price from large to small to obtain reordered second direction order information, wherein if second direction order information with the same transaction price exists, transaction time corresponding to the second direction order information with the same transaction price is compared, and second direction order information with the transaction time farthest from the current time is removed; if the transaction time of the second-direction order information of the same transaction price is the same, comparing the second-direction transaction amount of the second-direction order information of the same transaction price, and eliminating the second-direction order information with the minimum second-direction transaction amount;
Comparing the second direction transaction amount in the reordered second direction order information, and removing the second direction order information of which the second direction transaction amount does not accord with the monotonically decreasing characteristic, wherein if second direction order information of the same second direction transaction amount exists, comparing the transaction time corresponding to the second direction order information of the same second direction transaction amount, and removing the second direction order information of which the transaction time is farthest from the current time.
6. The method of claim 3, wherein the performing a bi-directional aggregation operation on the first-directional transaction data and the second-directional transaction data with the transaction time, the first-directional transaction price, the second-directional price, the first-directional transaction amount, and the second-directional transaction amount as aggregation dimensions to obtain bi-directional transaction data comprises:
determining an optimal first price of the first-direction transaction data from the first-direction transaction prices;
determining an optimal second price of the second direction transaction data from the second direction transaction prices;
in response to determining that the optimal first price is greater than or equal to the optimal second price, taking the transaction time, the first-direction transaction price, the second-direction transaction price, the first-direction transaction amount and the second-direction transaction amount as aggregation dimensions, and performing bidirectional aggregation operation on the first-direction transaction data and the second-direction transaction data to obtain bidirectional transaction data;
Wherein the bidirectional aggregation operation comprises:
step S1, comparing the transaction time of the first direction order information corresponding to the optimal first price and the transaction time of the second direction order information corresponding to the optimal second price, and eliminating one of the transaction time which is far away from the current time, wherein if the transaction time is the same, comparing the first direction transaction amount of the first direction order information corresponding to the optimal first price and the second direction transaction amount of the second direction order information corresponding to the optimal second price, and eliminating the smaller one;
and repeating the step S1 until the optimal first valence is determined to be less than the optimal second valence.
7. A data aggregation apparatus for use in a foreign exchange transaction, comprising:
a determining module configured to determine a currency pair type and a transaction deadline of the foreign exchange transaction;
an acquisition module configured to acquire initial transaction data matching both the currency pair type and the transaction deadline from a multi-way transaction market according to the currency pair type and the transaction deadline, wherein the initial transaction data comprises transaction time, transaction price and transaction amount;
the screening module is configured to screen the initial transaction data according to the current time to obtain candidate transaction data, wherein the current time is the moment of acquiring the initial transaction data;
And the aggregation module is configured to aggregate the candidate transaction data by taking the transaction time, the transaction price and the transaction amount as aggregation dimensions to obtain target transaction data.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the data aggregation method for foreign exchange transactions of any one of claims 1 to 6 when the program is executed by the processor.
9. A computer readable storage medium having stored thereon a computer program, which when executed by a processor, implements the steps of the data aggregation method for a foreign exchange transaction according to any one of claims 1 to 6.
10. A computer program product comprising computer programs/instructions which when executed by a processor implement the steps of the data aggregation method for a foreign exchange transaction according to any one of claims 1 to 6.
CN202310612172.3A 2023-05-26 2023-05-26 Data aggregation method and device for foreign exchange transaction Pending CN116563026A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310612172.3A CN116563026A (en) 2023-05-26 2023-05-26 Data aggregation method and device for foreign exchange transaction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310612172.3A CN116563026A (en) 2023-05-26 2023-05-26 Data aggregation method and device for foreign exchange transaction

Publications (1)

Publication Number Publication Date
CN116563026A true CN116563026A (en) 2023-08-08

Family

ID=87501776

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310612172.3A Pending CN116563026A (en) 2023-05-26 2023-05-26 Data aggregation method and device for foreign exchange transaction

Country Status (1)

Country Link
CN (1) CN116563026A (en)

Similar Documents

Publication Publication Date Title
US20230214927A1 (en) System and method for processing composite trading orders
US20190156418A1 (en) System and method for processing composite trading orders at a client
EP3320443A1 (en) Modifying data structures to indicate derived relationships among entity data objects
AU2019261774A1 (en) System and method for managing trading orders with decaying reserves
US20240144376A1 (en) Liquidation cost calculation
CN116563026A (en) Data aggregation method and device for foreign exchange transaction
CA3049762C (en) Systems and methods of sequencing or combining multiple related, but different, transaction requests into a single transaction
AU2011221406B2 (en) System and method for processing composite trading orders at a client
US20110131126A1 (en) Trade Management System For Reducing Securities Positions
AU2016266008A1 (en) System and method for processing composite trading orders

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination