CN115049490A - Method and device for determining transaction risk and computer readable storage medium - Google Patents

Method and device for determining transaction risk and computer readable storage medium Download PDF

Info

Publication number
CN115049490A
CN115049490A CN202210675134.8A CN202210675134A CN115049490A CN 115049490 A CN115049490 A CN 115049490A CN 202210675134 A CN202210675134 A CN 202210675134A CN 115049490 A CN115049490 A CN 115049490A
Authority
CN
China
Prior art keywords
target
historical
transaction
data
time period
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
CN202210675134.8A
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 CN202210675134.8A priority Critical patent/CN115049490A/en
Publication of CN115049490A publication Critical patent/CN115049490A/en
Pending legal-status Critical Current

Links

Images

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
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • 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
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0201Market modelling; Market analysis; Collecting market data

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • Development Economics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Entrepreneurship & Innovation (AREA)
  • General Business, Economics & Management (AREA)
  • Data Mining & Analysis (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Computing Systems (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Technology Law (AREA)
  • Game Theory and Decision Science (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application discloses a method and a device for determining transaction risk and a computer-readable storage medium, and relates to the field of financial technology or other related fields. Wherein, the method comprises the following steps: acquiring current market data of a target commodity, wherein the current market data at least comprises a plurality of transaction data within target historical duration; determining a plurality of target characteristic values corresponding to the current market data; carrying out weighted calculation and feature conversion on a plurality of target feature values based on a pre-trained fluctuation rate prediction model to obtain the predicted fluctuation rate of the target commodity in a future preset time period; and determining the transaction risk of the target commodity according to the predicted fluctuation rate. The method and the device solve the technical problem that the prediction efficiency is low when the fluctuation rate of the commodity is predicted in the prior art.

Description

Method and device for determining transaction risk and computer readable storage medium
Technical Field
The present application relates to the field of financial technology or other related fields, and in particular, to a method and an apparatus for determining transaction risk, and a computer-readable storage medium.
Background
The fluctuation rate is the movement law of time and price in a time structure, and the fluctuation rate represents the movement trend of the price. In financial market trading, market volatility is an important factor in risk management, market panic, and the like, the presence of which represents a risk and challenge. Just because of the uncertainty of the volatility, more and more risk quantification strategies propose a reasonable estimation of the volatility.
In the prior art, when the market fluctuation rate is predicted, a large amount of manpower and material resources are needed to perform work such as characteristic engineering processing, and the whole prediction efficiency is low.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the application provides a method and a device for determining transaction risk and a computer-readable storage medium, which are used for at least solving the technical problem of low prediction efficiency when the fluctuation rate of a commodity is predicted in the prior art.
According to an aspect of an embodiment of the present application, there is provided a method for determining transaction risk, including: acquiring current market data of a target commodity, wherein the current market data at least comprises a plurality of transaction data within target historical duration; determining a plurality of target characteristic values corresponding to the current market data; carrying out weighted calculation and feature conversion on a plurality of target feature values based on a pre-trained fluctuation rate prediction model to obtain the predicted fluctuation rate of the target commodity in a future preset time period; and determining the transaction risk of the target commodity according to the predicted fluctuation rate.
Further, the method for determining transaction risk further comprises: acquiring the transaction time of each transaction data in the current market data; performing aggregation calculation on a plurality of transaction data according to transaction time to obtain at least one target data, wherein each target data corresponds to a preset time period, the preset time period comprises a plurality of transaction times, and the duration of the preset time period is less than the historical duration of the target; a plurality of target feature values are generated from the target data.
Further, the method for determining transaction risk further comprises: extracting a plurality of first characteristic values, a plurality of second characteristic values and a plurality of third characteristic values based on the target data, wherein the first characteristic values are used for representing the position holding amount of the target commodity, the plurality of transaction prices of the target commodity and the transaction amount corresponding to each transaction price, the second characteristic values are used for representing the average closing price of the target commodity in at least one target data, and the third characteristic values are used for representing the difference between different transaction prices of the target commodity in at least one target data and the difference between transaction amounts committed at different transaction prices; and respectively preprocessing the first characteristic value, the second characteristic value and the third characteristic value to obtain a plurality of target characteristic values.
Further, the method for determining transaction risk further comprises: carrying out weighted calculation and feature conversion on a plurality of target feature values based on a pre-trained fluctuation rate prediction model to obtain a plurality of historical market data of a target commodity before the predicted fluctuation rate of the target commodity in a future preset time period is obtained, wherein the historical market data at least comprises a plurality of historical transaction data in the historical time period, and the time length of the historical time period is greater than the time length of the target history; performing aggregation calculation on a plurality of pieces of historical transaction data according to the transaction time of each piece of historical transaction data to obtain at least one piece of historical target data, wherein each piece of historical target data corresponds to one sub-historical time period, and the time length of the sub-historical time period is less than the target historical time length; dividing the historical time period into a plurality of first historical time periods, wherein the duration of each first historical time period is greater than the duration of each sub-historical time period; forming historical target data in a first historical time period into a training set, and acquiring a label corresponding to each training set, wherein the label represents the market fluctuation rate of a second historical time period, the second historical time period is a time period after the first historical time period, and the market fluctuation rate is the mean square error of the logarithmic yield of the target commodity; and training according to the label and the historical target data to obtain a fluctuation rate prediction model.
Further, the method for determining transaction risk further comprises: extracting a plurality of historical characteristic values based on historical target data in each training set; preprocessing the historical characteristic value to obtain a historical target characteristic value; and obtaining a fluctuation rate prediction model according to the historical target characteristic value and the label training.
Further, the method for determining transaction risk further comprises: step 1, performing characteristic conversion on a historical target characteristic value to obtain an intermediate characteristic value; step 2, carrying out weighted calculation on the intermediate characteristic value to obtain a weighted characteristic value; step 3, updating the historical target characteristic value into a weighted characteristic value, and circularly executing the step 1 and the step 2 for preset times to obtain a plurality of intermediate characteristic values; step 4, summing the plurality of intermediate characteristic values to obtain a training characteristic value; and 5, training according to the training characteristic values and the labels to obtain a fluctuation rate prediction model.
Further, the method for determining transaction risk further comprises: training according to the training characteristic values and the labels to obtain an initial prediction model; determining an error between a prediction result of the initial prediction model and the label according to the loss function; and under the condition that the error is greater than or equal to the preset error, adjusting and training the initial prediction model until the error between the prediction result output by the adjusted prediction model and the label is less than the preset error, and determining that the adjusted prediction model is the fluctuation rate prediction model.
Further, the method for determining transaction risk further comprises: under the condition that the predicted fluctuation rate is larger than a preset threshold value, determining that the target commodity has a transaction risk in a future preset time period, and generating prompt information; and under the condition that the predicted fluctuation rate is smaller than or equal to a preset threshold value, generating a transaction instruction, wherein the transaction instruction at least comprises the transaction price and the transaction quantity of the target commodity.
According to another aspect of the embodiments of the present application, there is also provided a device for determining transaction risk, including: the system comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring current market data of a target commodity, and the current market data at least comprises a plurality of transaction data within target historical time; the system comprises a first determining module, a second determining module and a judging module, wherein the first determining module is used for determining a plurality of target characteristic values corresponding to current market data; the prediction module is used for carrying out weighted calculation and feature conversion on a plurality of target feature values based on a pre-trained fluctuation rate prediction model to obtain the predicted fluctuation rate of the target commodity in a future preset time period; and the second determining module is used for determining the transaction risk of the target commodity according to the predicted fluctuation rate.
According to another aspect of embodiments of the present application, there is also provided a computer-readable storage medium having a computer program stored therein, wherein the computer program is configured to execute the above-mentioned method for determining transaction risk when running.
According to another aspect of embodiments of the present application, there is also provided an electronic device including one or more processors and a memory for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method for determining a transaction risk described above.
In the embodiment of the application, a mode of performing weighted calculation and feature conversion on a target characteristic value by using a fluctuation rate prediction model to obtain a predicted fluctuation rate is adopted, current market data of a target commodity is firstly obtained, a plurality of target characteristic values corresponding to the current market data are determined, then the weighted calculation and feature conversion are performed on the plurality of target characteristic values based on a pre-trained fluctuation rate prediction model to obtain the predicted fluctuation rate of the target commodity in a future preset time period, and finally a transaction risk of the target commodity is determined according to the predicted fluctuation rate. The current market data at least comprises a plurality of transaction data within the target historical time length.
As can be seen from the above, the volatility prediction model in the present application can perform weighted calculation and feature conversion on a plurality of target feature values, in other words, the volatility prediction model in the present application can automatically perform a part of feature engineering processing on the target feature values. In addition, the transaction risk of the target commodity is determined according to the prediction fluctuation rate, the decision-making capability can be improved for a trader of the target commodity, and therefore the effect of assisting the trader in controlling the transaction risk of the target commodity is achieved.
Therefore, according to the technical scheme, the purpose of automatically predicting the market fluctuation rate of the target commodity is achieved, the effect of avoiding the transaction risk of the target commodity is achieved, and the technical problem of low prediction efficiency in the process of predicting the market fluctuation rate in the prior art is solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 is a flow chart of an alternative transaction risk determination method according to an embodiment of the present application;
fig. 2 is a schematic diagram of an alternative TabNet network structure according to an embodiment of the present application;
FIG. 3 is a flow chart of an alternative method of transaction risk confirmation according to an embodiment of the application;
FIG. 4 is a schematic diagram of an alternative transaction risk determination arrangement according to an embodiment of the present application;
FIG. 5 is a schematic diagram of an alternative electronic device according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all 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 application.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the accompanying drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
In addition, it should be noted that the relevant information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for presentation, analyzed data, etc.) referred to in the present disclosure are information and data authorized by the user or sufficiently authorized by each party. For example, an interface is provided between the system and the relevant user or organization, before obtaining the relevant information, an obtaining request needs to be sent to the user or organization through the interface, and after receiving the consent information fed back by the user or organization, the relevant information is obtained.
Example 1
In accordance with an embodiment of the present application, there is provided an embodiment of a method for determining transaction risk, it being noted that the steps illustrated in the flowchart of the drawings may be performed in a computer system, such as a set of computer-executable instructions, and that while a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than that presented herein.
Fig. 1 is a flowchart of an alternative transaction risk determination method according to an embodiment of the present application, as shown in fig. 1, the method includes the following steps:
and step S101, acquiring current market data of the target commodity.
In step S101, the current market data includes at least a plurality of pieces of transaction data within a target historical time period. Specifically, the target commodity may be a precious metal commodity such as gold, silver, and copper in a financial market, or a future commodity such as stock, oil, and grain, and the target commodity is not particularly limited in the present application. The target historical duration at least comprises the current time, for example, the transaction data of the target commodity in the last half hour is obtained as the current market data, wherein the last half hour is the target historical duration.
The present application will be described below taking an example in which a target product is a noble metal product. In addition, a fluctuation rate prediction apparatus may be an execution subject of the method for determining a transaction risk in the embodiment of the present application, where the fluctuation rate prediction apparatus at least includes a data acquisition apparatus, a feature engineering apparatus, a model training apparatus, and a forward prediction apparatus.
In an alternative embodiment, the data acquiring device acquires the original market data of the precious metal in the financial market by means of snapshot, wherein one piece of original market data may be a 500 ms market snapshot, the market snapshot includes all transaction data occurring within 500 ms, and the market snapshot also includes statistics of transaction information of all transaction data within 500 ms, for example, the transaction information includes at least: contract code, channel, quotation type, yesterday closing price, yesterday settlement price, and information such as the highest transaction price, the lowest transaction price, the latest transaction price, closing price, the number of deals, the amount of deals and the like in all the transaction data.
Optionally, the data acquisition device may store the acquired original market data in a big database in advance, and when the mobility prediction needs to be performed on the precious metal, the data acquisition device may access the big database, and acquire all the original market data within the target historical duration as the current market data by using the data acquisition interface.
Step S102, a plurality of target characteristic values corresponding to the current market data are determined.
In step S102, after obtaining the current market data, the data obtaining device first performs aggregation calculation on all the transaction data according to the transaction time of each transaction data in the current market data.
Specifically, each piece of original market data contains transaction data within 500 milliseconds, and the 500 millisecond time is short, so that fluctuation characteristics among different transaction data are not obvious, namely the fluctuation characteristics are not obvious enough, and if a characteristic value corresponding to the original market data is directly extracted, the later prediction accuracy is affected. Therefore, in order to avoid the problem, the data processing is performed to a certain extent on the basis of the original market data, wherein one of the most important processing procedures is to perform aggregate calculation on the transaction data.
For example, the data acquiring device may perform aggregation calculation on the original market data within 1 minute, so as to process the original market data into K-line data, where the K-line data includes at least a highest transaction price, a lowest transaction price, an opening price and a closing price for the target commodity within 1 minute. In addition, the k-line data also includes the optimal trade price and volume for the first floor in both directions of buying and selling, the weighted average price from floor 2 to floor 10, and the sum of volume from floor 2 to floor 10. In the method, the transaction price of the target commodity is divided into 10 layers, the first layer is the optimal transaction price, the second layer from the 2 nd layer to the 10 th layer is the descending suboptimal transaction price, and the optimal transaction price is determined according to the transaction direction (buying and selling direction). For example, for the seller, the optimal transaction price at the first tier is the most expensive selling price, and the selling prices at tiers 2 to 10 become lower and lower; for the buyer, the optimal transaction price at the first tier is the lowest purchase price, and the purchase prices at tiers 2 through 10 are higher and higher.
It is readily noted that the k-line data described above includes all of the transaction data in 1 minute, as compared to the original market data, which contains transaction data in 500 milliseconds. On the basis, as the transaction data are more in quantity and longer in duration, fluctuation features among data in the k-line data are more obvious, and the extracted feature values are more significant, so that the later prediction accuracy is improved.
On the basis of the obtained k-line data, the feature engineering device may extract a plurality of first feature values, a plurality of second feature values, and a plurality of third feature values based on the k-line data, where the first feature values are used to characterize a position holding amount of the target commodity, a plurality of trading prices of the target commodity, and a trading amount corresponding to each trading price, the second feature values are used to characterize an average closing price of the target commodity in at least one target data, and the third feature values are used to characterize a difference between different trading prices of the target commodity in at least one target data, and a difference between trading amounts traded at different trading prices. And finally, respectively preprocessing the first characteristic value, the second characteristic value and the third characteristic value by the characteristic engineering device to obtain a plurality of target characteristic values.
Step S103, carrying out weighted calculation and feature conversion on a plurality of target feature values based on a pre-trained fluctuation rate prediction model to obtain the predicted fluctuation rate of the target commodity in a future preset time period.
In step S103, the above-mentioned fluctuation rate prediction model may be deployed in the forward prediction apparatus, and the fluctuation rate prediction model is a table learning network TabNet model, wherein the TabNet model is a model combining the feature selection mechanism of the tree model and the advantages of the neural network. The TabNet model realizes the feature selection of instance dimensionality through feature conversion and mask generation, and simulates the behavior of a decision tree. The fluctuation rate prediction model obtained by pre-training comprises a characteristic conversion module and a weight coefficient module, wherein the fluctuation rate prediction model can perform characteristic conversion processing on an input target characteristic value through the characteristic conversion module, so that the number of parameters in the model is reduced, a better generalization effect is provided, and the fluctuation rate prediction model can perform weighted calculation on the input target characteristic value through the weighted calculation module so as to realize the function of characteristic selection.
It should be noted that the conventional research on the prediction of the fluctuation rate of the precious metal market is usually performed by a mathematical model or a prediction algorithm of machine learning. In which mathematical modeling has certain prerequisite requirements on the characteristics of the time series, for example, the time series itself is required to be stationary. However, for the time series of financial data, the market itself is unstable, so it is difficult to make the time series smooth, which results in the created mathematical model being not accurate enough, and the finally predicted fluctuation rate has a large error. The prediction algorithm of machine learning depends on a large amount of feature engineering and data mining work, and a large amount of energy is consumed in a data preprocessing stage, for example, an input feature of a machine learning model is a feature D, in order to obtain the feature D, a technician needs to extract a feature a from original data, and then sequentially process the feature a into a feature B, a feature C and a feature D, so that it is easy to notice that the overall prediction efficiency is seriously affected by the processing process of the feature B, the feature C and the feature D.
In the present application, since the fluctuation rate prediction model itself has the capability of feature conversion and weighting calculation, after the feature a (corresponding target feature value) is obtained based on data acquisition, the processing procedure for the feature B, the feature C, and the feature D is completed by the fluctuation rate prediction model itself only after the feature a is input into the fluctuation rate prediction model, so that not only are the labor cost and the time cost reduced, but also the prediction efficiency of the fluctuation rate is improved.
And step S104, determining the transaction risk of the target commodity according to the predicted fluctuation rate.
In step S104, after obtaining the predicted fluctuation rate of the future preset time period, the forward prediction apparatus may determine the transaction risk of the target commodity according to the predicted fluctuation rate and the preset threshold. Specifically, under the condition that the prediction fluctuation rate is larger than a preset threshold value, the forward prediction device determines that the target commodity has a transaction risk in a future preset time period; and under the condition that the predicted fluctuation rate is less than or equal to the preset threshold, the forward prediction device determines that the target commodity has no transaction risk in a future preset time period.
Based on the contents of the above steps S101 to S104, in the embodiment of the present application, a manner of performing weighted calculation and feature conversion on a target feature value by using a fluctuation rate prediction model to obtain a predicted fluctuation rate is adopted, first, current market data of a target commodity is obtained, a plurality of target feature values corresponding to the current market data are determined, then, weighted calculation and feature conversion are performed on the plurality of target feature values based on a fluctuation rate prediction model trained in advance to obtain a predicted fluctuation rate of the target commodity in a future preset time period, and finally, a transaction risk of the target commodity is determined according to the predicted fluctuation rate. The current market data at least comprises a plurality of transaction data within the target historical time length.
As can be seen from the above, the volatility prediction model in the present application can perform weighted calculation and feature conversion on a plurality of target feature values, in other words, the volatility prediction model in the present application can automatically perform a part of feature engineering processing on the target feature values. In addition, the transaction risk of the target commodity is determined according to the prediction fluctuation rate, so that the decision-making capability can be improved for a trader of the target commodity, and the effect of assisting the trader in controlling the transaction risk of the target commodity is achieved.
Therefore, according to the technical scheme, the purpose of automatically predicting the market fluctuation rate of the target commodity is achieved, the effect of avoiding the transaction risk of the target commodity is achieved, and the technical problem of low prediction efficiency in the process of predicting the market fluctuation rate in the prior art is solved.
In an optional embodiment, the data obtaining device obtains transaction time of each transaction data in the current market data, and then performs aggregation calculation on a plurality of transaction data according to the transaction time to obtain at least one target data, wherein each target data corresponds to a preset time period, the preset time period comprises a plurality of transaction times, and the duration of the preset time period is less than the historical duration of the target. And finally, the data acquisition device generates a plurality of target characteristic values according to the target data.
Optionally, as can be seen from the description in step S102, the target data may be the k-line data, and the prediction time period corresponding to each target data may be one minute corresponding to the k-line data. Because each transaction data has the corresponding transaction time, the data acquisition device can aggregate the transaction data within 1 minute to obtain one k-line data, and if the target historical duration is half an hour, 30 k-line data can be aggregated.
It should be noted that, in practical applications, the predicted time period may be selected according to practical situations, for example, for a target historical duration with a large time span, the preset time period may be greater than 1 minute.
In addition, because the acquisition of the current market data is influenced by batch running time, human factors and the like, bad data may exist, and the accuracy of the model is influenced, missing data needs to be identified, replaced and eliminated before the current market data is subjected to processing such as aggregation processing.
Optionally, after obtaining the plurality of target data, the feature engineering device extracts, based on the target data, a plurality of first feature values, a plurality of second feature values, and a plurality of third feature values, where the first feature values are used to characterize a position holding amount of the target commodity, a plurality of trading prices of the target commodity, and a trading amount corresponding to each trading price, the second feature values are used to characterize an average closing price of the target commodity in at least one target data, and the third feature values are used to characterize a difference between different trading prices of the target commodity in at least one target data, and a difference between trading amounts traded at different trading prices, and the feature engineering device further preprocesses the first feature values, the second feature values, and the third feature values, respectively, to obtain a plurality of target feature values.
Specifically, the feature engineering device is used for performing feature processing on the target data processed by the data acquisition device, wherein the feature engineering device mainly comprises a feature processing module and a feature transformation module. The characteristic processing module calculates market situation characteristic (corresponding to a first characteristic value), index characteristic (corresponding to a second characteristic value) and difference characteristic (corresponding to a third characteristic value) on the basis of the target data. The market characteristics comprise the position holding amount of a target commodity, an optimal purchase price, a purchase amount corresponding to the optimal purchase price, an optimal sale price, a sale amount corresponding to the optimal sale price, the weighted optimal purchase price and a corresponding quantity, a weighted suboptimal purchase price and a corresponding quantity, the index characteristics calculate the average closing price of the first n k-line data, and the difference characteristics calculate the difference between different transaction prices, the difference between transaction amounts committed at different transaction prices and the difference between transaction amounts committed at different transaction prices.
After the first feature value, the second feature value and the third feature value are obtained, the feature conversion model preprocesses the first feature value, the second feature value and the third feature value, wherein the preprocessing includes: normalization processing, data correlation analysis and variance filtering processing. Through the feature engineering device, the finally reserved feature dimension is 107 feature vectors.
In an optional embodiment, before performing weighted calculation and feature conversion on a plurality of target feature values based on a pre-trained fluctuation rate prediction model to obtain a predicted fluctuation rate of a target commodity in a future preset time period, a fluctuation rate prediction model needs to be obtained through training in advance. Specifically, the data acquisition device firstly acquires a plurality of pieces of historical market data of the target commodity, wherein the historical market data at least comprises a plurality of pieces of historical transaction data in a historical time period, and the time length of the historical time period is greater than the target historical time length. And then the data acquisition device carries out aggregation calculation on a plurality of pieces of historical transaction data according to the transaction time of each piece of historical transaction data to obtain at least one piece of historical target data, wherein each piece of historical target data corresponds to one sub-historical time period, and the time length of the sub-historical time period is less than the target historical time length.
Meanwhile, the data acquisition device divides the historical time period into a plurality of first historical time periods, wherein the duration of each first historical time period is greater than the duration of each sub-historical time period. And the data acquisition device also forms historical target data in the first historical time period into a training set and acquires a label corresponding to each training set, wherein the label represents the market fluctuation rate of a second historical time period, the second historical time period is a time period after the first historical time period, and the market fluctuation rate is the mean square error of the logarithmic yield of the target commodity. And finally, training by the model training device according to the label and the historical target data to obtain a fluctuation rate prediction model.
Optionally, in the model training phase, the data obtaining device obtains multiple pieces of historical market data of the target commodity from the big database, where the obtaining mode is the same as the obtaining mode of the current market data, and the time length of the selected historical time period is far longer than the target historical time length only for obtaining a greater amount of historical market data.
However, unlike current market data, the data acquisition device combines the k-line data according to the first historical time period to obtain a plurality of training sets, and calculates a label for each training set. For example, the historical time period is from 2 to 4 of the past, where the sub-historical time period corresponding to the k-line data is 1 minute, that is, the transaction data in each 1 minute is aggregated into one k-line data, 120 k-line data are in total in the historical time period, and the duration of the first historical time period is set to be 10 minutes, so that the historical time period may be divided into 12 first historical time periods, and 10 k-line data in each first historical time period form a training set. Taking a training set corresponding to a first history time period of 2 hours to 2 hours and 10 minutes as an example, the label corresponding to the training set may be a fluctuation rate of the market conditions during a period of 2 hours and 10 minutes to 2 hours and 20 minutes, wherein the time period of 2 hours and 10 minutes to 2 hours and 20 minutes is a second history time period. It should be noted that the length of each time period described above is only an example, and in practical applications, the length of each time period may be set by a user.
In addition, the market fluctuation rate in the present application is the mean square error of the logarithmic yield of the target commodity, assuming that the prices of contract A at t and t-1 are St and St-1, and the logarithmic yield at time t is: log (St/St-1). The mean square error is used as the fluctuation rate, namely the fluctuation rate of the market conditions under different time windows Y corresponds to the mean square error of the target commodity logarithmic yield under different time windows Y.
In addition, limited to the reality of time series data, historical market data needs to be strictly divided into training sets, validation sets and test sets according to time periods, and data sets are strictly separated.
In an optional embodiment, after obtaining the historical target data, the feature engineering apparatus extracts a plurality of historical feature values based on the historical target data in each training set, and performs preprocessing on the historical feature values to obtain the historical target feature values. And then the model training device obtains a fluctuation rate prediction model according to the historical target characteristic value and the label training.
Optionally, the process of extracting the historical characteristic value is the same as the process of extracting the first characteristic value, the second characteristic value and the third characteristic value, and the process of preprocessing the historical characteristic value is the same as the process of preprocessing the first characteristic value, the second characteristic value and the third characteristic value respectively, but the data according to the preprocessing is different, so that redundant description is not repeated here.
In an alternative embodiment, the model training device needs the following steps when training to obtain the fluctuation rate prediction model according to the historical target characteristic values and the labels:
step 1, performing characteristic conversion on a historical target characteristic value to obtain an intermediate characteristic value;
step 2, carrying out weighted calculation on the intermediate characteristic value to obtain a weighted characteristic value;
step 3, updating the historical target characteristic value into a weighted characteristic value, and circularly executing the step 1 and the step 2 for preset times to obtain a plurality of intermediate characteristic values;
and 4, step 4: summing the plurality of intermediate characteristic values to obtain a training characteristic value;
and 5: and training according to the training characteristic values and the labels to obtain a fluctuation rate prediction model.
Specifically, fig. 2 shows an optional TabNet network structure schematic diagram according to an embodiment of the present application, as shown in fig. 2, after obtaining a historical target feature value, the model training device may input the historical target feature value into the TabNet network, assuming that one historical target feature value is feature a, the feature a may be used as an input feature in fig. 2, when passing through a first feature conversion module, the feature a may be converted into feature B, the TabNet network may store the feature B on the one hand, on the other hand, input the feature B into a first weight coefficient module to obtain a weighted feature B, then the weighted feature B enters a second feature conversion module to obtain a feature C, and similarly, while being stored, the feature C may also be continuously input into a second weight coefficient module to obtain a weighted feature C, after passing through a third feature conversion module, the feature D can be obtained. The feature B, the feature C and the feature D stored by the TabNet network in the training process are all intermediate feature values.
And the full connection layer in the TabNet network can perform summation calculation on the obtained multiple intermediate characteristic values to obtain a training characteristic value.
It should be noted that there are multiple repetitive structures in the TabNet network, and the output of each structure is summed and then mapped to the final output of the model through the full connection layer. The repetitive structure contains two important components, a feature transformation module and a weight coefficient module. The feature transformation module comprises two sharing layers and two independent layers, and the sharing layers reduce the number of parameters in the model and provide better generalization effect. The output of the shared layer is input into the weight coefficient module to be responsible for feature selection, and the output of the independent layer is transmitted to the next structure continuously through the Relu function.
In an optional embodiment, in step 5 above, the TabNet network may train according to the training eigenvalue and the label to obtain an initial prediction model, and the model training device may determine an error between a prediction result of the initial prediction model and the label according to the loss function, and in a case that the error is greater than or equal to a preset error, the model training device adjusts and trains the initial prediction model until the error between the prediction result output by the adjusted prediction model and the label is less than the preset error, and determines that the adjusted prediction model is the fluctuation rate prediction model.
Specifically, the model training device adopts an L1 Loss function to calculate the error between the prediction result of the TabNet network and the label. The evaluation index for training was RMSPE root mean square percentage error. The model training apparatus determines that the fluctuation rate prediction model is generated only when an error between the prediction result output by the prediction model and the label is smaller than the error. The fluctuation rate prediction model obtained by the final training is a TabNet regressor, and the predicted fluctuation rate output by the fluctuation rate prediction model can be understood as the regression value in fig. 2.
It should be noted that, by adjusting the prediction model according to the loss function, the accuracy of the finally obtained fluctuation rate prediction model in predicting the fluctuation rate can be ensured.
In an alternative embodiment, FIG. 3 illustrates a flow chart of an alternative transaction risk confirmation method according to an embodiment of the present application. As shown in fig. 3, the data acquiring device may acquire current market data and historical market data, and perform data processing on the current market data and the historical market data to obtain target data and target historical data. And then, the characteristic engineering device extracts characteristics according to the target historical data to obtain a target historical characteristic value, and inputs the target historical characteristic value into a model training device for training to obtain a fluctuation rate prediction model. And finally, the characteristic engineering device extracts characteristics according to the target data to obtain a target characteristic value, the forward prediction device loads the trained fluctuation rate prediction model, and the input target characteristic value is processed according to the model input requirement, so that the predicted fluctuation rate is determined according to the target characteristic value and the fluctuation rate prediction model.
Under the condition that the predicted fluctuation rate is larger than a preset threshold value, the forward prediction device determines that the target commodity has a transaction risk in a future preset time period and generates prompt information; and under the condition that the predicted fluctuation rate is less than or equal to the preset threshold value, generating a transaction instruction by the forward prediction device, wherein the transaction instruction at least comprises the transaction price and the transaction quantity of the target commodity.
It should be noted that by predicting the market fluctuation rate of the target commodity in the future preset time period, the trader can be helped to find the market risk in advance, and the decision-making capability of the trader is enhanced. The technical scheme provided by the application can provide a transaction auxiliary function for the trader in the quantitative transaction process, and can give an alarm for prompting a large market fluctuation rate in the future so as to assist the trader in controlling transaction risks.
Example 2
According to an embodiment of the present application, there is also provided a transaction risk determining apparatus, where fig. 4 is a schematic diagram of an alternative transaction risk determining apparatus according to an embodiment of the present application, and as shown in fig. 4, the apparatus includes: the acquisition module 401 is configured to acquire current market data of a target commodity, where the current market data at least includes multiple pieces of transaction data within a target historical duration; a first determining module 402, configured to determine a plurality of target feature values corresponding to current market data; the prediction module 403 is configured to perform weighted calculation and feature conversion on the multiple target feature values based on a pre-trained fluctuation rate prediction model to obtain a predicted fluctuation rate of the target commodity in a future preset time period; and a second determining module 404, configured to determine the transaction risk of the target commodity according to the predicted fluctuation rate.
It should be noted that the obtaining module 401, the first determining module 402, the predicting module 403, and the second determining module 404 correspond to steps S101 to S104 in the above embodiment 1, and the four modules are the same as the corresponding steps in the implementation example and the application scenario, but are not limited to the disclosure in the above embodiment 1.
Optionally, the first determining module further includes: the device comprises a first acquisition module, an aggregation module and a generation module. The first acquisition module is used for acquiring the transaction time of each transaction data in the current market data; the aggregation module is used for performing aggregation calculation on a plurality of transaction data according to the transaction time to obtain at least one target data, wherein each target data corresponds to a preset time period, the preset time period comprises a plurality of transaction times, and the duration of the preset time period is less than the historical duration of the target; and the generating module is used for generating a plurality of target characteristic values according to the target data.
Optionally, the generating module further includes: the device comprises an extraction module and a preprocessing module. The extraction module is used for extracting a plurality of first characteristic values, a plurality of second characteristic values and a plurality of third characteristic values based on the target data, wherein the first characteristic values are used for representing the position holding amount of the target commodity, the transaction prices of the target commodity and the transaction quantity corresponding to each transaction price, the second characteristic values are used for representing the average closing price of the target commodity in at least one target data, and the third characteristic values are used for representing the difference between the different transaction prices of the target commodity in at least one target data and the difference between the transaction amounts committed at the different transaction prices; and the preprocessing module is used for respectively preprocessing the first characteristic value, the second characteristic value and the third characteristic value to obtain a plurality of target characteristic values.
Optionally, the apparatus for determining transaction risk further includes: the device comprises a second acquisition module, a first aggregation module, a division module, a label acquisition module and a training module. The second acquisition module is used for acquiring a plurality of pieces of historical market data of the target commodity, wherein the historical market data at least comprise a plurality of pieces of historical transaction data in a historical time period, and the time length of the historical time period is greater than the target historical time length; the first aggregation module is used for performing aggregation calculation on a plurality of pieces of historical transaction data according to the transaction time of each piece of historical transaction data to obtain at least one piece of historical target data, wherein each piece of historical target data corresponds to one sub-historical time period, and the duration of the sub-historical time period is less than the duration of the target historical time period; the dividing module is used for dividing the historical time period into a plurality of first historical time periods, wherein the duration of each first historical time period is greater than that of each sub-historical time period; the label acquisition module is used for forming historical target data in a first historical time period into a training set and acquiring a label corresponding to each training set, wherein the label represents the market fluctuation rate of a second historical time period, the second historical time period is a time period after the first historical time period, and the market fluctuation rate is the mean square error of the logarithmic yield of the target commodity; and the training module is used for training according to the label and the historical target data to obtain a fluctuation rate prediction model.
Optionally, the training module further includes: the device comprises a first extraction module, a first preprocessing module and a first training module. The first extraction module is used for extracting a plurality of historical characteristic values based on historical target data in each training set; the first preprocessing module is used for preprocessing the historical characteristic value to obtain a historical target characteristic value; and the first training module is used for obtaining a fluctuation rate prediction model according to the historical target characteristic value and the label training.
Optionally, the first training module further includes: the device comprises a first execution module, a second execution module, a third execution module, a fourth execution module and a fifth execution module. The first execution module is used for executing the step 1, and performing feature conversion on the historical target feature value to obtain an intermediate feature value; the second execution module is used for executing the step 2 and carrying out weighted calculation on the intermediate characteristic value to obtain a weighted characteristic value; a third execution module, configured to execute step 3, update the historical target feature value to a weighted feature value, and execute step 1 and step 2 circularly for a preset number of times to obtain a plurality of intermediate feature values; a fourth execution module, configured to execute step 4, sum the multiple intermediate feature values to obtain a training feature value; and a fifth execution module, configured to execute step 5, and obtain a fluctuation rate prediction model according to the training eigenvalue and the label training.
Optionally, the fifth executing module further includes: the device comprises a second training module, a third determining module and an adjusting module. The second training module is used for obtaining an initial prediction model according to training of the training characteristic value and the label; the third determining module is used for determining the error between the prediction result of the initial prediction model and the label according to the loss function; and the adjusting module is used for adjusting and training the initial prediction model under the condition that the error is greater than or equal to the preset error until the error between the prediction result output by the adjusted prediction model and the label is less than the preset error, and determining the adjusted prediction model as the fluctuation rate prediction model.
Optionally, the second determining module further includes: a fourth determining module and a first generating module. The fourth determining module is used for determining that the target commodity has a transaction risk in a future preset time period and generating prompt information under the condition that the predicted fluctuation rate is larger than a preset threshold value; the first generation module is used for generating a transaction instruction under the condition that the predicted fluctuation rate is smaller than or equal to a preset threshold value, wherein the transaction instruction at least comprises the transaction price and the transaction quantity of the target commodity.
Example 3
According to an embodiment of the present application, there is also provided a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the method for determining transaction risk in embodiment 1 described above when the computer program runs.
Example 4
According to an embodiment of the present application, there is also provided an embodiment of an electronic device, where fig. 5 is a schematic diagram of an alternative electronic device according to the embodiment of the present application, as shown in fig. 5, the electronic device includes a processor, a memory, and a program stored in the memory and executable on the processor, and the processor implements the following steps when executing the program:
acquiring current market data of a target commodity, wherein the current market data at least comprises a plurality of transaction data within target historical duration; determining a plurality of target characteristic values corresponding to the current market data; carrying out weighted calculation and feature conversion on a plurality of target feature values based on a pre-trained fluctuation rate prediction model to obtain the predicted fluctuation rate of the target commodity in a future preset time period; and determining the transaction risk of the target commodity according to the predicted fluctuation rate.
Optionally, the processor executes the program to further implement the following steps: acquiring the transaction time of each transaction data in the current market data; performing aggregation calculation on a plurality of transaction data according to the transaction time to obtain at least one target data, wherein each target data corresponds to a preset time period, the preset time period comprises a plurality of transaction times, and the duration of the preset time period is less than the historical duration of the target; a plurality of target feature values are generated from the target data.
Optionally, the processor executes the program to further implement the following steps: extracting a plurality of first characteristic values, a plurality of second characteristic values and a plurality of third characteristic values based on the target data, wherein the first characteristic values are used for representing the position holding amount of the target commodity, the plurality of transaction prices of the target commodity and the transaction amount corresponding to each transaction price, the second characteristic values are used for representing the average closing price of the target commodity in at least one target data, and the third characteristic values are used for representing the difference between different transaction prices of the target commodity in at least one target data and the difference between transaction amounts committed at different transaction prices; and respectively preprocessing the first characteristic value, the second characteristic value and the third characteristic value to obtain a plurality of target characteristic values.
Optionally, the processor executes the program to further implement the following steps: carrying out weighted calculation and feature conversion on a plurality of target feature values based on a pre-trained fluctuation rate prediction model to obtain a plurality of historical market data of a target commodity before the predicted fluctuation rate of the target commodity in a future preset time period is obtained, wherein the historical market data at least comprises a plurality of historical transaction data in the historical time period, and the time length of the historical time period is greater than the time length of the target history; performing aggregation calculation on a plurality of pieces of historical transaction data according to the transaction time of each piece of historical transaction data to obtain at least one piece of historical target data, wherein each piece of historical target data corresponds to one sub-historical time period, and the duration of the sub-historical time period is less than the target historical duration; dividing the historical time period into a plurality of first historical time periods, wherein the duration of each first historical time period is greater than the duration of each sub-historical time period; forming historical target data in a first historical time period into a training set, and acquiring a label corresponding to each training set, wherein the label represents the market fluctuation rate of a second historical time period, the second historical time period is a time period after the first historical time period, and the market fluctuation rate is the mean square error of the logarithmic yield of the target commodity; and training according to the label and the historical target data to obtain a fluctuation rate prediction model.
Optionally, the processor executes the program to further implement the following steps: extracting a plurality of historical characteristic values based on historical target data in each training set; preprocessing the historical characteristic value to obtain a historical target characteristic value; and obtaining a fluctuation rate prediction model according to the historical target characteristic value and the label training.
Optionally, the processor executes the program to further implement the following steps: step 1, performing characteristic conversion on a historical target characteristic value to obtain an intermediate characteristic value; step 2, carrying out weighted calculation on the intermediate characteristic value to obtain a weighted characteristic value; step 3, updating the historical target characteristic value into a weighted characteristic value, and circularly executing the step 1 and the step 2 for preset times to obtain a plurality of intermediate characteristic values; step 4, summing the plurality of intermediate characteristic values to obtain a training characteristic value; and 5, training according to the training characteristic values and the labels to obtain a fluctuation rate prediction model.
Optionally, the processor executes the program to further implement the following steps: training according to the training characteristic value and the label to obtain an initial prediction model; determining an error between a prediction result of the initial prediction model and the label according to the loss function; and under the condition that the error is greater than or equal to the preset error, adjusting and training the initial prediction model until the error between the prediction result output by the adjusted prediction model and the label is less than the preset error, and determining that the adjusted prediction model is the fluctuation rate prediction model.
Optionally, the processor executes the program to further implement the following steps: under the condition that the predicted fluctuation rate is larger than a preset threshold value, determining that the target commodity has a transaction risk in a future preset time period, and generating prompt information; and under the condition that the predicted fluctuation rate is smaller than or equal to a preset threshold value, generating a transaction instruction, wherein the transaction instruction at least comprises the transaction price and the transaction quantity of the target commodity.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present application, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, a division of a unit may be a division of a logic function, and an actual implementation may have another division, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or may not be executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application, or portions or all or portions of the technical solutions that contribute to the prior art, may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make various improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.

Claims (11)

1. A method for determining transaction risk, comprising:
acquiring current market data of a target commodity, wherein the current market data at least comprises a plurality of transaction data within a target historical time;
determining a plurality of target characteristic values corresponding to the current market data;
carrying out weighted calculation and feature conversion on the plurality of target feature values based on a pre-trained fluctuation rate prediction model to obtain the predicted fluctuation rate of the target commodity in a future preset time period;
and determining the transaction risk of the target commodity according to the predicted fluctuation rate.
2. The method of claim 1, wherein determining a plurality of target feature values corresponding to the current market data comprises:
acquiring the transaction time of each transaction data in the current market data;
performing aggregation calculation on the transaction data according to the transaction time to obtain at least one target data, wherein each target data corresponds to a preset time period, the preset time period comprises a plurality of transaction times, and the duration of the preset time period is less than the historical duration of the target;
and generating a plurality of target characteristic values according to the target data.
3. The method of claim 2, wherein generating a plurality of the target feature values from the target data comprises:
extracting a plurality of first characteristic values, a plurality of second characteristic values and a plurality of third characteristic values based on the target data, wherein the first characteristic values are used for representing the position holding amount of the target commodity, the transaction prices of the target commodity and the transaction quantity corresponding to each transaction price, the second characteristic values are used for representing the average closing price of the target commodity in at least one target data, and the third characteristic values are used for representing the difference between different transaction prices of the target commodity in at least one target data and the difference between transaction amounts committed at different transaction prices;
and respectively preprocessing the first characteristic value, the second characteristic value and the third characteristic value to obtain a plurality of target characteristic values.
4. The method according to claim 1, wherein before performing weighted calculation and feature transformation on a plurality of target feature values based on a pre-trained fluctuation rate prediction model to obtain a predicted fluctuation rate of the target commodity in a future preset time period, the method further comprises:
acquiring a plurality of pieces of historical market data of the target commodity, wherein the historical market data at least comprise a plurality of pieces of historical transaction data in a historical time period, and the time length of the historical time period is longer than the target historical time length;
performing aggregation calculation on the plurality of pieces of historical transaction data according to the transaction time of each piece of historical transaction data to obtain at least one piece of historical target data, wherein each piece of historical target data corresponds to one sub-historical time period, and the duration of the sub-historical time period is less than the duration of the target historical time period;
dividing the historical time period into a plurality of first historical time periods, wherein the duration of the first historical time period is greater than that of the sub-historical time periods;
forming historical target data in the first historical time period into a training set, and acquiring a label corresponding to each training set, wherein the label represents a market fluctuation rate of a second historical time period, the second historical time period is a time period after the first historical time period, and the market fluctuation rate is the mean square error of the logarithmic yield of the target commodity;
and training according to the label and the historical target data to obtain the fluctuation rate prediction model.
5. The method of claim 4, wherein training the volatility prediction model based on the labels and the historical target data comprises:
extracting a plurality of historical characteristic values based on historical target data in each training set;
preprocessing the historical characteristic value to obtain a historical target characteristic value;
and training according to the historical target characteristic value and the label to obtain the fluctuation rate prediction model.
6. The method of claim 5, wherein deriving the volatility prediction model from the historical target feature values and the label training comprises:
step 1, performing characteristic conversion on the historical target characteristic value to obtain an intermediate characteristic value;
step 2, carrying out weighted calculation on the intermediate characteristic value to obtain a weighted characteristic value;
step 3, updating the historical target characteristic value into the weighted characteristic value, and circularly executing the step 1 and the step 2 for preset times to obtain a plurality of intermediate characteristic values;
step 4, summing the plurality of intermediate characteristic values to obtain training characteristic values;
and 5, training according to the training characteristic values and the labels to obtain the fluctuation rate prediction model.
7. The method of claim 6, wherein training the training eigenvalues and the labels to obtain the volatility prediction model comprises:
training according to the training characteristic value and the label to obtain an initial prediction model;
determining an error between a prediction result of the initial prediction model and the label according to a loss function;
and under the condition that the error is greater than or equal to a preset error, adjusting and training the initial prediction model until the error between the prediction result output by the adjusted prediction model and the label is less than the preset error, and determining the adjusted prediction model as the fluctuation rate prediction model.
8. The method of claim 1, wherein determining a transaction risk for the target commodity from the predicted volatility comprises:
under the condition that the predicted fluctuation rate is larger than a preset threshold value, determining that the target commodity has a transaction risk in the future preset time period, and generating prompt information;
and generating a transaction instruction under the condition that the predicted fluctuation rate is less than or equal to the preset threshold, wherein the transaction instruction at least comprises a transaction price and a transaction quantity of the target commodity.
9. An apparatus for determining transaction risk, comprising:
the system comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for acquiring current market data of a target commodity, and the current market data at least comprises a plurality of transaction data within a target historical duration;
the first determining module is used for determining a plurality of target characteristic values corresponding to the current market data;
the prediction module is used for carrying out weighted calculation and feature conversion on the target feature values based on a pre-trained fluctuation rate prediction model to obtain the predicted fluctuation rate of the target commodity in a future preset time period;
and the second determination module is used for determining the transaction risk of the target commodity according to the predicted fluctuation rate.
10. A computer-readable storage medium, in which a computer program is stored, wherein the computer program is arranged to, when executed, perform the method of determining a risk of a transaction as claimed in any one of claims 1 to 8.
11. An electronic device comprising one or more processors and memory storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the method of determining transaction risk of any of claims 1-8.
CN202210675134.8A 2022-06-15 2022-06-15 Method and device for determining transaction risk and computer readable storage medium Pending CN115049490A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210675134.8A CN115049490A (en) 2022-06-15 2022-06-15 Method and device for determining transaction risk and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210675134.8A CN115049490A (en) 2022-06-15 2022-06-15 Method and device for determining transaction risk and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN115049490A true CN115049490A (en) 2022-09-13

Family

ID=83160709

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210675134.8A Pending CN115049490A (en) 2022-06-15 2022-06-15 Method and device for determining transaction risk and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN115049490A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116911994A (en) * 2023-07-21 2023-10-20 山东省标准化研究院(Wto/Tbt山东咨询工作站) External trade risk early warning system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116911994A (en) * 2023-07-21 2023-10-20 山东省标准化研究院(Wto/Tbt山东咨询工作站) External trade risk early warning system
CN116911994B (en) * 2023-07-21 2024-03-26 山东省标准化研究院(Wto/Tbt山东咨询工作站) External trade risk early warning system

Similar Documents

Publication Publication Date Title
CN113268314A (en) Safe intelligent network system
US20130060672A1 (en) Social based automatic trading of currencies, commodities, securities and other financial instruments
KR102624075B1 (en) Method, apparatus and program for matching procurement bidding information
EP3201862A1 (en) Trading platform systems and methods
CN111882420A (en) Generation method of response rate, marketing method, model training method and device
Mathews Innovation portfolio architecture—Part 2: Attribute selection and valuation
CN111192133A (en) Method and device for generating risk model after user loan and electronic equipment
KR20220097005A (en) Valuation system using company information data
Moedjahedy et al. Stock price forecasting on telecommunication sector companies in Indonesia Stock Exchange using machine learning algorithms
US20100223204A1 (en) Hybrid multi-thread and multi-process computer simulation system and method
CN115049490A (en) Method and device for determining transaction risk and computer readable storage medium
JP2002109208A (en) Credit risk managing method, analysis model deciding method, analyzing server and analysis model deciding device
CN115034654A (en) Asset assessment method, device, equipment and storage medium
Ghosh et al. An ensemble of ensembles framework for predictive analytics of commodity market
US20090240557A1 (en) Method, apparatus and computer program product for valuing a technological innovation
Saputra et al. Stock Market Prediction System Using LSTM with Technical Indicators as Voters
US20240289878A1 (en) Decision-making method using artificial intelligence model, server, and computer program
CN110766465A (en) Financial product evaluation method and verification method and device thereof
Pham et al. Relationship between Google search and the Vietcombank stock
US20180330438A1 (en) Trading System with Natural Strategy Processing, Validation, Deployment, and Order Management in Financial Markets
CN115601179A (en) Financing product recommendation method and device
CN114119107A (en) Steel trade enterprise transaction evaluation method, device, equipment and storage medium
KR101677316B1 (en) Method of evaluating Brand value using substantial value-oriented method
Ulutas et al. A novel integrated model to measure supplier performance considering qualitative and quantitative criteria used in the supplier selection process
Ramesh et al. Structure and Intensity Based Approach in Credit Risk Models: A Literature Review

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