CN112669066A - Data processing method, device, server and computer storage medium - Google Patents

Data processing method, device, server and computer storage medium Download PDF

Info

Publication number
CN112669066A
CN112669066A CN202011549050.7A CN202011549050A CN112669066A CN 112669066 A CN112669066 A CN 112669066A CN 202011549050 A CN202011549050 A CN 202011549050A CN 112669066 A CN112669066 A CN 112669066A
Authority
CN
China
Prior art keywords
period
transaction
trading
average price
current
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
CN202011549050.7A
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.)
Hundsun Technologies Inc
Original Assignee
Hundsun Technologies Inc
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 Hundsun Technologies Inc filed Critical Hundsun Technologies Inc
Priority to CN202011549050.7A priority Critical patent/CN112669066A/en
Publication of CN112669066A publication Critical patent/CN112669066A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The application provides a data processing method, a data processing device, a server and a computer storage medium, wherein the method comprises the steps of obtaining transaction data in a first time interval before a current transaction period; calculating to obtain the N-period average price of each transaction period after the Nth transaction period in the first time interval, and performing normalization calculation by using the highest N-period average price and the lowest N-period average price to obtain the normalized N-period average price of the previous transaction period; and calculating the average price change rate by using the normalized N period average price of the current trading period and the normalized period average price of the previous trading period, and determining a trading signal according to the average price change rate of the current trading period so as to provide a basis for adjusting a future trading plan. The average price of the past trading period and the current average price change rate can reflect the change rule of the market quotation in the near future, so that the analysis result obtained by the scheme based on the information is closer to the real market quotation in the future, and the accuracy is higher.

Description

Data processing method, device, server and computer storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a data processing method, an apparatus, a server, and a computer storage medium.
Background
The automatic transaction is an automatic transaction mode which is realized by an electronic platform without manual intervention. After the user inputs the trading instruction to the electronic platform, the electronic platform can analyze the trading data by using an analysis algorithm, and make a trading plan for the user according to the analysis result, and automatically trade according to the trading plan. The transaction plan may specifically include at which times the transaction is to be performed within a certain time period, and a transaction amount of each transaction.
The current commonly used analysis algorithm generally compares the market price with the average price of the market in the day of the transaction, and adjusts the execution time of the transaction to be executed in the future period of time according to the comparison result. However, the average price of the market in the same day cannot reflect the change rule of the market quotation, so that the analysis result obtained by the existing algorithm is often not matched with the real market quotation in a future period of time, and the accuracy of the analysis result is low.
Disclosure of Invention
Based on the above drawbacks of the prior art, embodiments of the present application provide a data processing method, apparatus, server, and computer storage medium, so as to provide a more accurate analysis scheme for transaction data.
A first aspect of the present application provides a data processing method, including:
acquiring transaction data in a first time interval before a current transaction period;
calculating N-period average price of each transaction period after the Nth transaction period in the first time interval according to the transaction data, and combining the calculated N-period average price into an average price sequence in the first time interval; the first time interval is divided into M trading periods, and the N period average price of the trading periods is the average value of the market receiving price of the trading periods and the market receiving price of the first N-1 trading periods of the trading periods; n and M are preset positive integers, and M is greater than or equal to N;
determining the N period average price with the highest numerical value and the N period average price with the lowest numerical value in the average price sequence, and performing normalization processing on the N period average price of the previous trading period based on the N period average price with the highest numerical value and the N period average price with the lowest numerical value to obtain the normalized N period average price of the previous trading period; wherein the previous trading cycle refers to a previous trading cycle of the current trading cycle;
when the current trading period is finished, calculating to obtain an N period average price of the current trading period, and normalizing the N period average price of the current trading period based on the N period average price with the highest numerical value and the N period average price with the lowest numerical value to obtain a normalized N period average price of the current trading period;
calculating the average price change rate of the current trading period by using the normalized N period average price of the current trading period and the normalized period average price of the previous trading period;
determining a trading signal corresponding to the current trading period according to the average price change rate of the current trading period; and the transaction signal corresponding to the current transaction period is used as a basis for adjusting a preset transaction plan after the current transaction period.
Optionally, the calculating the average price change rate of the current trading period by using the normalized N-period average price of the current trading period and the normalized period average price of the previous trading period includes:
calculating the difference value of the normalized N period average price of the current trading period and the normalized period average price of the previous trading period to obtain an average price difference value;
and taking the ratio of the average price difference value to a preset adjusting coefficient as the average price change rate of the current trading period.
Optionally, the determining the transaction signal corresponding to the current transaction period according to the average price change rate of the current transaction period includes:
when the average price change rate of the current trading period is greater than a first multi-head threshold value, determining a trading signal corresponding to the current trading period as a multi-head trading signal;
when the transaction signal corresponding to the previous transaction period is a multi-head transaction signal and the average price change rate of the current transaction period is greater than or equal to a second multi-head threshold value, determining the transaction signal corresponding to the current transaction period as the multi-head transaction signal;
when the average price change rate of the current trading period is smaller than a first empty head threshold value, determining the trading signal corresponding to the current trading period as an empty head trading signal;
and when the transaction signal corresponding to the previous transaction period is the empty transaction signal and the average price change rate of the current transaction period is less than or equal to a second empty threshold value, determining the transaction signal corresponding to the current transaction period as the empty transaction signal.
Optionally, the process of adjusting the preset transaction plan after the current transaction period according to the transaction signal corresponding to the current transaction period includes:
when the transaction signal corresponding to the current transaction period is a multi-head transaction signal, delaying the transaction amount of a certain proportion of the first transaction to be executed, and advancing the transaction amount of a certain proportion of the second transaction to be executed to the current moment; wherein the first trade to be executed refers to a trade to be executed of a sell type contained in the trade plan, and the second trade to be executed refers to a trade to be executed of a buy type contained in the trade plan;
when the transaction signal corresponding to the current transaction period is an empty transaction signal, advancing the transaction amount of the first transaction to be executed in a certain proportion to the current time, and postponing the transaction amount of the second transaction to be executed in a certain proportion.
A second aspect of the present application provides a data processing apparatus comprising:
the acquisition unit is used for acquiring transaction data in a first time interval before the current transaction period;
the first calculation unit is used for calculating and obtaining the N-period average price of each transaction period after the Nth transaction period in the first time interval according to the transaction data, and combining the calculated N-period average price into an average price sequence in the first time interval; the first time interval is divided into M trading periods, and the N period average price of the trading periods is the average value of the market receiving price of the trading periods and the market receiving price of the first N-1 trading periods of the trading periods; n and M are preset positive integers, and M is greater than or equal to N;
the first determining unit is used for determining the N period average price with the highest numerical value and the N period average price with the lowest numerical value in the average price sequence, and normalizing the N period average price in the previous trading period based on the N period average price with the highest numerical value and the N period average price with the lowest numerical value to obtain the normalized N period average price in the previous trading period; wherein the previous trading cycle refers to a previous trading cycle of the current trading cycle;
the second calculation unit is used for calculating and obtaining the N-period average price of the current trading period when the current trading period is ended, and normalizing the N-period average price of the current trading period based on the N-period average price with the highest numerical value and the N-period average price with the lowest numerical value to obtain the normalized N-period average price of the current trading period;
the third calculation unit is used for calculating the average price change rate of the current trading period by utilizing the normalized N period average price of the current trading period and the normalized period average price of the previous trading period;
the second determining unit is used for determining a trading signal corresponding to the current trading period according to the average price change rate of the current trading period; and the transaction signal corresponding to the current transaction period is used as a basis for adjusting a preset transaction plan after the current transaction period.
Optionally, when the third calculating unit calculates the average price change rate of the current trading period by using the normalized N-period average price of the current trading period and the normalized period average price of the previous trading period, the third calculating unit is specifically configured to:
calculating the difference value of the normalized N period average price of the current trading period and the normalized period average price of the previous trading period to obtain an average price difference value;
and taking the ratio of the average price difference value to a preset adjusting coefficient as the average price change rate of the current trading period.
Optionally, when determining the transaction signal corresponding to the current transaction period according to the average price change rate of the current transaction period, the second determining unit is specifically configured to:
when the average price change rate of the current trading period is greater than a first multi-head threshold value, determining a trading signal corresponding to the current trading period as a multi-head trading signal;
when the transaction signal corresponding to the previous transaction period is a multi-head transaction signal and the average price change rate of the current transaction period is greater than or equal to a second multi-head threshold value, determining the transaction signal corresponding to the current transaction period as the multi-head transaction signal;
when the average price change rate of the current trading period is smaller than a first empty head threshold value, determining the trading signal corresponding to the current trading period as an empty head trading signal;
and when the transaction signal corresponding to the previous transaction period is the empty transaction signal and the average price change rate of the current transaction period is less than or equal to a second empty threshold value, determining the transaction signal corresponding to the current transaction period as the empty transaction signal.
Optionally, the data processing apparatus further includes an adjusting unit, configured to:
when the transaction signal corresponding to the current transaction period is a multi-head transaction signal, delaying the transaction amount of a certain proportion of the first transaction to be executed, and advancing the transaction amount of a certain proportion of the second transaction to be executed to the current moment; wherein the first trade to be executed refers to a trade to be executed of a sell type contained in the trade plan, and the second trade to be executed refers to a trade to be executed of a buy type contained in the trade plan;
when the transaction signal corresponding to the current transaction period is an empty transaction signal, advancing the transaction amount of the first transaction to be executed in a certain proportion to the current time, and postponing the transaction amount of the second transaction to be executed in a certain proportion.
A third aspect of the present application provides a server comprising a memory and a processor;
wherein the memory is for storing a computer program;
the processor is configured to execute the computer program, and in particular to implement the data processing method as provided in any of the first aspects of the present application.
A fourth aspect of the present application provides a computer storage medium for storing a computer program, which, when executed, is particularly adapted to implement the data processing method as provided in any one of the first aspects of the present application.
The application provides a data processing method, a data processing device, a server and a computer storage medium, wherein in the data processing method, transaction data in a first time interval before a current transaction period are acquired; calculating to obtain the N-period average price of each transaction period after the Nth transaction period in the first time interval, and performing normalization calculation by using the highest N-period average price and the lowest N-period average price to obtain the normalized N-period average price of the previous transaction period; the average price change rate is calculated by utilizing the average price of the normalized N period of the current trading period and the average price of the normalized period of the previous trading period, and the trading signal is determined according to the average price change rate of the current trading period, so that the basis of adjusting the preset trading plan after the current trading period is provided.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a data processing method according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a server according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the automatic transaction, a user can upload a plurality of transactions to be executed to the electronic platform, each transaction to be executed can be recorded in the electronic platform in the form of a corresponding order, and then the electronic platform can determine the planned transaction time of the transactions to be executed according to a certain transaction algorithm and execute the corresponding transaction to be executed for the user when the planned transaction time is reached.
The way for the user to upload the transaction to be executed may be that the user sets a total transaction amount for a target transaction object (referring to stocks or securities needing to be traded), for example, sets that a certain stock needs to be bought in a later period of time (for example, in a future day), the number of bought is X, the electronic platform generates a master order based on the total transaction amount, and then splits the total transaction amount into a plurality of smaller distributed transaction amounts, each distributed transaction amount corresponding to a sub-order, which is equivalent to splitting the master order into a plurality of sub-orders.
After the sub-orders are split, the electronic platform can determine the corresponding planned trading time according to the trading algorithm for each sub-order, when the planned trading time is reached, the trading corresponding to the sub-orders is executed, after the trading of all the sub-orders is completed, the trading of the main order set by the user is completed, and the method is equivalent to that the electronic platform automatically buys a certain stock with the quantity of X for the user within a period of time.
The transaction data processing scheme provided by the application is mainly used for analyzing recent transaction data so as to provide a basis for adjusting a transaction plan in a future period of time. The analysis object of the scheme is mainly the average trend of the securities trading in the current day, and the analysis result is mainly used for adjusting the trading plan determined by two algorithms, namely TWAP and VWAP. As explained in the background, the transaction plan specifically includes the transaction time of the transaction to be executed in a future period of time (i.e., the time at which the transaction to be executed is specifically performed), and the transaction amount of each transaction to be executed. For example, if the transaction to be executed is a stock transaction, the transaction plan needs to include how many shares each transaction to be executed needs to buy or sell.
That is to say, when the present scheme is applied to automatic transaction, firstly, a transaction plan within a period of time (for example, a transaction plan within three days in the future) may be preliminarily determined by using the TWAP and VWAP algorithms, then recent transaction data may be analyzed in real time during the transaction process by using the data processing method provided by the present application, and the transaction plans determined by the TWAP and VWAP algorithms may be adjusted according to the analysis result.
Twap (time Weighted Average price) algorithm, i.e. time Weighted Average price algorithm. The algorithm is mainly characterized in that trade time appointed by a user in a master order (for example, the trade time is 1 hour when the user appoints that a master order is completed within 1 hour) is uniformly divided to obtain a plurality of time nodes, then a plurality of sub orders obtained by dividing the master order are uniformly distributed to each time node, for example, 100 sub orders are obtained by dividing the master order, the trade time is divided to obtain 10 time nodes, the first time node is used as planned trade time of 10 sub orders, the second time node is used as planned trade time of the other 10 sub orders, and the like, and each time node is used as planned trade time of the 10 divided sub orders.
A vwap (volume Weighted Average price) algorithm, i.e., a volume Weighted Average price algorithm, which predicts the volume of each transaction period in a future period of time according to the volume of transactions in a past period of time, and distributes a plurality of sub-orders obtained by splitting to each transaction period for transaction according to the prediction result.
The transaction period is a period set according to actual conditions, and generally 1 minute can be set as one transaction period, and in addition, the duration of 10 seconds to 10 minutes can also be set as one transaction period according to conditions.
An embodiment of the present application provides a data processing method, please refer to fig. 1, which may include the following steps:
s101, acquiring transaction data in a first time interval before the current transaction period.
As mentioned above, the duration of the transaction period can be set according to practical situations, and generally ranges from 10s (seconds) to 10min (minutes), and in this embodiment, one minute can be set as one transaction period.
The current transaction period is a transaction period after the current time, for example, if the current time is 11:10:00 in one minute, the time from 11:10:00 to 11:11:00 is the current transaction period in step S101.
The first time interval is a specified transaction time before the current time, and the ending time is the current time, the length of the first time interval may also be flexibly set, specifically, the length may be selected from a range of 120 minutes to 960 minutes, and in this embodiment, 240 minutes before the current time may be set as the first time interval.
Financial markets typically specify which time periods on each trading day (the trading day is also specified by the market) during which financial products (including stocks, securities, etc.) may be traded, e.g., the a-stock market specifies 9: 30-11: 30, 13: 00-15: 00 may be traded, and may not be traded outside of the time periods defined by the financial market, which are the defined trade times described above.
That is, the first time zone in step S101 does not include any time other than the predetermined transaction time, and if the current time is T0, the first time zone is the latest 240 minutes of the predetermined transaction time up to the time T0. For example, the current time is 11:10:00 for day K, days K and K-1 (i.e., the previous day) are both trading days, 9: 30: 00 to 11:10:00 belongs to the specified trade time, 11:10:00 to 11: 30: 00, and 13: 00: 00-15: 00: 00 also belong to the specified transaction time, the three time periods add up to 240 minutes, i.e. for the current time (11: 10:00 of K days) the corresponding first time interval is the combination of the three time periods.
The trading data in step S101 is the trading data of the target trading object in the first time interval, and the target trading object refers to a certain stock or security that needs to be traded. Optionally, the user may specify a target trading object, and then the electronic platform determines, for the user, a future trading time to be traded (i.e., at what time the corresponding trade to be traded is executed) and a trading amount of each trade to be executed (i.e., an amount of bought or sold stock or securities), and in addition, the electronic platform may also determine stocks and securities needing to be traded in the near future as the target trading objects one by one, and then analyze past trading data of each stock and security one by using the method provided by the present application, thereby determining the trading time and trading amount of each stock and security to be traded in the future.
The transaction data of the target transaction object in the first time interval may specifically include occurrence time, transaction price, transaction quantity, and the like of each transaction for the target transaction object committed in the first time interval.
S102, calculating N-period average price of each transaction period after the Nth transaction period in the first time interval according to the transaction data, and combining the calculated N-period average price into an average price sequence in the first time interval.
The first time interval is divided into M trading periods, and the N periods of the trading periods are equalized, namely the market receiving price of the trading period and the average value of the market receiving prices of the first N-1 trading periods of the trading period; n and M are preset positive integers, and M is greater than or equal to N.
Specifically, if one minute is taken as one transaction period and the previous 240 minutes is taken as the first time interval, the first time interval may be divided into 240 transaction periods.
N is a value that can be determined according to K-line of the minutes of the last 22 trading days of the target trading object, and generally ranges from 3 to 55, or from 13 to 34, and in this embodiment, N may be set to 20.
Correspondingly, step S102 is to divide the first 240 minutes into 240 trading periods, and then calculate the N-period average price of the 20 th trading period and each trading period thereafter one by one from the 20 th trading period. The sequence of the transaction periods is determined according to the distance from the current moment, and the first transaction period is the transaction period farthest from the current moment.
For any trading period, the N period average price of the trading period refers to the average value of the closing price of the trading period and the closing prices of N-1 trading periods before the trading period. For example, the above average price of N cycles of the 20 th transaction period is an average value of 20 total receiving prices from the receiving price of the 1 st transaction period to the receiving price of the 20 th transaction period in the first time interval.
The closing price for a trading period refers to the transaction price for the last transaction that occurred at the end of the trading period.
S103, determining the N period average price with the highest numerical value and the N period average price with the lowest numerical value in the average price sequence, and executing normalization operation based on the N period average price with the highest numerical value and the N period average price with the lowest numerical value.
The normalization operation in step S103 may be performed only on the average N-period price of the previous trading period, or may be performed on the average N-period price (including the average N-period price of the previous trading period) of each trading period after the N-1 th trading period in the first time interval. The previous transaction period refers to a previous transaction period of the current transaction period, for example, if the current time is 11:10:00, the time from 11:10:00 to 11:11:00 is the current transaction period, and 11: 09: the time period from 00 to 11:10:00 is the previous transaction period.
The average valence of N period with the highest numerical value in the average valence sequence is recorded as PavgmaxThe lowest numerical value of the N-period average valence in the average valence sequence is marked as PavgminMarking the N period average price of the ith transaction period in the first time interval as PavgiThen the formula for performing the normalization operation on the N-cycle mean value of the ith transaction cycle can be expressed as:
Pnori=(Pavgi-Pavgmin)÷(Pavgmax-Pavgmin)
wherein, PnoriNamely, the normalized N-period average price is obtained after the normalization is carried out on the N-period average price of the ith transaction period. Assuming that normalization is performed for the previous transaction period, which is the 240 th transaction period in the first time interval, with reference to the aforementioned definition, Pavg will then be used240Substituting the formula into the formula to calculate the normalized N period mean value Pnor of the previous transaction period240
And S104, when the current trading period is finished, calculating to obtain the N-period average price of the current trading period.
Assuming that the time when step S101 is performed is 11:10:00 and the current transaction period is 11:10:00 to 11:11:00, step S104 is performed when 11:11:00 is reached.
Referring to the previous description of the N-period average price, the N-period average price of the current trading period is equal to the closing price of the current trading period, and the average of the closing prices of the first 19 trading periods (N is set to 20).
And S105, normalizing the N-period average price of the current trading period by using the N-period average price with the highest numerical value and the N-period average price with the lowest numerical value to obtain the normalized N-period average price of the current trading period.
The normalization of the average price in N periods of the current transaction period is consistent with the normalization operation in step S103, and details are not repeated here.
And S106, calculating to obtain the average price change rate of the current trading period by utilizing the normalized N period average price of the current trading period and the normalized period average price of the previous trading period.
Calculating the difference value of the normalized N period average price of the current trading period and the normalized period average price of the previous trading period to obtain an average price difference value;
and calculating the ratio of the average price difference value to a preset adjusting coefficient to obtain the average price change rate of the current transaction period.
The above calculation method can be expressed by the following formula:
ST=(PnorT-PnorT-1)÷Jcoe
wherein STIndicating the mean rate of change, Pnor, of the current trading periodTNormalized N period mean value, Pnor, representing the current transaction periodT-1Representing the normalized N-cycle mean value of the previous trading cycle.
JcoeThe adjustment coefficient may be 0.00416666-0.04166666. The effect of adjusting the coefficient Jcoeff is that the simulation maps the average line data of the 240-minute period before the current T period to 100: 100-100: the 1000 area, the high of the K line analysis area in the simulation securities market software and the display width of the K line of 240 cycles. The default adjustment factor in this embodiment is 0.00833333. And mapping the change rate of the average price sequence in the scheme in the current transaction period into a slope similar to the slope of the inclination direction of the average line in the K line graph of the market analysis software by adjusting the coefficient.
And S107, determining a trading signal corresponding to the current trading period according to the average price change rate of the current trading period.
The transaction signal corresponding to the current transaction period is used as a basis for adjusting a preset transaction plan after the current transaction period; the target pending trade refers to a pending trade for which the planned trade time is within a second time interval after the current trade period.
The application provides a data processing method, which comprises the steps of obtaining transaction data in a first time interval before a current transaction period; calculating to obtain the N-period average price of the Nth trading period and each trading period after the Nth trading period in the first time interval, and performing normalization calculation by utilizing the highest N-period average price and the lowest N-period average price to obtain the normalized N-period average price of the previous trading period; and calculating to obtain the average price change rate by utilizing the average price of the normalized N period of the current trading period and the average price of the normalized period of the previous trading period, and determining a trading signal according to the average price change rate of the current trading period so as to provide a basis for adjusting the trading plan after the current trading period.
On one hand, compared with the current average price of the day of the transaction, the average price of the past transaction period and the current average price change rate can reflect the change rule of the market quotation in the near future, so that compared with the existing algorithm which only analyzes according to the current average price of the day of the transaction, the analysis result obtained by the scheme based on the average price of the past transaction period and the current average price change rate is closer to the real market quotation in the future, and the accuracy is higher.
On the other hand, the scheme can determine the highest N-period average price and the lowest N-period average price by analyzing the market conditions in the first time interval before the current trading period (namely, the trading data in the first time interval), determine the position and the inclination angle of the N-period average price of the current trading period and the N-period average price of the previous trading period relative to the market conditions in the latest time period on the basis of the positions and the inclination angles (the magnitude of the average price change rate of the current trading period is equivalent to the magnitude of the inclination angle), determine whether the change trend of the current N-period average price is continuous according to the magnitude of the inclination angle, and further output a corresponding trading signal to guide a subsequent trading plan. In this way, the transaction executed by the electronic platform is more in line with the market trend in a period of time in the future (the variation trend of the average price in the N period is equivalent to the embodiment of the market trend), so that the user can obtain higher income.
The transaction signal determined in step S107 may include a multi-head transaction signal, an empty-head transaction signal, and a no-transaction signal, where the no-transaction signal is equivalent to no-transaction signal output, or the output transaction signal is empty (null).
An alternative method of determining a trade signal based on the mean change rate of the current trade period is:
the first partyThe mean price change rate of the current transaction period and a preset first multi-head threshold (Slope-up) can be setbgn) And comparing, if the average price change rate of the current trading period is greater than the first multi-head threshold value, determining that the trading signal of the current trading period is a multi-head trading signal.
If the average price change rate of the current trading period is less than or equal to the first multi-head threshold value, the average price change rate of the current trading period and a second multi-head threshold value (Slope-up) are usedend) And comparing, wherein the second multi-head threshold is smaller than the first multi-head threshold, and judging whether the transaction signal of the previous transaction period is a multi-head transaction signal.
If the transaction signal of the previous transaction period is a multi-head transaction signal and the average change rate of the current transaction period is greater than or equal to the second multi-head threshold, determining that the transaction signal of the current transaction period is a multi-head transaction signal, that is, when the average change rate of the current transaction period is greater than the second multi-head threshold, the multi-head transaction signal of the previous transaction period can be continued to the current transaction period.
When either or both of the above two conditions (i.e., the transaction signal of the previous transaction period is a multi-start transaction signal, and the average change rate of the current transaction period is greater than or equal to the second multi-start threshold value) are not satisfied, it can be determined that the current transaction period does not satisfy the condition for outputting the multi-start transaction signal.
In a second aspect, the mean rate of change of the current trading period and a preset first empty threshold (Slope _ down) may be usedbgn) And comparing, wherein the first empty threshold is smaller than the second multi-head threshold, and if the average price change rate of the current transaction period is smaller than the first empty threshold, determining the transaction signal of the current transaction period as an empty transaction signal.
If the average price change rate of the current trading period is larger than or equal to the first empty threshold, the average price change rate of the current trading period and the second empty threshold (Slope _ down) are usedend) And comparing, wherein the second empty threshold is larger than the first empty threshold and smaller than the second multi-head threshold, and simultaneously judging whether the trading signal of the previous trading period is an empty trading signal.
If the transaction signal of the previous transaction period is the empty transaction signal and the average price change rate of the current transaction period is smaller than or equal to the second empty threshold, determining that the current transaction period is the empty transaction signal, which is equivalent to that when the average price change rate of the current transaction period is smaller than or equal to the second empty threshold, the empty transaction signal of the previous transaction period can be continued to the current transaction period.
When either or both of the above two conditions (i.e., the transaction signal of the previous transaction period is the empty-head transaction signal, and the average price change rate of the current transaction period is less than or equal to the second empty-head threshold value) are not satisfied, it can be determined that the current transaction period does not satisfy the condition for outputting the empty-head transaction signal.
After the above-mentioned first and second determinations are performed, respectively, if it is finally determined that the current transaction period does not meet the condition of outputting a multi-head transaction signal nor the condition of outputting an empty-head transaction signal, it is determined that the transaction signal of the current transaction period is a no-transaction signal.
Optionally, the first multi-head threshold, the second multi-head threshold, the first empty-head threshold and the second empty-head threshold involved in the process of determining the transaction signal may be obtained from a mean line trend quantization model corresponding to the target transaction object. The price fluctuation characteristics of different stocks and securities are different, so that various stocks and securities can be divided into a plurality of categories according to the price fluctuation characteristics in the scheme, the number of the divided categories can be determined according to actual requirements, and each stock and each correct stock can be independently determined as one category under the limit condition.
After the classification, the trade average price of each class of stocks and securities in a period of time can be used for back test training, so that an average line trend quantification model corresponding to the class of stocks and securities is obtained.
In the scheme, all A-class stock in the market can be divided into 10 classes according to the fluctuation characteristic of the closing price of K-line per minute on the past 22 trading days by default, the stock quantity of each class is equal, and a corresponding equal-line trend quantification model is constructed for the stock of each class on the basis. Subsequently, when the trading data processing method provided by the application is applied to any stock, the corresponding first multi-head threshold, second multi-head threshold, first empty-head threshold and second empty-head threshold can be obtained from the average trend quantization model of the category of the stock.
In short, the present scheme may set different thresholds for different categories of stocks and securities.
As described above, the transaction signal corresponding to the current transaction period finally output by the scheme can be used as a basis for adjusting the subsequent transaction plan, and a method for adjusting the transaction plan after the current transaction period according to the transaction signal of the current transaction period is provided below.
The adjustment of the trading plan by the scheme generally only relates to the trading plan within a certain time length after the current trading period, for example, the trading plan within 3 to 15 minutes after the current trading period can be adjusted according to the trading signal of the current trading period, and the following takes the trading plan within 5 minutes after the current trading period as an example for description. In addition, the adjustment of the transaction plan by the scheme is mainly to adjust the transaction amount of a plurality of transactions to be executed in the transaction plan, which are to be executed originally, and specifically, to advance a part of the transaction amount in the transactions to be executed in the transaction plan of 5 minutes in the future to the current transaction to be executed, so that the transaction is immediately carried out, and meanwhile, the part of the transaction amount is delayed to other subsequent transactions to be executed.
When the output transaction signal is a no-transaction signal, the transaction plan after the current transaction period does not need to be adjusted, and the transaction is executed according to the original transaction plan.
When the output trading signal is an empty trading signal or a multi-head trading signal, for different types of to-be-executed trades (the to-be-executed trades can be divided into a buy type and a sell type) in a trading plan of 5 minutes in the future, the corresponding adjustment strategies are also different, and the corresponding adjustment strategies are explained below for the buy and sell two types of to-be-executed trades respectively:
for buy-type transactions to be performed:
when the trading signal of the current trading period is a multi-head trading signal, for a trading plan of 5 minutes in the future, partial trading value of all the buy-type trades to be executed (i.e. second trades to be executed) can be advanced to the current trades to be executed according to a certain advance proportion. The above adjustment ratio may be selected in the range of 20% to 100%, and the advance ratio is 50% by default in the present application.
Assuming that there are 10 buy-type transactions to be executed within 5 minutes in the future, when the transaction signal of the current transaction period is determined to be a multi-head transaction signal, 50% of the transaction amount of each of the 10 buy-type transactions to be executed can be advanced to the current planned transaction time for advancing 50% of the amount of the order therein to the current time.
For example, in the original trading plan, there are 10 buy-type trades to be executed in 5 minutes in the future, where the trading value of each trade to be executed is 20 (for example, each trade to be executed will buy 20 shares of corresponding stocks), then after determining that the trading signal of the current trading cycle is a multi-head trading signal, 50% of the trading value of each trade in the 10 trades to be executed is advanced to the current time, and the 50 trading value is advanced to the current time in total, that is, a buy transaction with a trading value of 50 is executed immediately at the current time (for example, corresponding stocks are bought immediately, and the buy number is 50), and correspondingly, the 10 buy-type trades to be executed in the original trading plan are all reduced to 10, and the 10 buy-type trades to be executed will be executed according to the trading time set in the original trading plan, but the number of corresponding stocks bought at the time of execution is 10.
Optionally, in order to avoid executing excessive transaction amount in advance, it may be set that when the multi-head transaction signal continuously appears, only when the multi-head transaction signal appears for the first time, the transaction amount of the purchase type transaction to be executed in the future transaction plan is processed in advance according to the above-mentioned manner, and when the multi-head transaction signal continuously appearing later does not execute corresponding advanced processing, until the multi-head transaction signal is interrupted, that is, when the multi-head transaction signal appears again after an empty-head transaction signal or no transaction signal appears, the advanced processing is executed again.
That is to say, under the condition that the transaction signal of the current transaction period is a multi-head transaction signal, it needs to further determine whether the transaction signal of the previous transaction period is a multi-head transaction signal, and if the transaction signal of the previous transaction period is also a multi-head transaction signal, the multi-head transaction signal of the current transaction period is not responded, that is, the processing for advancing the purchase type transaction to be executed within 5 minutes after the originally planned current transaction period is not performed. If the trading signal of the previous trading period is not a multi-head trading signal, the method is used for carrying out pre-treatment on the buying type to-be-executed trading which is executed within 5 minutes after the originally planned current trading period.
When the trading signal of the current trading period is the empty trading signal, the trading credit of the buy type to-be-executed trading in the trading plan within 5 minutes in the future can be delayed according to a certain delay proportion, the delay proportion can be selected within the range of 20% -100%, and the scheme defaults to delay the processing of 50% of the trading credit of the buy type to-be-executed trading executed in the later trading period in the original trading plan. The latter transaction period, i.e. the transaction period subsequent to the current transaction period, for example, if the current transaction period is from 11:10:00 to 11:11:00, the latter transaction period is from 11:11:00 to 11: 12: 00.
The specific delay processing method may be that, when the transaction signal output in the current transaction period is an empty transaction signal, 50% of the transaction amount of the purchase type to-be-executed transaction originally planned in the subsequent transaction period is counted into the first accumulated delay amount Entrustdelay-1, and the transaction amount of the purchase type to-be-executed transaction originally planned in the subsequent transaction period is halved. If the transaction signal of the latter transaction period is still the empty transaction signal, the above operation is repeated.
When the transaction signal output at the end of a certain transaction period is a multi-head transaction signal or no transaction signal, all transaction amount counted in the first accumulated delay entrusting quantity is immediately transacted.
For example, at the end of transaction cycle 1, an empty transaction signal is outputted, so that 50% of the transaction amount of a to-be-executed transaction (denoted as transaction 1) of a purchase type planned to be executed in the next transaction cycle, that is, transaction cycle 2, is counted as a first accumulated deferred request amount, and assuming that the original transaction amount of transaction 1 is 20, the transaction amount of adjusted transaction 1 is changed to 10, and the corresponding first accumulated deferred request amount is increased by 10.
After the transaction cycle 2 is finished, the empty transaction signal is still output, so that 50% of the transaction amount of the to-be-executed transaction (marked as transaction 2) of one purchase type planned to be executed in the next transaction cycle, namely the transaction cycle 3, is counted into the first accumulated postponed order amount, and if the original transaction amount of the transaction 2 is 30, the transaction amount of the adjusted transaction 1 is changed into 15, and the corresponding first accumulated postponed order amount is increased by 15.
At the end of transaction cycle 3, the transaction signal is output as a multi-start transaction signal, and the transaction amount accumulated in the current first accumulated deferred request amount is immediately traded, i.e. a purchase transaction with a purchase amount of 25 (including 10 accumulated at the end of transaction cycle 1 and 15 accumulated at the end of transaction cycle 2) is immediately executed.
It should be noted that the above-described postponement process for a buy-type order may be performed continuously, for example, outputting a null transaction signal at the end of the first transaction period, and then delaying the transaction to be executed of the purchase type in the next transaction period of the first transaction period, namely the second transaction period, and counting a part of transaction amount into a first accumulated delay entrusting amount, and then outputting the null transaction signal at the end of the second transaction period, the transaction to be executed of the buy type in the later transaction period of the second transaction period, i.e. the third transaction period, may be continued to be postponed, the transaction amount of the buy type to be executed transaction scheduled to be executed in the third transaction period may be counted into the first accumulated postponed order amount, and repeating the steps until a multi-head transaction signal or no transaction signal is output when a certain transaction period is ended.
Optionally, in order to avoid that the first accumulated amount of deferral entrusts is too large in the process of continuously falling down, a continuous empty time period when the continuous time of the empty transaction signal reaches the set continuous empty time period may be set, no matter what kind of transaction signal the currently output transaction signal is, transaction is immediately performed on the transaction amount accumulated in the first accumulated amount of deferral entrusts, the continuous empty time period may be set within a range of 3-30 minutes, the scheme defaults to the continuous empty time period to be 5 minutes, that is, assuming that the empty transaction signal is output at the end of each transaction period within the past 5 minutes (for example, within 5 minutes from 11:05:00 to 11:10:00), then at the end of the current transaction period (i.e. at 11:11: 00), even if the transaction signal output by the current transaction period is the empty transaction signal, the transaction amount counted in the current first accumulated amount of deferral entrusts is immediately transacted, thereby clearing the first cumulative deferral allowance.
For example, a trade signal of a blank head is output at the end of each trade period within the last 5 minutes, and when the current trade period is ended, 60 trade credits are accumulated in the first accumulated delay entrustment, so that a buy-type trade with the trade credit of 60 is immediately executed, that is, corresponding stocks or securities with the buy amount of 60 are bought, and the first accumulated delay entrustment is cleared.
For a target to-be-executed order of sell type:
when the transaction signal of the current transaction period is the empty transaction signal, for the transaction plan of the next 5 minutes, the partial transaction amount of all the selling types of the transactions to be executed (i.e. the first transactions to be executed) can be advanced to the current transaction to be executed according to a certain advance proportion. The above adjustment ratio may be selected in the range of 20% to 100%, and the advance ratio is 50% by default in the present application.
Assuming that there are 10 sell-type transactions to be executed within 5 minutes in the future, when the transaction signal of the current transaction period is determined to be the empty transaction signal, 50% of the transaction amount of each transaction in the 10 sell-type transactions to be executed can be advanced to the current planned transaction time for advancing 50% of the amount of the order therein to the current time.
For example, in the original trading plan, there are 10 trades to be executed in the sell type in 5 minutes in the future, where the trade amount of each trade to be executed is 20 (for example, each trade to be executed will sell 20 shares of corresponding stocks), then after determining that the trade signal in the current trading period is the transaction signal with the empty head, 50% of the trade amount of each trade in the 10 trades to be executed is advanced to the current time, and the total trade amount of 50 is advanced to the current time, that is, a trade with a trade amount of 50 is executed immediately at the current time (for example, the corresponding stock is sold immediately, and the sell amount is 50), and correspondingly, the trades of those 10 trades to be executed in the original trading plan are all reduced to 10, and the 10 trades to be executed in the sell type will be executed according to the trade time set in the original trading plan, but the number of corresponding stocks sold at the time of execution is 10.
Optionally, in order to avoid executing excessive transaction amount in advance, when the empty transaction signal continuously appears, the transaction amount of the transaction to be executed of the sale type in the future transaction plan is processed in advance according to the above manner only when the first empty transaction signal appears, and the corresponding advance processing is not executed for the empty transaction signal continuously appearing later until the empty transaction signal is interrupted, that is, when the empty transaction signal appears again after a multi-head transaction signal or no transaction signal appears, the advance processing is executed again.
That is to say, under the condition that the transaction signal of the current transaction period is the empty-head transaction signal, it needs to further judge whether the transaction signal of the previous transaction period is the empty-head transaction signal, and if the transaction signal of the previous transaction period is also the empty-head transaction signal, the empty-head transaction signal of the current transaction period is not responded, that is, the pre-processing is not performed on the selling type transaction to be executed which is executed within 5 minutes after the originally planned current transaction period. If the trading signal of the previous trading period is not the empty trading signal, the method is used for carrying out pre-processing on the selling type to-be-executed trading which is executed within 5 minutes after the current trading period of the original plan.
When the trading signal of the current trading period is a multi-head trading signal, the trading value limit of selling type to-be-executed trading in the trading plan within 5 minutes in the future can be delayed according to a certain delay proportion, the delay proportion can be selected within the range of 20% -100%, and the scheme defaults to delay 50% of the trading value limit of selling type to-be-executed trading executed in the later trading period in the original trading plan. The latter transaction period, i.e. the transaction period subsequent to the current transaction period, for example, if the current transaction period is from 11:10:00 to 11:11:00, the latter transaction period is from 11:11:00 to 11: 12: 00.
The specific delay processing method may be that, when the transaction signal output in the current transaction period is a multi-head transaction signal, 50% of the transaction amount of the selling type to-be-executed transaction originally planned in the next transaction period is counted into the second accumulated delay commission amount Entrustdelay-2, and the corresponding transaction amount of the selling type to-be-executed transaction originally planned in the next transaction period is halved. If the transaction signal of the latter transaction period is still a multi-head transaction signal, the above operation is repeated.
When the transaction signal output at the end of a certain transaction period is a null transaction signal or no transaction signal, all transaction amount counted in the second accumulated delay entrusting quantity is immediately transacted.
For example, at the end of transaction cycle 1, a multi-start transaction signal is outputted, so that 50% of the transaction amount of a transaction to be executed (denoted as transaction 3) of a sale type planned to be executed in the next transaction cycle, that is, transaction cycle 2, is counted as the second accumulated deferred authorization amount, and assuming that the original transaction amount of transaction 3 is 20, the transaction amount of the adjusted transaction 3 is changed to 10, and the corresponding second accumulated deferred authorization amount is increased by 10.
After the transaction cycle 2 is finished, the multi-start transaction signal is still output, so that 50% of the transaction amount of the to-be-executed transaction (marked as transaction 4) of one sale type planned to be executed in the next transaction cycle, namely the transaction cycle 3, is counted into the second accumulated delay entrusting quantity, and if the original transaction amount of the transaction 4 is 30, the transaction amount of the adjusted transaction 4 is changed into 15, and the corresponding second accumulated delay entrusting quantity is increased by 15.
When the trading cycle 3 is finished, the output trading signal is a multi-head trading signal, so that the trading value unit accumulated in the current second accumulated postponed entrusting quantity is immediately traded, namely, a selling trading with a selling value unit of 25 (including 10 accumulated at the end of the trading cycle 1 and 15 accumulated at the end of the trading cycle 2) is immediately executed.
It should be noted that the above-mentioned postponement process for sell-type orders may be performed continuously when a multi-head transaction signal occurs continuously, for example, outputting a multi-head trading signal when the first trading period is over, thus postponing the trading to be executed in the selling type in the later trading period of the first trading period, namely the second trading period, counting a part of trading amount into a second accumulated postponing entrusting amount, and then still outputting the multi-head trading signal when the second trading period is over, the transaction to be executed of the sell type in the later transaction period of the second transaction period, that is, the third transaction period, may be continued to be postponed, the transaction amount of the sell type to be executed transaction scheduled to be executed in the third transaction period may be counted into the second accumulated postponed commitment amount, and repeating the steps until a null transaction signal or no transaction signal is output when a certain transaction period is ended.
Optionally, in order to avoid that the second accumulated deferral entrusting amount is too large in the continuous rising process, a continuous multi-start time length when the continuous time of the multi-start transaction signal reaches a set continuous multi-start time length can be set, the accumulated transaction amount in the second accumulated deferral entrusting amount is immediately transacted no matter which transaction signal is currently output, the continuous multi-start time length can be set within a range of 3-30 minutes, the scheme defaults the continuous multi-start time length to be 5 minutes, that is, if a multi-start transaction signal is output at the end of each transaction period within the past 5 minutes (for example, within 5 minutes from 11:05:00 to 11:10:00), then at the end of the current transaction period (namely, at 11:11: 00), even if the transaction signal output by the current transaction period is a multi-start transaction signal, the transaction amount counted in the current second accumulated deferral entrusting amount is immediately transacted to perform transaction, thereby clearing the second cumulative deferral allowance.
For example, a multi-start trading signal is output at the end of each trading period within the last 5 minutes, and at the end of the current trading period, 60 trading credits are accumulated in the second accumulated deferred entrusting quantity, so that a sale type trading with 60 trading credits, namely a sale of corresponding stocks or securities with 60 shares, is immediately executed, and the second accumulated deferred entrusting quantity is cleared.
In summary:
when the trading signal corresponding to the current trading period is a multi-head trading signal, a certain proportion of trading value limit of the first to-be-executed trading is postponed to other to-be-executed selling trading, and a certain proportion of trading value limit of the second to-be-executed trading is advanced to the current to-be-executed buying type trading; the first to-be-executed transaction refers to a to-be-executed transaction of a selling type contained in the transaction plan, the second to-be-executed transaction refers to a to-be-executed transaction of a buying type contained in the transaction plan, and the other to-be-executed transaction refers to a to-be-executed transaction of a selling type with the transaction time after the transaction time of the first to-be-executed transaction;
when the trading signal corresponding to the current trading period is a null trading signal, advancing the trading limit of a certain proportion of the first to-be-executed trading to the current selling type trading to be executed, and postponing the trading limit of a certain proportion of the second to-be-executed trading to other to-be-executed buying trading; wherein, the other to-be-executed purchase transactions refer to purchase-type to-be-executed transactions of which the transaction time is after the second to-be-executed transaction.
With reference to fig. 2, the processing apparatus may include the following units:
the acquiring unit 201 is configured to acquire transaction data in a first time interval before a current transaction period.
The first calculating unit 202 is configured to calculate, according to the transaction data, an N-period average value of each transaction period after the nth transaction period in the first time interval, and combine each calculated N-period average value into an average value sequence in the first time interval.
The first time interval is divided into M trading periods, and the N periods of the trading periods are equalized, namely the market receiving price of the trading period and the average value of the market receiving prices of the first N-1 trading periods of the trading period; n and M are preset positive integers, and M is greater than or equal to N.
The first determining unit 203 is configured to determine the N-period average price with the highest numerical value and the N-period average price with the lowest numerical value in the average price sequence, and normalize the N-period average price of the previous trading period based on the N-period average price with the highest numerical value and the N-period average price with the lowest numerical value, to obtain a normalized N-period average price of the previous trading period.
Wherein the previous trading cycle refers to a trading cycle previous to the current trading cycle.
The second calculating unit 204 is configured to calculate and obtain an N-period average price of the current trading period when the current trading period is ended, and normalize the N-period average price of the current trading period based on the N-period average price with the highest numerical value and the N-period average price with the lowest numerical value, so as to obtain a normalized N-period average price of the current trading period.
The third calculating unit 205 is configured to calculate the average price change rate of the current trading period by using the normalized N-period average price of the current trading period and the normalized period average price of the previous trading period.
The second determining unit 206 is configured to determine a trading signal corresponding to the current trading period according to the average price change rate of the current trading period.
The transaction signal corresponding to the current transaction period is used as a basis for adjusting the transaction plan after the current transaction period.
Optionally, when the third calculating unit 205 calculates the average price change rate of the current trading period by using the normalized N-period average price of the current trading period and the normalized period average price of the previous trading period, the third calculating unit is specifically configured to:
calculating the difference value of the normalized N period average price of the current trading period and the normalized period average price of the previous trading period to obtain an average price difference value;
and calculating the ratio of the average price difference value to a preset adjusting coefficient to obtain the average price change rate of the current transaction period.
Optionally, the second determining unit 206 is specifically configured to, when determining the trading signal corresponding to the current trading period according to the average price change rate of the current trading period:
when the trading signal corresponding to the current trading period is not a multi-head trading signal and the average price change rate of the current trading period is greater than a first multi-head threshold value, determining the trading signal corresponding to the current trading period as a multi-head trading signal;
when the transaction signal corresponding to the current transaction period is a multi-head transaction signal and the average price change rate of the current transaction period is greater than or equal to a second multi-head threshold value, determining the transaction signal corresponding to the current transaction period as the multi-head transaction signal;
when the transaction signal corresponding to the current transaction period is a multi-start transaction signal and the average price change rate of the current transaction period is smaller than a second multi-start threshold value, determining the transaction signal corresponding to the current transaction period as a no transaction signal;
when the transaction signal corresponding to the current transaction period is not the empty transaction signal and the average price change rate of the current transaction period is smaller than a first empty threshold value, determining the transaction signal corresponding to the current transaction period as the empty transaction signal;
when the transaction signal corresponding to the current transaction period is the empty transaction signal and the average price change rate of the current transaction period is less than or equal to the second empty threshold value, determining the transaction signal corresponding to the current transaction period as the empty transaction signal;
and when the transaction signal corresponding to the current transaction period is the empty transaction signal and the average price change rate of the current transaction period is greater than a second empty threshold value, determining the transaction signal corresponding to the current transaction period as a no transaction signal.
Optionally, the data processing apparatus further includes an adjusting unit 207, configured to:
when the transaction signal corresponding to the current transaction period is a multi-head transaction signal, delaying the transaction amount of a certain proportion of the first transaction to be executed, and advancing the transaction amount of a certain proportion of the second transaction to be executed to the current moment; wherein the first trade to be executed refers to a trade to be executed of a sell type contained in the trade plan, and the second trade to be executed refers to a trade to be executed of a buy type contained in the trade plan;
when the transaction signal corresponding to the current transaction period is an empty transaction signal, advancing the transaction amount of the first transaction to be executed in a certain proportion to the current time, and postponing the transaction amount of the second transaction to be executed in a certain proportion.
A third aspect of the present application provides a server, as shown in fig. 3, comprising a memory and a processor;
wherein the memory 301 is used for storing computer programs;
the processor 302 is used for executing a computer program, and is specifically used for implementing the data processing method provided by any embodiment of the present application.
A fourth aspect of the present application provides a computer storage medium for storing a computer program, where the computer program is specifically configured to implement the data processing method provided in any embodiment of the present application when executed.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
It should be noted that the terms "first", "second", and the like in the present invention are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
Those skilled in the art can make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A data processing method, comprising:
acquiring transaction data in a first time interval before a current transaction period;
calculating N-period average price of each transaction period after the Nth transaction period in the first time interval according to the transaction data, and combining the calculated N-period average price into an average price sequence in the first time interval; the first time interval is divided into M trading periods, and the N period average price of the trading periods is the average value of the market receiving price of the trading periods and the market receiving price of the first N-1 trading periods of the trading periods; n and M are preset positive integers, and M is greater than or equal to N;
determining the N period average price with the highest numerical value and the N period average price with the lowest numerical value in the average price sequence, and performing normalization processing on the N period average price of the previous trading period based on the N period average price with the highest numerical value and the N period average price with the lowest numerical value to obtain the normalized N period average price of the previous trading period; wherein the previous trading cycle refers to a previous trading cycle of the current trading cycle;
when the current trading period is finished, calculating to obtain an N period average price of the current trading period, and normalizing the N period average price of the current trading period based on the N period average price with the highest numerical value and the N period average price with the lowest numerical value to obtain a normalized N period average price of the current trading period;
calculating the average price change rate of the current trading period by using the normalized N period average price of the current trading period and the normalized period average price of the previous trading period;
determining a trading signal corresponding to the current trading period according to the average price change rate of the current trading period; and the transaction signal corresponding to the current transaction period is used as a basis for adjusting a preset transaction plan after the current transaction period.
2. The data processing method of claim 1, wherein the calculating the average price change rate of the current trading period by using the normalized N-period average price of the current trading period and the normalized period average price of the previous trading period comprises:
calculating the difference value of the normalized N period average price of the current trading period and the normalized period average price of the previous trading period to obtain an average price difference value;
and taking the ratio of the average price difference value to a preset adjusting coefficient as the average price change rate of the current trading period.
3. The data processing method of claim 1, wherein the determining the transaction signal corresponding to the current transaction period according to the average price change rate of the current transaction period comprises:
when the average price change rate of the current trading period is greater than a first multi-head threshold value, determining a trading signal corresponding to the current trading period as a multi-head trading signal;
when the transaction signal corresponding to the previous transaction period is a multi-head transaction signal and the average price change rate of the current transaction period is greater than or equal to a second multi-head threshold value, determining the transaction signal corresponding to the current transaction period as the multi-head transaction signal;
when the average price change rate of the current trading period is smaller than a first empty head threshold value, determining the trading signal corresponding to the current trading period as an empty head trading signal;
and when the transaction signal corresponding to the previous transaction period is the empty transaction signal and the average price change rate of the current transaction period is less than or equal to a second empty threshold value, determining the transaction signal corresponding to the current transaction period as the empty transaction signal.
4. The data processing method of claim 3, wherein adjusting the preset transaction plan after the current transaction period according to the transaction signal corresponding to the current transaction period comprises:
when the transaction signal corresponding to the current transaction period is a multi-head transaction signal, delaying the transaction amount of a certain proportion of the first transaction to be executed, and advancing the transaction amount of a certain proportion of the second transaction to be executed to the current moment; wherein the first trade to be executed refers to a trade to be executed of a sell type contained in the trade plan, and the second trade to be executed refers to a trade to be executed of a buy type contained in the trade plan;
when the transaction signal corresponding to the current transaction period is an empty transaction signal, advancing the transaction amount of the first transaction to be executed in a certain proportion to the current time, and postponing the transaction amount of the second transaction to be executed in a certain proportion.
5. A data processing apparatus, comprising:
the acquisition unit is used for acquiring transaction data in a first time interval before the current transaction period;
the first calculation unit is used for calculating and obtaining the N-period average price of each transaction period after the Nth transaction period in the first time interval according to the transaction data, and combining the calculated N-period average price into an average price sequence in the first time interval; the first time interval is divided into M trading periods, and the N period average price of the trading periods is the average value of the market receiving price of the trading periods and the market receiving price of the first N-1 trading periods of the trading periods; n and M are preset positive integers, and M is greater than or equal to N;
the first determining unit is used for determining the N period average price with the highest numerical value and the N period average price with the lowest numerical value in the average price sequence, and normalizing the N period average price of the previous trading period based on the N period average price with the highest numerical value and the N period average price with the lowest numerical value to obtain the normalized N period average price of the previous trading period; wherein the previous trading cycle refers to a previous trading cycle of the current trading cycle;
the second calculation unit is used for calculating and obtaining the N-period average price of the current trading period when the current trading period is ended, and normalizing the N-period average price of the current trading period based on the N-period average price with the highest numerical value and the N-period average price with the lowest numerical value to obtain the normalized N-period average price of the current trading period;
the third calculation unit is used for calculating the average price change rate of the current trading period by utilizing the normalized N period average price of the current trading period and the normalized period average price of the previous trading period;
the second determining unit is used for determining a trading signal corresponding to the current trading period according to the average price change rate of the current trading period; and the transaction signal corresponding to the current transaction period is used as a basis for adjusting a preset transaction plan after the current transaction period.
6. The data processing apparatus according to claim 5, wherein the third calculating unit is specifically configured to, when calculating the average price change rate of the current trading period by using the normalized N-period average price of the current trading period and the normalized period average price of the previous trading period:
calculating the difference value of the normalized N period average price of the current trading period and the normalized period average price of the previous trading period to obtain an average price difference value;
and taking the ratio of the average price difference value to a preset adjusting coefficient as the average price change rate of the current trading period.
7. The data processing apparatus according to claim 5, wherein the second determining unit is specifically configured to, when determining the transaction signal corresponding to the current transaction period according to the average price change rate of the current transaction period:
when the average price change rate of the current trading period is greater than a first multi-head threshold value, determining a trading signal corresponding to the current trading period as a multi-head trading signal;
when the transaction signal corresponding to the previous transaction period is a multi-head transaction signal and the average price change rate of the current transaction period is greater than or equal to a second multi-head threshold value, determining the transaction signal corresponding to the current transaction period as the multi-head transaction signal;
when the average price change rate of the current trading period is smaller than a first empty head threshold value, determining the trading signal corresponding to the current trading period as an empty head trading signal;
and when the transaction signal corresponding to the previous transaction period is the empty transaction signal and the average price change rate of the current transaction period is less than or equal to a second empty threshold value, determining the transaction signal corresponding to the current transaction period as the empty transaction signal.
8. The data processing apparatus of claim 5, wherein the processing apparatus further comprises an adjustment unit configured to:
when the transaction signal corresponding to the current transaction period is a multi-head transaction signal, delaying the transaction amount of a certain proportion of the first transaction to be executed, and advancing the transaction amount of a certain proportion of the second transaction to be executed to the current moment; wherein the first trade to be executed refers to a trade to be executed of a sell type contained in the trade plan, and the second trade to be executed refers to a trade to be executed of a buy type contained in the trade plan;
when the transaction signal corresponding to the current transaction period is an empty transaction signal, advancing the transaction amount of the first transaction to be executed in a certain proportion to the current time, and postponing the transaction amount of the second transaction to be executed in a certain proportion.
9. A server, comprising a memory and a processor;
wherein the memory is for storing a computer program;
the processor is configured to execute the computer program, in particular to implement the data processing method according to any of claims 1 to 4.
10. A computer storage medium for storing a computer program which, when executed, is particularly adapted to implement the data processing method of any one of claims 1 to 4.
CN202011549050.7A 2020-12-24 2020-12-24 Data processing method, device, server and computer storage medium Pending CN112669066A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011549050.7A CN112669066A (en) 2020-12-24 2020-12-24 Data processing method, device, server and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011549050.7A CN112669066A (en) 2020-12-24 2020-12-24 Data processing method, device, server and computer storage medium

Publications (1)

Publication Number Publication Date
CN112669066A true CN112669066A (en) 2021-04-16

Family

ID=75408299

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011549050.7A Pending CN112669066A (en) 2020-12-24 2020-12-24 Data processing method, device, server and computer storage medium

Country Status (1)

Country Link
CN (1) CN112669066A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114596163A (en) * 2022-05-10 2022-06-07 中信建投证券股份有限公司 Transaction processing method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114596163A (en) * 2022-05-10 2022-06-07 中信建投证券股份有限公司 Transaction processing method and device

Similar Documents

Publication Publication Date Title
US7437326B2 (en) Securities trading simulation
KR101380468B1 (en) Method and system of pricing financial instruments
US7392211B2 (en) Analysis of financial derivatives
CN110880051A (en) Enterprise value evaluation cloud service system
US20060036542A1 (en) System and method for behavioral finance
US20120095895A1 (en) Computer-implemented systems and methods for determining liquidity cycle for tradable financial products and for determining flow-weighted average pricing for same
US20040019549A1 (en) Method for estimating whether a stock is over-valued or under-valued
JP2010118084A (en) System and method for estimating and optimizing transaction cost
JP2008505409A (en) Method and system for pricing non-standard options
JP2005505864A (en) Methods and systems for pricing financial derivatives
WO2012125858A1 (en) Computer-based method and computer program product for setting floor prices for items sold at auction
US8341066B2 (en) System and method for determining optimal investment strategy
Corlay B-spline techniques for volatility modeling
CN112734491A (en) Asset management method and device based on mark evaluation
CN112669066A (en) Data processing method, device, server and computer storage medium
US20180342011A1 (en) System and Method for Determining a Stable Quoting Quantity For Use in a Trading Strategy
US20110196809A1 (en) System and Method for Progressive Transitions Portfolio Investment Management
KR20180048140A (en) System and method for providing robo-advisor algorithm using quantitative approach to market view
CN110992189A (en) Resource data estimation method, resource data estimation device, computer equipment and storage medium
Shi et al. A new deep learning-based zero-inflated duration model for financial data irregularly spaced in time
US20130091072A1 (en) Algorithm for post-trade analysis and formulation of optimized strategy for subsequent trades
JP2009003958A (en) Method and system for price determination of financial derivative
KR100961991B1 (en) Power option pricing apparatus and method based on Heston's stochastic volatility model, and recording medium and microprocessor used thereto
JP2003331128A (en) Evaluation system for derivative security and price evaluating method for derivative security
TWI841282B (en) Investment protfolio analysis method and system

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