CN113744059A - Method for monitoring and prompting stock index data - Google Patents

Method for monitoring and prompting stock index data Download PDF

Info

Publication number
CN113744059A
CN113744059A CN202111049602.2A CN202111049602A CN113744059A CN 113744059 A CN113744059 A CN 113744059A CN 202111049602 A CN202111049602 A CN 202111049602A CN 113744059 A CN113744059 A CN 113744059A
Authority
CN
China
Prior art keywords
stock
stock index
data
monitoring
index data
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
CN202111049602.2A
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.)
Shanghai Eoi Information Technology Co ltd
Original Assignee
Shanghai Eoi Information Technology Co ltd
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 Shanghai Eoi Information Technology Co ltd filed Critical Shanghai Eoi Information Technology Co ltd
Priority to CN202111049602.2A priority Critical patent/CN113744059A/en
Publication of CN113744059A publication Critical patent/CN113744059A/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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Finance (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Accounting & Taxation (AREA)
  • Evolutionary Biology (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Strategic Management (AREA)
  • Technology Law (AREA)
  • General Business, Economics & Management (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The invention relates to a method for monitoring and prompting stock index data, which comprises the steps of obtaining a stock index data monitoring model through a training sample, monitoring stock indexes in real time based on the stock index data monitoring model, generating stock index monitoring information, analyzing the stock index monitoring information, judging whether abnormality exists or not, and pushing prompting information when the abnormality exists. According to the method, the stock index data monitoring model is trained and obtained according to historical stock index data, the change condition of the stock index data is monitored in real time based on the stock index data monitoring model, when the stock index data is found to be abnormal, prompt information can be issued in time as short as possible, serious influence on daily transaction is avoided, the correction efficiency when the stock index data is abnormal is improved, and the normal operation of a stock market is maintained.

Description

Method for monitoring and prompting stock index data
Technical Field
The invention relates to the technical field of data analysis, in particular to a method for monitoring and prompting stock index data.
Background
With the continuous development and improvement of stock markets, the supervision on the abnormal fluctuation of stock trading is continuously strengthened, however, the existing stock markets do not correspondingly supervise stock fingers, and the prior art does not have a feasible monitoring scheme for the stock fingers.
The stock index is a short term of stock price index (also called stock index), is a statistical relative number of stock prices compiled for measuring and reflecting the overall price level and the variation trend of the stock market, and is one of the important index parameters of the stock market.
The stock index is compiled and issued by a stock exchange or a financial service organization, is a relative index reflecting the stock price change condition at different time points, and is defined as: the relative change number obtained by comparing the stock price of the report period with the stock price of the selected base period is calculated by three methods: the first is relative method, the second is comprehensive method, and the third is weighting method.
For example: comparing the stock price of the report period with the stock price of the selected base period, and multiplying the ratio of the two by the index value of the base period to obtain the stock index of the report period.
The stocks participating in the stock index calculation are usually representative stocks picked out in the same industry.
For example: the Shanghai index (Shanghai securities comprehensive index) is a sample stock (component stock) of all stock listed in the Shanghai securities exchange, comprises A stock and B stock, and reflects the change condition of the stock price listed in the Shanghai securities exchange;
another example is: the Shanghai depth 300 index takes scale and liquidity as two basic criteria for sample selection, and gives more weight to liquidity, which reflects the comprehensive change of stock price of representative stocks with strong liquidity and large scale, and the sample space of sample stock (component stock) is: the time to market exceeds one quarter unless the total market value of the Japanese A shares line up to the top 30 of the Hu and Shen A shares.
For another example: the Shanghai depth 300 medical and health index (300 medicine) is composed of medical and health industry stocks in the Shanghai depth 300 index sample stock to reflect the overall performance of the stocks of the industry company, and the sample stock (component stock) comprises dozens of medical industry stocks (29 medical component stocks on 23 days 7 and 23 months in 2019).
In the stock clients (including stock quotation browsing clients and stock trading operation clients) operated and controlled by users, stock index data presented to the users are remotely acquired through a network, the stock index data are irregular, and the change of the stock index data is related to various factors, so that a conventional algorithm cannot be adopted to monitor whether the fluctuation range of the stock index data and the like have abnormal conditions.
For example: the error of the published stock index data (abnormal index trend) caused by the error operation of staff occurs once, the rising and falling amplitude of the data is seriously inconsistent with the rising and falling conditions of the price of a sample stock (component stock), thereby causing the confusion and the error of the transaction and bringing uncertain risks to the normal operation of the stock market.
Under the circumstance, an anomaly detection algorithm commonly used in the field of intelligent operation and maintenance, such as a time sequence anomaly detection algorithm (time sequence anomaly detection is usually formed by searching outlier data points according to a certain standard or normal signals, and the basic principle is that whether the fluctuation form of time sequence data deviates or changes suddenly compared with the historical form or not is detected, and whether the fluctuation form of the time sequence data deviates or changes suddenly compared with the historical form or not is detected), cannot be used for analyzing and judging whether the fluctuation amplitude and the like of the index data have abnormal conditions or not.
The information disclosed in this background section is only for enhancement of understanding of the general background of the invention and should not be taken as an acknowledgement or any form of suggestion that this information forms the prior art already known to a person skilled in the art.
Disclosure of Invention
Aiming at the defects in the prior art, the invention aims to provide a method for monitoring and prompting stock index data, which is characterized in that a stock index data monitoring model is trained and obtained according to historical stock index data, the change condition of the stock index data is monitored in real time based on the stock index data monitoring model, when the stock index data is found to be abnormal, prompt information can be issued in time as short as possible, the serious influence on the daily transaction is avoided, the correction efficiency when the stock index data is abnormal is improved, and the normal operation of a stock market is favorably maintained.
In order to achieve the above purposes, the technical scheme adopted by the invention is as follows:
a method for monitoring and prompting stock index data is characterized by comprising the following steps:
a stock index data monitoring model is obtained through training samples,
monitoring the stock index in real time based on the stock index data monitoring model, generating stock index monitoring information,
analyzing the stock index monitoring information, judging whether the abnormality exists,
and when the abnormity exists, pushing prompt information.
On the basis of the technical scheme, the method further comprises the following steps:
and when the abnormal conditions exist, triggering the maintenance module, recalculating the stock index data, and reissuing the stock index data obtained after the recalculation to the designated receiver.
On the basis of the technical scheme, the method further comprises the following steps:
and according to a set period, regularly maintaining and updating the stock index data monitoring model.
On the basis of the technical scheme, the training sample is from historical stock index data in a specified time range;
the historical stock index data refers to the time sharing data of the stock index issued by the stock exchange or the financial service institution from a specified time range.
On the basis of the technical scheme, the specified time range is 2-3 weeks before the current date.
On the basis of the technical scheme, the method for obtaining the stock index data monitoring model through the training sample comprises the following specific steps:
the data acquisition specifically comprises:
obtaining a training sample;
acquiring the latest price of the stock index;
acquiring the opening price of the current stock index day and the closing price of the previous trading day;
and aiming at the latest prices of the training samples and the stock index, performing granularity processing, which specifically comprises the following steps:
performing data aggregation on the acquired training sample data according to one piece of data in 3 seconds, and only keeping the data between 09:30:00 and 15:00: 00;
performing data aggregation on the latest price data of the stock index according to a piece of data in 3 seconds, and only keeping the data between 09:30:00 and 15:00: 00;
calculating the fluctuation proportion of the closing price relative to the previous trading day by the following calculation formula:
the fluctuation proportion is (the latest price of a stock index-the closing price of the previous trading day)/the closing price of the previous trading day;
the standardization of the fluctuation proportion data is carried out, and the calculation formula is as follows:
the standard fluctuation ratio is (fluctuation ratio-average of the daily fluctuation ratio)/standard deviation of the daily fluctuation ratio;
generating model training, specifically comprising:
determining a range of subsequent inclusion monitored strand fingers;
grouping the stock indexes in the monitoring range, and specifically comprising the following steps:
in the monitoring range, calculating the pearson similarity between the normalized fluctuation ratios of two thigh fingers to form a similarity matrix, wherein the pearson similarity smaller than a threshold is set as 0,
grouping the stock indexes in the monitoring range according to the similarity by a community detection algorithm;
within the same packet, the following processes are performed:
calculating Euclidean distance of fluctuation proportion between every two stock fingers in the same group and each detection window,
generating a distance dictionary by taking the 'stock index data 1_ stock index data 2_ detection window start time' as a key and a historical Euclidean distance list every day as a value;
and storing the grouping result and the distance dictionary to obtain the index data monitoring model.
On the basis of the technical scheme, the stock index is monitored in real time based on the stock index data monitoring model, and the required input data comprises the following steps:
model file, latest price of stock index and closing price of previous trading day;
the generating of the stock index monitoring information specifically includes:
calculating a fluctuation proportion according to the latest price and the closing price of the previous trading day;
and calculating deviation, namely calculating the absolute distance between every two stock fingers in each group in the detection window, comparing the absolute distance with the distance between the two stock fingers in the same historical period, and constructing a 0-1 matrix according to the Layouda criterion, wherein the construction mode is that 1 is obtained when the distance is within +/-3 × standard deviation of historical distance of the historical distance mean, and 0 is obtained otherwise, namely the two stock fingers are deviated.
On the basis of the above technical solution, the analyzing the stock index monitoring information and determining whether there is an abnormality specifically includes:
according to the grouping result, comparing the fluctuation proportion in the same group to judge whether the abnormality exists;
and (4) grouping by using a community detection algorithm according to a 0-1 matrix, and judging the stock fingers in other groups as abnormal except the group with the most stock fingers on the basis of a principle that a minority obeys majority.
On the basis of the technical scheme, the stock fingers judged to be abnormal are written into the specified file according to a preset format.
The method for monitoring and prompting the stock index data has the following beneficial effects that:
the stock index data monitoring method based on the stock index data comprises the steps of training according to historical stock index data, obtaining a stock index data monitoring model, monitoring the change condition of the stock index data in real time based on the stock index data monitoring model, and when the stock index data is found to be abnormal, issuing prompt information in a short time as much as possible, avoiding serious influence on daily transaction, improving the correction efficiency when the stock index data is abnormal, and being beneficial to maintaining the normal operation of a stock market.
Drawings
The invention has the following drawings:
the drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
fig. 1 is a flowchart of a first embodiment of a method for monitoring and prompting stock index data according to the present invention.
Fig. 2 is a flowchart of a second embodiment of a method for monitoring and prompting stock index data according to the present invention.
Fig. 3 is a flowchart of a third embodiment of a method for monitoring and prompting stock index data according to the present invention.
FIG. 4 is a flow chart of a stock index data monitoring model obtained by training samples.
FIG. 5 generates a flow chart for model training.
FIG. 6 example historical stock index data.
Fig. 7 shows the result of the granularity processing performed on the example of fig. 6.
Fig. 8 illustrates the result of calculating the fluctuation ratio of the closing price with respect to the previous trading day with respect to fig. 7.
Fig. 9 illustrates the result of calculating the normalized fluctuation ratio for fig. 8.
FIG. 10 is a schematic diagram of a distance dictionary.
Fig. 11 generates a specific example of the stock index monitoring information.
Fig. 12 obtains the euclidean distance diagram from the model file.
FIG. 13 is a schematic diagram illustrating a principle of grouping and judging the abnormal index of shares by using a community detection algorithm.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings. The detailed description, while indicating exemplary embodiments of the invention, is given by way of illustration only, in which various details of embodiments of the invention are included to assist understanding. Accordingly, it will be appreciated by those skilled in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
As shown in fig. 1, the method for monitoring and prompting stock index data according to the present invention includes the following steps:
a stock index data monitoring model is obtained through training samples,
monitoring the stock index in real time based on the stock index data monitoring model, generating stock index monitoring information,
analyzing the stock index monitoring information, judging whether the abnormality exists,
and when the abnormity exists, pushing prompt information.
The invention can timely (near real time), automatically and efficiently collect and analyze the stock index data and obtain the stock index monitoring information through the stock index data monitoring model, and further judge whether the current stock index is abnormal or not according to the stock index monitoring information, thereby filling the technical blind area that the current stock market does not carry out corresponding supervision aiming at the stock index and the feasible monitoring scheme aiming at the stock index in the prior art, providing the feasible stock index monitoring scheme, being more beneficial to meeting the requirements of customers and being more beneficial to maintaining the normal operation of the stock market.
On the basis of the above technical solution, as shown in fig. 2, the method further includes the following steps:
and when the abnormal conditions exist, triggering the maintenance module, recalculating the stock index data, and reissuing the stock index data obtained after the recalculation to the designated receiver.
And once the abnormal condition is judged to exist based on the stock index monitoring information, recalculating the stock index data according to the price of the component stock corresponding to the stock index, and releasing the data to the specified receiver according to the preset setting. For example:
the user A operates the method at the client A to find that the stock index is abnormal, at the moment, the stock index data is recalculated according to the price of the component stock corresponding to the stock index, and the correct stock index data obtained after calculation is issued to the client A on one hand, and the user A is prompted to know that the stock index is abnormal, and can be issued to the corresponding stock exchange or financial service institution according to the preset setting on the other hand, so that the user A is prompted to check the condition that the stock index is abnormal by the stock exchange or the financial service institution, and appropriate intervention is carried out.
As an alternative embodiment, the distribution to the designated recipient is performed by any one of the following methods:
the stock index data re-publication is done by sending a pop-up window to the app installed in the mobile device,
the stock index data is released again by sending a popup to a stock client installed in a computer,
the stock index data re-distribution is completed by sending an email to the specified email,
stock index data is reissued by sending a short message to a specified mobile phone number,
the stock index data is redistributed by dialing a specified telephone number and playing a pre-recorded prompting voice,
the stock index data is reissued by sending a stock index abnormal updating instruction to a specified server,
and the stock index data is reissued by updating the stock index data cached locally and setting an abnormal updating flag bit.
The completed stock index data is re-issued with the functions of prompting and informing, and the app installed in the mobile device and the stock client installed in the computer can temporarily replace the current stock index data of the corresponding stock index by using the re-calculated stock index data attached in the issued information after receiving the issued information until the stock index data issued by the stock exchange or the financial service mechanism is not abnormal or until the abnormal stock index data is corrected according to the stock index data issued by the stock exchange or the financial service mechanism.
On the basis of the above technical solution, as shown in fig. 3, the method further includes the following steps:
and according to a set period, regularly maintaining and updating the stock index data monitoring model.
As one alternative embodiment, the stock index data monitoring model is updated periodically according to a preset period, the default preset period is daily update, and the specific time of the default daily update is the time after the stock market is closed (15:30 closed), for example, 17:00 days is used as the preset period to be updated periodically. By updating the stock index data monitoring model in time, accurate monitoring of the stock index data can be ensured, and occurrence of misjudgment is reduced.
On the basis of the technical scheme, the training sample is from historical stock index data in a specified time range;
the historical stock index data refers to the time sharing data of the stock index issued by the stock exchange or the financial service institution from a specified time range.
As an alternative embodiment, the specified time range is 2-3 weeks before the current date, i.e.: and taking the current date as reference, and taking the share index time-sharing data of 14-21 days before, wherein the obtained share index time-sharing data is historical share index data. The day refers to the day on which stock market trading exists, excluding weekends and holidays.
Although the historical stock index data is issued by a stock exchange or a financial service institution, the granularity is not unique according to the hour, minute and second data contained in the stock index time data, and the granularity may be a value spaced by 3 seconds, 4 seconds or a value spaced by longer (more than 4 seconds);
referring to fig. 6, partial index time data of 5, 6 and 2020 is shown for three indices: the "180R value" stock refers to (180 certificate of relative value index), "180R growth" stock refers to (180 certificate of relative growth index), "180 value" stock refers to (180 certificate of relative value index);
looking at the Timestamp column shown in FIG. 6, 9:30: 04 to 9:30: 10 at 6 seconds intervals, and then 9:30: 15 at 5 second intervals, and then 9:30: 19 at 4 seconds intervals, and then 9:30: at 25 intervals of 6 seconds, the apparent particle size was not unique.
On the basis of the above technical solution, as shown in fig. 4, the specific steps of obtaining the stock index data monitoring model through the training sample are as follows:
the data acquisition specifically comprises:
obtaining a training sample; for example, the data of the share index time issued by the stock exchange or the financial service institution including the data shown in fig. 6 is obtained in a specified time range;
acquiring the latest price of the stock index;
acquiring the opening price of the current stock index day and the closing price of the previous trading day;
for example, assuming that 6 th 5/6 th 2020 is the current date, "xxx latest price" in the data shown in fig. 6 is the latest price of the stock index, "xxx opening price" in the data shown in fig. 6 is the opening price of the current day of the stock index, and "xxx closing price" in the data shown in fig. 6 is the closing price of 6 th 5/2020, so the closing price of the previous trading day is not shown in the data shown in fig. 6, and the closing price of 5 th 5/2020 should be used as the closing price of the previous trading day;
on the basis of assuming that 5, 6 th and 2020 is taken as the current date, and assuming that the specified time range is 2 weeks before the current date, stock index time-sharing data 14 days before 5, 6 th and 2020 should be acquired, and the day indicates a day on which stock market trading exists, excluding weekends and holidays, calculated according to this rule:
the statutory holidays are 1 st 5 th 2020,
on the weekend, 11, 12, 18, 19, 25 and 26 in month 4 of 2020,
the 14-day share data should be share data from 13/4/2020 to 30/4/2020;
and aiming at the latest prices of the training samples and the stock index, performing granularity processing, which specifically comprises the following steps:
performing data aggregation on the acquired training sample data according to one piece of data in 3 seconds, and only keeping the data between 09:30:00 and 15:00: 00;
performing data aggregation on the latest price data of the stock index according to a piece of data in 3 seconds, and only keeping the data between 09:30:00 and 15:00: 00;
the granularity of various data collected during data acquisition is not unique and comprises data outside the transaction time range of 09:30:00 to 15:00:00, the collected data are aggregated uniformly according to 3 seconds for normalized data, and only the data between 09:30:00 to 15:00:00 are reserved; the data aggregation can be processed in an averaging mode;
the latest prices of the training samples and the stock fingers need to be subjected to granularity processing and should be kept consistent;
when the stock index is monitored in real time based on the model subsequently, the monitoring data is kept consistent with the training sample;
taking the data shown in fig. 6 as an example, performing data aggregation on training sample data of the first 5 pieces of data (9: 30: 04 to 9:30: 25), and performing data aggregation on training sample data of the last 7 pieces of data (10: 30:00 to 10: 30: 29), where the result is shown in fig. 7, and a blank represents that no monitoring data exists at the time point;
calculating the fluctuation proportion of the closing price relative to the previous trading day by the following calculation formula:
the fluctuation proportion is (the latest price of a stock index-the closing price of the previous trading day)/the closing price of the previous trading day;
taking the data shown in fig. 7 as an example, the fluctuation ratio of the closing price with respect to the previous trading day is calculated, and the result is shown in fig. 8; if the blank shown in fig. 7 represents that the time point is not monitored, the fluctuation ratio of the closing price relative to the previous trading day cannot be calculated at the time point corresponding to the blank;
the standardization of the fluctuation proportion data is carried out, and the calculation formula is as follows:
the standard fluctuation ratio is (fluctuation ratio-average of the daily fluctuation ratio)/standard deviation of the daily fluctuation ratio;
wherein the fluctuation proportion is calculated according to the formula and is relative to the closing price of the previous trading day;
the average value of the current-day fluctuation ratio in the formula is obtained by averaging a certain general line in the complete table shown in fig. 8 corresponding to the fluctuation ratio;
the standard deviation of the daily fluctuation ratio in the formula is obtained by finding out the average, then finding out the variance and finally squaring the variance according to a fluctuation ratio column corresponding to a certain strand in a complete table shown in FIG. 8;
taking fig. 8 as an example, the normalized fluctuation ratio of the closing price with respect to the previous trading day is calculated, and the result is shown in fig. 9; the standardized fluctuation proportion is obtained by calculating each stock index according to the data corresponding to the stock index; if the blank shown in fig. 8 represents that there is no monitoring data at the time point, the normalized fluctuation ratio cannot be calculated at the time point corresponding to the blank;
as shown in fig. 5, the generating model training specifically includes:
determining a range of subsequent inclusion monitored strand fingers; for example: the upper syndrome index and the middle syndrome 500 index are included in the range of the monitored stock index;
grouping the stock indexes in the monitoring range, and specifically comprising the following steps:
in the monitoring range, the pearson similarity (pearson similarity) between the normalized fluctuation ratios of two thigh fingers is calculated to form a similarity matrix, wherein the pearson similarity smaller than a threshold is set to be 0, for example: assuming that the fingers 1-4 are included in the range of the monitored fingers, the pearson similarities between the normalized fluctuation ratios are calculated for the fingers 1 and 2, the fingers 1 and 3, the fingers 1 and 4, the fingers 2 and 3, the fingers 2 and 4, and the fingers 3 and 4, respectively, the threshold values are empirical values, can be adjusted according to actual conditions,
grouping the stock indexes in the monitoring range according to the similarity by a community detection algorithm;
the community detection algorithm is a graph-based clustering algorithm, and can be implemented according to the prior art without detailed description;
within the same packet, the following processes are performed:
the euclidean distance of the fluctuation ratio between every two fingers in the same group, for example, one detection window every 30 seconds as shown in fig. 10,
generating a distance dictionary by taking the 'stock index data 1_ stock index data 2_ detection window start time' as a key and a historical Euclidean distance list every day as a value;
and storing the grouping result and the distance dictionary to obtain the index data monitoring model.
Distance dictionary see schematically fig. 10, where: the upper syndrome index and the middle syndrome 500 index belong to the same group, the upper syndrome index is index data 1, the middle syndrome 500 index is index data 2, the 09:30:00 and the 09:30:30 are detection window start time, and the numerical value in [ ] in fig. 10 is a list of historical per-day euclidean distances.
On the basis of the technical scheme, the stock index is monitored in real time based on the stock index data monitoring model, and the required input data comprises the following steps:
model file, latest price of stock index and closing price of previous trading day;
the generating of the stock index monitoring information specifically includes:
calculating a fluctuation proportion according to the latest price and the closing price of the previous trading day;
and calculating deviation, namely calculating the absolute distance between every two stock fingers in each group in the detection window, comparing the absolute distance with the distance between the two stock fingers in the same historical period (obtained from a distance dictionary of the model), and constructing a 0-1 matrix according to the Lauda criterion, wherein the construction mode is 1 when the distance is within +/-3 + standard deviation of historical distance mean value, and otherwise, the distance is 0, namely the two stock fingers are deviated.
It should be noted that, monitoring the stock fingers in real time needs to exclude the individually grouped stock fingers when grouping the stock finger data monitoring model phase (training phase) obtained by training samples.
The following is a specific example of one generation stock index monitoring information.
As shown in fig. 11, if a detection window is set every 30 seconds, ten records are recorded in the time range of 2020/04/2009:30: 00-2020/04/2009: 30:30, and the records represent fluctuation ratio data of 180R value and 180R growing fingers;
calculating the Euclidean distance of the two fingers to be 0.0037, and acquiring the Euclidean distance of a window of 09:30:00-09:30:30 each day in the history data of the two fingers from the model file, wherein the window is shown in figure 12;
the mean and standard deviation of the historical distances were calculated to be 0.0063 and 0.0047, respectively, and the detection window distance 0.0037 falls within [0.0063-3 × 0.0047,0.0063+3 × 0.0047], i.e., -0.0079,0.0206], so the intersection point of 180R worth and 180R growth in the 0-1 matrix is 1, and it is known that no deviation occurs between these two stock fingers.
On the basis of the above technical solution, the analyzing the stock index monitoring information and determining whether there is an abnormality specifically includes:
according to the grouping result, comparing the fluctuation proportion in the same group to judge whether the abnormality exists;
the principle is as follows: the stock fingers in the same group are influenced by the same industry, the forms of the fluctuation ratios are very similar, or historically similar stock fingers rarely show great difference; the detection fluctuation proportion can be used for analyzing which stock fingers deviate from the grouping thereof according to a detection window (a very short time, such as 30 seconds) by taking the group as a unit, and the deviated stock fingers are judged to be abnormal;
and (4) grouping by using a community detection algorithm according to a 0-1 matrix, and judging the stock fingers in other groups as abnormal except the group with the most stock fingers on the basis of a principle that a minority obeys majority. An example is shown in fig. 13.
On the basis of the technical scheme, the stock fingers judged to be abnormal are written into the specified file according to a preset format.
For example, the preset format is: { time: 2020/04/2009:30: 30, abnormal index: [300 medicine, 380 information ] }. The time indicates the window time (the start time of the window) in which the abnormality occurred, and the abnormal stock index lists the stock index in which the abnormality occurred within the time window.
The invention has the following advantages:
1) the invention aims at the abnormal detection of stock index data, the current research method in the field is not mature, and the algorithm is innovative and frontier;
2) the intra-group grouping anomaly detection algorithm disclosed by the invention is based on the self property of the stock index data, utilizes the association between the stock indexes, and discovers the anomaly in a mode of training grouping and detecting regrouping, is different from the traditional anomaly detection algorithm, and is more suitable for anomaly detection of the stock index data;
3) the algorithm combines community detection and Lauda criterion, and skillfully discovers the deviating stock index, thereby ensuring the reliability of anomaly detection.
Those not described in detail in this specification are within the skill of the art.
The above description is only a preferred embodiment of the present invention, and the scope of the present invention is not limited to the above embodiment, but equivalent modifications or changes made by those skilled in the art according to the present disclosure should be included in the scope of the present invention as set forth in the appended claims.

Claims (9)

1. A method for monitoring and prompting stock index data is characterized by comprising the following steps:
a stock index data monitoring model is obtained through training samples,
monitoring the stock index in real time based on the stock index data monitoring model, generating stock index monitoring information,
analyzing the stock index monitoring information, judging whether the abnormality exists,
and when the abnormity exists, pushing prompt information.
2. The method for monitoring and prompting stock index data according to claim 1, further comprising the steps of:
and when the abnormal conditions exist, triggering the maintenance module, recalculating the stock index data, and reissuing the stock index data obtained after the recalculation to the designated receiver.
3. The method for monitoring and prompting stock index data according to claim 1, further comprising the steps of:
and according to a set period, regularly maintaining and updating the stock index data monitoring model.
4. A method for monitoring and indicating stock index data as claimed in claim 1, 2 or 3, wherein the training samples are from historical stock index data over a specified time range;
the historical stock index data refers to the time sharing data of the stock index issued by the stock exchange or the financial service institution from a specified time range.
5. The method for monitoring and indicating stock index data as claimed in claim 4, wherein the specified time range is 2-3 weeks before the current date.
6. The method for monitoring and prompting the stock index data according to claim 4, wherein the specific steps of obtaining the stock index data monitoring model through the training sample are as follows:
the data acquisition specifically comprises:
obtaining a training sample;
acquiring the latest price of the stock index;
acquiring the opening price of the current stock index day and the closing price of the previous trading day;
and aiming at the latest prices of the training samples and the stock index, performing granularity processing, which specifically comprises the following steps:
performing data aggregation on the acquired training sample data according to one piece of data in 3 seconds, and only keeping the data between 09:30:00 and 15:00: 00;
performing data aggregation on the latest price data of the stock index according to a piece of data in 3 seconds, and only keeping the data between 09:30:00 and 15:00: 00;
calculating the fluctuation proportion of the closing price relative to the previous trading day by the following calculation formula:
the fluctuation proportion is (the latest price of a stock index-the closing price of the previous trading day)/the closing price of the previous trading day;
the standardization of the fluctuation proportion data is carried out, and the calculation formula is as follows:
the standard fluctuation ratio is (fluctuation ratio-average of the daily fluctuation ratio)/standard deviation of the daily fluctuation ratio;
generating model training, specifically comprising:
determining a range of subsequent inclusion monitored strand fingers;
grouping the stock indexes in the monitoring range, and specifically comprising the following steps:
in the monitoring range, calculating the pearson similarity between the normalized fluctuation ratios of two thigh fingers to form a similarity matrix, wherein the pearson similarity smaller than a threshold is set as 0,
grouping the stock indexes in the monitoring range according to the similarity by a community detection algorithm;
within the same packet, the following processes are performed:
calculating Euclidean distance of fluctuation proportion between every two stock fingers in the same group and each detection window,
generating a distance dictionary by taking the 'stock index data 1_ stock index data 2_ detection window start time' as a key and a historical Euclidean distance list every day as a value;
and storing the grouping result and the distance dictionary to obtain the index data monitoring model.
7. The method for monitoring and prompting stock index data according to claim 4, wherein the stock index is monitored in real time based on the stock index data monitoring model, and the required input data comprises:
model file, latest price of stock index and closing price of previous trading day;
the generating of the stock index monitoring information specifically includes:
calculating a fluctuation proportion according to the latest price and the closing price of the previous trading day;
and calculating deviation, namely calculating the absolute distance between every two stock fingers in each group in the detection window, comparing the absolute distance with the distance between the two stock fingers in the same historical period, and constructing a 0-1 matrix according to the Layouda criterion, wherein the construction mode is that 1 is obtained when the distance is within +/-3 × standard deviation of historical distance of the historical distance mean, and 0 is obtained otherwise, namely the two stock fingers are deviated.
8. The method for monitoring and prompting stock index data according to claim 4, wherein the analyzing stock index monitoring information and determining whether there is an abnormality specifically comprises:
according to the grouping result, comparing the fluctuation proportion in the same group to judge whether the abnormality exists;
and (4) grouping by using a community detection algorithm according to a 0-1 matrix, and judging the stock fingers in other groups as abnormal except the group with the most stock fingers on the basis of a principle that a minority obeys majority.
9. The method as claimed in claim 8, wherein the index determined to be abnormal is written in a predetermined format into the designated file.
CN202111049602.2A 2021-09-08 2021-09-08 Method for monitoring and prompting stock index data Pending CN113744059A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111049602.2A CN113744059A (en) 2021-09-08 2021-09-08 Method for monitoring and prompting stock index data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111049602.2A CN113744059A (en) 2021-09-08 2021-09-08 Method for monitoring and prompting stock index data

Publications (1)

Publication Number Publication Date
CN113744059A true CN113744059A (en) 2021-12-03

Family

ID=78737002

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111049602.2A Pending CN113744059A (en) 2021-09-08 2021-09-08 Method for monitoring and prompting stock index data

Country Status (1)

Country Link
CN (1) CN113744059A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20000053962A (en) * 2000-05-13 2000-09-05 양용철 A System on the Anticipation of Futures and Stock Index
CN106295855A (en) * 2016-07-28 2017-01-04 上海财经大学 The instruction flow method of prediction stock price index futures market anomalies fluctuation
US20170091862A1 (en) * 2015-09-25 2017-03-30 Tseng-Sheng Cho Changes-in-equity trading analysis system
CN107844865A (en) * 2017-11-20 2018-03-27 天津科技大学 Feature based parameter chooses the stock index prediction method with LSTM models
CN108022168A (en) * 2017-11-23 2018-05-11 上海宽全智能科技有限公司 Data unusual fluctuation monitoring method, equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20000053962A (en) * 2000-05-13 2000-09-05 양용철 A System on the Anticipation of Futures and Stock Index
US20170091862A1 (en) * 2015-09-25 2017-03-30 Tseng-Sheng Cho Changes-in-equity trading analysis system
CN106295855A (en) * 2016-07-28 2017-01-04 上海财经大学 The instruction flow method of prediction stock price index futures market anomalies fluctuation
CN107844865A (en) * 2017-11-20 2018-03-27 天津科技大学 Feature based parameter chooses the stock index prediction method with LSTM models
CN108022168A (en) * 2017-11-23 2018-05-11 上海宽全智能科技有限公司 Data unusual fluctuation monitoring method, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
胡迪 *

Similar Documents

Publication Publication Date Title
CN109615226B (en) Operation index abnormity monitoring method
CN108537544B (en) Real-time monitoring method and monitoring system for transaction system
US10248528B2 (en) System monitoring method and apparatus
WO2021232588A1 (en) Food safety risk assessment method, apparatus, device, and storage medium
WO2020228530A1 (en) Repeated transaction risk monitoring method and device, and computer readable storage medium
CN107742127A (en) A kind of improved anti-electricity-theft intelligent early-warning system and method
US20190236497A1 (en) System and method for automated model selection for key performance indicator forecasting
US20150254791A1 (en) Quality control calculator for document review
CA2937919A1 (en) Evaluating data quality of clinical trials
CN109934268A (en) Abnormal transaction detection method and system
CN110490486B (en) Enterprise big data management system
CN109542289A (en) Operating method, device, equipment and the storage medium of MES
CN109583773A (en) A kind of method, system and relevant apparatus that taxpaying credit integral is determining
CN113744059A (en) Method for monitoring and prompting stock index data
CN107480703A (en) Transaction fault detection method and device
CN114325232B (en) Fault positioning method and device
CN113592140A (en) Electric charge payment prediction model training system and electric charge payment prediction model
CN111459996B (en) Method and device for detecting working state of oil gun in specified time period
CN111415080A (en) Wind-controlled thinking training method and system serving personal financial traders
CN117670508A (en) Real-time monitoring and early warning method and system for three-party data information platform
CN113592307B (en) Enterprise profit wind control detection method, device, computer equipment and storage medium
CN110008245A (en) One is suitable for the method for equipment fault early-warning model time segment search
CN115077906A (en) Engine high-occurrence fault cause determination method, engine high-occurrence fault cause determination device, electronic equipment and medium
CN117114911B (en) Automatic statistical settlement method and system for financial statement
CN113393169B (en) Financial industry transaction system performance index analysis method based on big data technology

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20211203

RJ01 Rejection of invention patent application after publication