Financial quantitative transaction method for reducing risk, protecting profit, accurately stopping loss and stabilizing emotion
By using stop loss prices and take profit conditions based on historical trading data in the quantitative trading system, extreme trading situations and negative user sentiment problems caused by existing quantitative trading strategies are solved, and financial quantitative trading methods with reduced risks, profit protection and emotional stability are achieved.
Patent Information
- Application Number
- CN202411470606.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-21
- Publication Date
- 2025-03-07
AI Technical Summary
Existing quantitative trading strategies focus on the improvement of overall yield during training, but may lead to extreme trading situations during actual use, and users are prone to negative emotions and actual losses.
A financial quantitative trading method is adopted. When a user purchases the investment subject matter through a trading system, the stop loss price is determined based on the entry price and historical trading data, and the take-profit conditions and position reduction prices are set before the stop loss price, and the transaction trigger conditions and pending orders are automatically configured.
It effectively reduces trading risks, protects profits, achieves accurate stop loss and stable emotions, and avoids users leaving the market early due to continuous losses.
Smart Images

Figure CN119579309A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a financial quantitative trading method for reducing risks, protecting profits, accurately stopping losses and stabilizing emotions. Background Art
[0002] With the rapid development of the financial market, more and more people choose to buy financial products such as funds, bonds or stocks to increase their own income. As a complex and dynamic system, the financial market is affected by many factors, such as the macroeconomic environment, company fundamentals, technical indicators, etc. In order to improve the efficiency of trading and analysis of financial products, many companies will introduce quantitative trading technology to measure the price of financial products in the secondary market, so as to determine the timing of buying and selling.
[0003] For example, Chinese patent CN202311114897.6 discloses a quantitative trading strategy testing method and device, which relates to the field of artificial intelligence technology, wherein the method includes: receiving detailed data of the quantitative trading strategy to be tested, including real market data, operating parameters of the quantitative trading strategy to be tested, and trading data of the quantitative trading strategy; extracting features from the detailed data of the quantitative trading strategy to be tested to obtain multiple feature data; inputting multiple feature data into a classifier, and outputting multiple prediction results, the prediction results including a test pass probability value and a test fail probability value; the classifier pre-trains the SVM model using historical market data, historical quantitative trading strategy operating parameters, and historical quantitative trading strategy trading data; and using DS evidence theory to perform data fusion processing on multiple prediction results to obtain the quantitative trading strategy test results. This can reduce the cost of quantitative trading strategy testing and improve the accuracy and stability of quantitative trading strategy testing.
[0004] However, in the actual implementation process, the inventors found that the existing quantitative trading strategies usually focus on improving the overall rate of return during training, that is, the rate of return of the overall transaction is used as the optimization target and evaluation index of the model, but relatively extreme trading situations may occur in the actual use process. For example, the model believes that there will be a large increase in the future according to the prediction results of certain dimensions, and continues to buy in the decline stage to dilute the average cost of the product. When the decline stage is long, users are prone to relatively negative emotions, such as believing that the loss is continuing to expand and then manually closing the position, which makes the model unable to execute the complete trading process, causing the user to suffer actual losses. Summary of the invention
[0005] In view of the above-mentioned problems existing in the prior art, a financial quantitative trading method is provided which reduces risks, protects profits, accurately stops losses and stabilizes emotions.
[0006] The specific technical solutions are as follows:
[0007] A financial quantitative trading method that reduces risk, protects profits, accurately stops losses and stabilizes emotions, implemented using a trading system, including:
[0008] Step S1: When a user purchases an investment subject, the acquisition module of the trading system determines a stop loss price corresponding to the investment subject according to the entry price of the investment subject and historical transaction data;
[0009] Step S2: the liquidation price generating module of the trading system generates a stop-profit condition and at least one liquidation price according to the stop-loss price;
[0010] Step S3: the transaction trigger configuration module of the trading system configures and stores corresponding transaction trigger conditions according to the stop-profit condition and the position reduction price;
[0011] Step S4: The real-time analysis module of the trading system monitors the real-time market price of the investment target in real time. When the real-time market price meets the transaction trigger condition, the trading system triggers a transaction response behavior.
[0012] On the other hand, in step S1, the method for generating the stop loss price includes:
[0013] When the trading system monitors the user's purchase behavior of the investment target, it generates a user configuration interface to provide the user with the option of configuring the stop loss price for the investment target.
[0014] On the other hand, the step S1 comprises:
[0015] Step S11: the trading system monitors the user's purchase behavior of the investment target to collect the entry price and the historical transaction data for the investment target;
[0016] Step S12: The trading system processes the historical trading data to determine the previous lowest price or the most recent inflection point price of the most recent large positive line associated with the user's purchase behavior, and uses the previous lowest price or the inflection point price as the stop loss price.
[0017] On the other hand, the step S12 comprises:
[0018] Step S121: sampling the historical transaction data in reverse order to obtain multiple historical transaction day data of a preset length;
[0019] The historical trading day data includes the opening price, closing price, highest price and lowest price of the day;
[0020] Step S122: Calculate the daily increase ratio according to the historical trading day data;
[0021] The calculation method of the daily increase ratio includes:
[0022] RDI = (CPD-OPD) / (HPD-LPD);
[0023] Wherein, RDI is the ratio of the increase of the day, CPD is the closing price of the day, OPD is the opening price of the day, HPD is the highest price of the day, and LPD is the lowest price of the day;
[0024] Step S123: Compare the current day increase ratio with the preset increase threshold to determine the most recent historical trading day data that meets the increase threshold, and use the current day's lowest price of the historical trading day data as the previous value's lowest price.
[0025] On the other hand, the step S2 comprises:
[0026] Step S21: determining stop loss parameters and stop profit conditions according to the entry price and the stop loss price;
[0027] Step S22: configuring the corresponding number of positions reduction stages according to the stop loss parameters;
[0028] Step S23: generating the position reduction price according to the stop loss parameter and the position reduction stage quantity.
[0029] On the other hand, in step S21, the stop loss parameters include stop loss distance, single stop loss amount and overall position;
[0030] The method for generating the stop loss distance includes:
[0031] R = ES;
[0032] Wherein, R is the stop loss distance, E is the entry price, and S is the stop loss price;
[0033] The method for generating the single stop loss amount includes:
[0034] Risk Money = N*M;
[0035] Where Risk Money is the single stop loss amount, N is the expected principal decline percentage constant corresponding to the stop loss distance, and M is the user's principal;
[0036] The method for generating the overall position includes:
[0037] V = N*M / (ES);
[0038] Wherein, V is the overall position, E is the entry price, S is the stop loss price, N is the expected decline percentage constant, and M is the user's principal.
[0039] On the other hand, in the step S22, the number of the positions reduction stages configured is three; in the step S23, the method for configuring the positions reduction price includes:
[0040] TP1=E+R;
[0041] TP2 = E + 4R;
[0042] TP3 = MP;
[0043] In the formula, TP1 is the first reduction price, TP2 is the second reduction price, and TP3 is the third reduction price;
[0044] E is the entry price, R is the stop loss distance, and MP is the stop loss price.
[0045] On the other hand, in step S3, the transaction triggering condition includes:
[0046] When the first position reduction price is reached, the trading system triggers a trading response behavior of the investment subject corresponding to selling 50% of the overall position;
[0047] When the second position reduction price is reached, the trading system triggers a trading response behavior corresponding to selling the investment subject of the remaining 25% of the overall position;
[0048] When the third position reduction price is reached, the trading system triggers a transaction response behavior corresponding to selling the remaining investment subject matter;
[0049] When the stop-profit condition is reached, the trading system triggers a transaction response behavior corresponding to selling the investment subject;
[0050] The transaction response behavior is generating a sell prompt message or automatically creating a sell order.
[0051] On the other hand, the step S4 comprises:
[0052] Step S41: determining whether the user still holds the investment object;
[0053] If yes, go to step S42;
[0054] If not, stop the transaction process;
[0055] Step S42: collecting the real-time market price of the investment target object, and determining whether the real-time market price triggers the transaction trigger condition;
[0056] If yes, go to step S43;
[0057] If not, go to step S44;
[0058] Step S43: Sell the investment subject according to the transaction triggering condition, and then turn to step S44;
[0059] Step S44: adjusting the transaction triggering condition according to the real-time market price, and then returning to step S41.
[0060] On the other hand, the step S44 comprises:
[0061] Step S441: when the real-time market price meets the rising adjustment threshold relative to the previous reference price, a new stop loss price is generated according to the real-time market price;
[0062] Step S442: updating the transaction triggering condition according to the stop loss price.
[0063] The above technical solution has the following advantages or beneficial effects:
[0064] In view of the problem that users cannot determine the actual loss during the transaction process in the prior art, this solution introduces a stop-loss price determined based on historical transaction data, and sets the corresponding stop-profit condition and at least one position reduction price before the stop-loss price. According to the stop-profit condition, position reduction price and stop-loss price, the system can automatically configure and store the corresponding transaction trigger conditions. During the operation of the system, the real-time market price can be automatically monitored, and an automatic order to sell can be placed after the corresponding transaction trigger condition is triggered. Since the stop-loss condition has been determined in advance, the maximum loss has been fixed, and there will be no situation where the loss continues to expand and cause the user to leave the market early. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] The embodiments of the present invention will be described more fully with reference to the attached drawings, which are provided for illustration and description only and are not intended to limit the scope of the present invention.
[0066] Figure 1 is an overall schematic diagram of an embodiment of the present invention;
[0067] Figure 2 This is a schematic diagram of step S1 in an embodiment of the present invention;
[0068] Figure 3 This is a schematic diagram of step S12 in an embodiment of the present invention;
[0069] Figure 4 This is a schematic diagram of step S2 in an embodiment of the present invention;
[0070] Figure 5A schematic diagram of transaction data according to an embodiment of the present invention;
[0071] Figure 6 This is a schematic diagram of step S4 in an embodiment of the present invention;
[0072] Figure 7 This is a schematic diagram of step S44 in an embodiment of the present invention;
[0073] Figure 8 This is a schematic diagram of transaction data of the control group in an embodiment of the present invention;
[0074] Fig. 9 This is a schematic diagram of optimized group transaction data in an embodiment of the present invention;
[0075] Fig.10 A schematic diagram of a trading system in an embodiment of the present invention;
[0076] Fig.11 This is a schematic diagram of a collection module in an embodiment of the present invention;
[0077] Fig.12 This is a schematic diagram of a stop loss module in an embodiment of the present invention;
[0078] Fig.13 This is a schematic diagram of a transaction trigger configuration module in an embodiment of the present invention;
[0079] Fig.14 A schematic diagram of a real-time analysis module in an embodiment of the present invention;
[0080] Fig.15 Schematic diagram of a stop loss upward adjustment module in an embodiment of the present invention. DETAILED DESCRIPTION
[0081] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0082] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.
[0083] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments, but they are not intended to limit the present invention.
[0084] The present invention comprises:
[0085] A financial quantitative trading method that reduces risk, protects profits, accurately stops losses and stabilizes emotions, implemented using a trading system, including:
[0086] Step S1: When a user purchases an investment subject, the acquisition module of the trading system determines a stop loss price corresponding to the investment subject based on the entry price of the investment subject and historical transaction data;
[0087] Step S2: the liquidation price generating module of the trading system generates a stop-profit condition and at least one liquidation price according to the stop-loss price;
[0088] Step S3: The transaction trigger configuration module of the trading system configures and stores the corresponding transaction trigger conditions according to the stop-profit conditions and the position reduction price;
[0089] Step S4: The real-time analysis module of the trading system monitors the real-time market price of the investment target in real time. When the real-time market price meets the transaction triggering condition, the trading system triggers the transaction response behavior.
[0090] Specifically, in view of the problem that users cannot accurately measure the exit price in the trading process in the prior art, which leads to early exit, this solution introduces a trading process that is implemented by using a stop-loss price determined based on historical trading data.
[0091] Specifically, the subject of investment is usually the subject of investment purchased by users in a secondary market, such as stocks, futures, precious metals, etc., which are publicly sold on a secondary market exchange, and the current transaction price, historical transaction price and other information of the subject of investment can be obtained from the exchange. Users earn the difference by purchasing the subject of investment and selling the floating profit, and usually do not consider additional income factors such as futures delivery and bond maturity.
[0092] For investment targets, when users access the trading system, the trading system will obtain the buying and selling information in the user's trading account. When the user creates a buy order for an investment target and completes the actual transaction, the trading system will collect the corresponding entry price data and obtain the historical transaction data of the investment target within the preset date range.
[0093] The stop loss price is the lowest price allowed when the price of the investment target fluctuates, determined based on the entry price data and historical transaction data. When the stop loss price is triggered, the system automatically creates a corresponding sell order to sell all of the stocks to avoid further losses.
[0094] The stop-profit condition is the price at which the floating profit should be sold to obtain profit when the price of the investment target fluctuates, determined based on the entry price data and historical transaction data.
[0095] The reduction price is the price at which part of the investment subject is sold in order to reduce losses when the price of the investment subject fluctuates, which is determined based on the entry price data and historical transaction data.
[0096] After the stop-profit conditions and the price for reducing positions are calculated, they can be converted into corresponding transaction trigger conditions. That is, for the investment target, when its real-time market price triggers the corresponding price conditions, a sell order at the corresponding price is created to sell a certain amount of the investment target. The trading rules are stored in the system.
[0097] During the actual trading process, the system obtains the real-time market price of the investment target through the corresponding software interface and compares it with the pre-stored trading rules. When the corresponding transaction trigger price is triggered, the transaction response behavior is triggered to sell, thereby determining the actual maximum loss. It will not be affected by the user's subjective judgment, which helps to stabilize customer emotions.
[0098] The transaction response behavior is set to generate a sell reminder message or automatically create a sell order according to different user settings. Generating a sell reminder message means triggering a reminder message through the user's pre-configured reminder method, such as in the trading client, mobile APP, phone, email or other equivalent methods, to inform the user that the current predetermined selling price has been reached, so as to remind the user to sell in time. Automatically creating a sell order means that the trading system automatically creates a sell order with a specific number of investment objects associated with the selling price through the user account according to certain bidding rules.
[0099] Among them, the stop loss price can be configured in the following two ways during the configuration process, for example:
[0100] In one embodiment, in step S1, the method for generating the stop loss price includes:
[0101] When the trading system monitors the user's purchase behavior of the investment target, it generates a user configuration interface to provide the user with the option of configuring a stop loss price for the investment target.
[0102] Specifically, in order to make the transaction process more in line with user expectations, in this embodiment, when the user purchases the investment target, the trading system creates a window to prompt the user to configure the stop loss price by himself, so that the transaction process meets the user's expectations and does not cause losses due to premature selling.
[0103] In one embodiment, Figure 2 As shown, step S1 includes:
[0104] Step S11: The trading system monitors the user's purchase behavior of the investment target to collect entry prices and historical transaction data for the investment target;
[0105] Step S12: The trading system processes the historical trading data to determine the previous lowest price of the most recent large positive line associated with the user's purchase behavior, and uses the previous lowest price as the stop loss price.
[0106] Specifically, in order to achieve better control of trading losses, the inventors have studied a large number of historical trading samples and found that in the process of stock trading, the phenomenon of "big positive line" is usually formed by concentrated buying behavior, which makes the starting price of the big positive line have a large number of positions, which has a certain support effect on the price and is not easy to fall below. In other words, the bottom of the big positive line is less likely to be broken than the bottom of the non-big positive line, because the big positive line represents abundant buying, which means that the support at this place is relatively strong and not easy to be broken. On the other hand, when the bottom of the big positive line is broken, the trend will inevitably turn from rising to falling, and investors should not continue to hold.
[0107] Based on the above viewpoints, in this embodiment, after collecting the entry price and historical transaction data of the investment target, the historical transaction data is first processed to determine the previous lowest price of the most recent large positive line in the historical transaction data, that is, the lowest price of the most recent concentrated buying behavior, and then the previous lowest price is used as the stop loss price to reduce the losses incurred during the transaction.
[0108] In one embodiment, Figure 3 As shown, step S12 includes:
[0109] Step S121: sampling the historical transaction data in reverse order to obtain multiple historical transaction day data of a preset length;
[0110] Historical trading day data includes the day's opening price OPD, the day's closing price CPD, the day's highest price HPD, and the day's lowest price LPD;
[0111] Step S122: Calculate the daily increase ratio according to the historical trading day data;
[0112] The calculation method of the daily increase ratio includes:
[0113] RDI = (CPD-OPD) / (HPD-LPD);
[0114] In the formula, RDI is the daily increase ratio, CPD is the daily closing price, OPD is the daily opening price, HPD is the daily highest price, and LPD is the daily lowest price;
[0115] Step S123: Compare the current day's increase ratio with the preset increase threshold to determine the most recent historical trading day data that meets the increase threshold, and use the current day's lowest price of the historical trading day data as the previous lowest price.
[0116] Specifically, in order to effectively determine the bottom position of the long Yang line, in this embodiment, the historical transaction data is first sampled in reverse order to obtain multiple historical transaction day data of a preset length. Among them, since the transaction process is divided by day, each sampling point is naturally aligned with the transaction day.
[0117] Then, the daily increase ratio is determined according to the above calculation formula to form a sequence of daily increase ratios of multiple trading days arranged in reverse order.
[0118] Finally, compare the daily increase ratio sequence with the preset increase threshold, such as 0.5, and then determine the most recent trading day that is greater than the increase threshold, and use the daily lowest price of that trading day as the previous lowest price to achieve a better screening effect.
[0119] In one embodiment, Figure 4 As shown, step S2 includes:
[0120] Step S21: Determine the stop loss parameters and take profit conditions according to the entry price and the stop loss price;
[0121] Step S22: configuring the corresponding number of positions reduction stages according to the stop loss parameters;
[0122] Step S23: Generate a position reduction price according to the stop loss parameter and the number of positions reduction stages.
[0123] Specifically, after the entry price and stop loss price are determined, in order to achieve a better calculation process, the stop profit conditions are also determined according to the stop loss price, and the stop loss parameters are determined according to the entry price and the stop loss price. The stop loss parameters include the stop loss distance, the single stop loss amount and the overall position. Based on the stop loss parameters, multiple step-by-step reduction stages can be set before the stop loss price is triggered, and the reduction price for each triggering reduction is generated according to the stop loss parameters and the number of reduction stages.
[0124] In one embodiment, in step S21, the stop loss parameters include the stop loss distance, the single stop loss amount and the overall position;
[0125] The methods for generating stop loss distance include:
[0126] R = ES;
[0127] In the formula, R is the unit stop loss distance, E is the entry price, and S is the stop loss price;
[0128] The methods for generating a single stop loss amount include:
[0129] Risk Money = N*M;
[0130] In the formula, Risk Money is the single stop loss amount, N is the pre-configured expected decline percentage constant, and M is the user's principal;
[0131] The methods for generating overall positions include:
[0132] V = N*M / (ES);
[0133] In the formula, V is the overall position, E is the entry price, S is the stop loss price, N is the expected decline percentage constant, and M is the user's principal.
[0134] And, the stop-profit condition is that the price rises to the predetermined profit distance, and the calculation method usually used is:
[0135] Profit distance = profit-loss ratio * stop-loss distance. The profit-loss ratio is the user's expected profit and can usually be configured to 2 based on experimental data.
[0136] Among them, the role of a single stop loss amount is to limit the risk of each investment to less than 2%, so that investors will not lose a large amount of principal due to a wrong transaction. At the same time, assuming that the investor's accuracy rate is 50%, it is easy to get through this calculation method that it takes 50 consecutive losses to lose all the principal. The probability is 0.5^50. It can be seen that effective control of losses can be achieved.
[0137] The purpose of the overall position calculation method is that after determining the stop loss amount of N%, the amount that the investor should buy this time is calculated by dividing the risk N% that can be borne by the stop loss distance through the loss quantification method.
[0138] For example, stockholder Zhang San has a principal of RMB 100,000. According to the rules of the present invention, he chooses a single risk of 2%*10W=2,000 RMB.
[0139] by Figure 5 For example, assuming that the entry price = 18.28, the stop loss price = 17.04, and the stop loss distance R = 1.24.
[0140] According to the formula, the quantity that Zhang San should buy is:
[0141] 2000 / R=1612.90 shares, according to the minimum transaction quantity of 100 shares, buy 1600 shares.
[0142] Zhang San’s actual investment amount = 1600*entry price = 1600*18.28=29248, which is less than the principal.
[0143] Zhang San bought 1600 shares, and each share fell by 1.24. His risk was 1600*1.24=1984, which was less than the single stop loss amount of 2000 yuan. By controlling the above loss process, the risk of a single transaction can be reduced, which is conducive to stabilizing emotions.
[0144] In one embodiment, in step S22, the number of positions reduction stages configured is three;
[0145] In step S23, the method for configuring the liquidation price includes:
[0146] TP1=E+R;
[0147] TP2 = E + 4R;
[0148] TP3 = MP;
[0149] In the formula, TP1 is the first reduction price, TP2 is the second reduction price, and TP3 is the third reduction price;
[0150] E is the entry price, R is the stop loss distance, and MP is the stop loss price.
[0151] In order to achieve a better position reduction process, in this embodiment, after the profit and loss ratio is determined, the number of position reduction stages is configured to three, and then the first to third position reduction prices are configured according to the above method to achieve better control of the position reduction process.
[0152] Specifically, by requiring the profit-loss ratio to be greater than 2 times, the prices of TP1, TP2, and TP3 are calculated, allowing investors to lose small and win big. Combined with a 50% success rate, the mathematical expectation is positive.
[0153] It should be noted that in other embodiments, the number of configured liquidation stages may be further configured to 4, 5, or 6. In such embodiments, the configuration method of the first and second ends of the liquidation price is consistent with TP1 and TP3, that is, the first liquidation price is E+R, and the last liquidation price is MP. Multiple liquidation prices are inserted between the first and last liquidation prices according to a specific price difference to achieve multi-stage liquidation.
[0154] In one embodiment, in step S3, the transaction triggering conditions include:
[0155] When the first liquidation price is reached, the trading system triggers a trading response behavior corresponding to selling 50% of the overall position of the investment subject;
[0156] When the second liquidation price is reached, the trading system triggers a trading response behavior corresponding to selling the investment subject of the remaining 25% of the overall position;
[0157] When the third liquidation price is reached, the trading system triggers a transaction response behavior corresponding to selling the remaining investment subject matter;
[0158] When the take-profit conditions are met, the trading system triggers a transaction response behavior corresponding to the sale of the investment subject.
[0159] Specifically, in order to achieve a better position reduction process, in this embodiment, after calculating the position reduction prices of the above three position reductions, the corresponding position reduction quantities are also configured. When the corresponding position reduction prices are triggered, the corresponding quantities of investment objects are sold to achieve better loss control.
[0160] In addition, in actual application, selling 50% of the position at the first reduction price in conjunction with the dynamic upward movement of the stop loss price can achieve a profit-loss ratio of 1:1. Specifically, assuming that the user's position amount is 5,000 when entering the market, and the stop loss distance corresponds to 20% of the principal, that is, 1,000 yuan, then when the position amount rises to 7,000 yuan, the first stop loss distance will be increased to 6,000 yuan. At this time, if there is a decline, causing the position amount to fall to 6,000 yuan, the 3,000 yuan position will be sold, and the profit will be 1,000 yuan. The subsequent position is risk-free, which helps to stabilize the user's emotions.
[0161] In one embodiment, Figure 6 As shown, step S4 includes:
[0162] Step S41: Determine whether the user still holds the investment target;
[0163] If yes, go to step S42;
[0164] If not, stop the transaction process;
[0165] Step S42: collecting the real-time market price of the investment target object, and determining whether the real-time market price triggers a transaction trigger condition;
[0166] If yes, go to step S43;
[0167] If not, go to step S44;
[0168] Step S43: Sell the investment subject according to the transaction triggering conditions, and then turn to step S44;
[0169] Step S44: Adjust the transaction triggering conditions according to the real-time market price, and then return to step S41.
[0170] Specifically, in order to achieve better loss control, when a large increase occurs, this embodiment also configures a process for adjusting the transaction trigger conditions according to the real-time market price to avoid losses caused by failure to sell in time when the floating profit is large.
[0171] Specifically, if Figure 7 As shown, step S44 includes:
[0172] Step S441: when the real-time market price meets the rising adjustment threshold relative to the previous reference price, a new stop loss price is generated according to the real-time market price;
[0173] Step S442: Update the transaction triggering conditions according to the stop loss price.
[0174] When collecting real-time market prices, the system also captures the previous reference price according to a certain window. When the real-time market price meets the rising adjustment threshold relative to the previous reference price, the stop loss price is increased and the corresponding transaction trigger conditions are updated. That is, the first to third reduction prices are adjusted upward based on the stop loss conditions after the increase.
[0175] Taking Zhang San's example above, when the first take-profit point is to sell 50% of the position and the price = profit-loss ratio 1:1, the effect is:
[0176] Zhang San initially bought 1600 shares. When the stock price rose to 18.28+R(1.24)=19.52, he sold 800 shares and made a profit of 800*1.24 / share. At this point, he has a risk-free position because his remaining 800 shares can be traded even if the stock price drops to the stop loss price of 17.04.
[0177] The loss is also 800*1.24 / share. At this time, Zhang San's emotions will be the most stable because he knows that he will not lose money on this investment.
[0178] The function of TP2: The second take-profit point, sell 25% of the position, price = profit and loss ratio 4:1, at this time, Zhang San has made a profit of 4R = 4.96, sold 25% of the position, that is, 400 shares, and made a profit of 1,984 yuan.
[0179] The role of TP3: The third take-profit point is also the final exit point. Since the rule of TP3 is not to set a take-profit target in advance, this makes trend tracking possible. Because when the market explodes, stock prices often hit new highs, and ordinary investors will not be able to hold on to their positions, and will subconsciously want to pocket the profits (disposition effect, seeking profit and avoiding harm). The design of TP3 in this plan solves this problem. If the price continues to rise, Zhang San will not sell. He will dynamically move up the stop loss price of the last 25% of the position according to the push protection algorithm. When the price fails to reach a new high and begins to fall, the final price will hit the moving stop loss point MOVINGSTOP. At this time, selling the stocks in hand will protect most of the profits and avoid the full loss of profits in the roller coaster (big rise and fall) market.
[0180] As shown in the figure, the final TP3 = 34.59, Zhang San sold the last 400 shares and made a profit of 400*(34.59-18.28)=400*16.31=6524
[0181] Finally, Zhang San used this plan and earned a total of:
[0182] 800*1.24+400*4.96+400*16.31=9500
[0183] The increase to TP1 is 7%, the increase to TP2 is 27%, and the increase to TP3 is 91%.
[0184] Zhang San's initial risk is 2% of the 100,000 yuan principal = 2,000 yuan
[0185] Therefore, in this investment, Zhang San’s profit and loss ratio = 9500 / 2000 = 4.75 times> 2 times the profit and loss ratio.
[0186] In order to achieve a better verification effect for the above method, the following method is also used for verification.
[0187] Control group: imitate the trading method of a retail investor
[0188] Trading target pool: 50 stocks with the largest market capitalization on the ChiNext (ChiNext 50 Index constituent stocks)
[0189] Single ticket position: 5%, holding up to 20 targets at the same time
[0190] Trading logic: observe the MACD indicator of individual stocks in the daily cycle; if there is a golden cross at the close, open a long position; if there is a dead cross at the close, close the position; do not set a stop loss.
[0191] Test sample time period: 2019.1~2024.9.27;
[0192] Test data and test environment: ricequant / XunTouQMT.
[0193] The optimization group maintained the same target pool and single-ticket positions as the control group and only adjusted the trading logic.
[0194] in:
[0195] The logic of opening a position remains unchanged, and it is still opened at the golden cross;
[0196] Set the average volatility of the past 14 days*150% as the stop loss space, and all positions will be closed if the closing price is lower than the stop loss price;
[0197] Added rule: When floating profit = 1 times stop loss, that is, when the odds are 1:1, half of the position will be closed unconditionally;
[0198] The remaining half is closed by the above-mentioned trading method.
[0199] Test results such as Figure 8 , 9 As shown in Table 1 below.
[0200]
[0201] Table 1;
[0202] Based on the above results, we can see that:
[0203] 1. The alternative pool is a two-way high volatility target pool;
[0204] 2. The testing period covers the rising and falling cycles of the underlying asset;
[0205] 3. The original group of MACD "golden cross long and dead cross short" is a primary, primitive, or slightly stupid trading method in the eyes of professional investors;
[0206] 4. Optimization group: does not change the position opening logic, only adjusts the risk management framework and capital allocation structure;
[0207] Introducing the concept of initial stop loss;
[0208] When the profit-loss ratio reaches 1:1, that is, b=1 in the Kelly formula, the half-position profit-taking mechanism and the half-position intelligent dynamic profit-taking mechanism are introduced;
[0209] In the final trading results, the proportion of signals that could trigger 1:1 profitable closing reached 52.7% (p = 52.7%);
[0210] After modifying the closing method, in the Kelly formula (b+1)*p=1.054, the final result is >1.
[0211] In addition, in another embodiment, the above-mentioned transaction method can be implemented by using a transaction system, such as Fig.10 As shown, the trading system includes:
[0212] Collection module 1, the collection module 1 determines the stop loss price corresponding to the investment subject according to the entry price of the investment subject and the historical transaction data;
[0213] The position reduction price generating module 2 generates a stop-profit condition and at least one position reduction price according to the stop-loss price;
[0214] Transaction trigger configuration module 3, transaction trigger configuration module 2 is connected to position reduction price generation module 2, and transaction trigger configuration module 3 configures and stores corresponding transaction trigger conditions according to stop-profit conditions and position reduction prices;
[0215] Real-time analysis module 4, which is connected to transaction trigger configuration module 3, monitors the real-time market price of the investment target in real time, and triggers the transaction response behavior when the real-time market price meets the transaction trigger condition
[0216] And, if Fig.11 As shown, the acquisition module 1 includes:
[0217] The data acquisition module 11 collects the entry price and historical transaction data of the investment target when monitoring the user's purchase behavior of the investment target;
[0218] The stop-loss determination module 12 is connected to the data acquisition module 11, and processes the historical transaction data to determine the previous lowest price or the most recent inflection point price of the most recent big positive line associated with the user's purchase behavior, and uses the previous lowest price or the inflection point price as the stop-loss price;
[0219] And, if Fig.12 As shown, the stop loss determination module 12 includes:
[0220] The sampling module 121 performs reverse sampling on the historical transaction data to obtain a plurality of historical transaction day data of a preset length;
[0221] Increase calculation module 122, increase calculation module 122 is connected to collection module 121, increase calculation module 122 calculates the increase ratio of the day according to the historical trading day data;
[0222] The price determination module 123 is connected to the price increase calculation module 122. The price determination module 123 compares the price increase ratio of the day with the preset price increase threshold to determine the most recent historical trading day data that meets the price increase threshold, and uses the current day's lowest price of the historical trading day data as the previous lowest price.
[0223] And, if Fig.13 As shown, the transaction trigger configuration module 3 includes:
[0224] A stop-profit determination module 31, which determines stop-loss parameters and stop-profit conditions according to the entry price and the stop-loss price;
[0225] A position reduction quantity determination module 32, the position reduction quantity determination module 32 is connected to the stop-profit determination module 31, and the position reduction quantity determination module configures the corresponding position reduction stage quantity according to the stop-loss parameter;
[0226] The position reduction price determination module 33 is connected to the position reduction quantity determination module 33, and the position reduction price determination module 33 generates a position reduction price according to the stop loss parameter and the position reduction stage quantity.
[0227] And, if Fig.14 As shown, the real-time analysis module 4 includes:
[0228] The holding determination module 41 determines whether the user still holds the investment target;
[0229] The price trigger module 42 is connected to the position determination module 41. When there is still a position, the price trigger module 42 collects the real-time market price of the investment target and determines whether the real-time market price triggers the transaction trigger condition.
[0230] A selling module 43, the selling module 43 is connected to the price triggering module 42, and the selling module 43 sells the investment subject according to the transaction triggering condition when the transaction triggering condition is triggered;
[0231] The stop loss upward adjustment module 44 is connected to the selling module 43, and the stop loss upward adjustment module 44 adjusts the transaction triggering conditions according to the real-time market price.
[0232] And, if Fig.15 As shown, the stop loss upward adjustment module 44 includes:
[0233] A new price calculation module 441, which generates a new stop loss price according to the real-time market price when the real-time market price meets the rising adjustment threshold relative to the previous reference price;
[0234] The condition updating module 442 is connected to the new price calculating module 441 , and the condition updating module 442 updates the transaction triggering condition according to the stop loss price.
[0235] The above are only preferred embodiments of the present invention, and are not intended to limit the implementation methods and protection scope of the present invention. Those skilled in the art should be aware that all solutions obtained by equivalent substitutions and obvious changes made using the description and illustrations of the present invention should be included in the protection scope of the present invention.
Claims
1. A financial quantitative trading method that reduces risk, protects profits, accurately stops losses and stabilizes emotions, characterized by: It is implemented using a trading system, including: Step S1: When a user purchases an investment subject, the acquisition module of the trading system determines a stop loss price corresponding to the investment subject according to the entry price of the investment subject and historical transaction data; Step S2: the liquidation price generating module of the trading system generates a stop-profit condition and at least one liquidation price according to the stop-loss price; Step S3: the transaction trigger configuration module of the trading system configures and stores corresponding transaction trigger conditions according to the stop-profit condition and the position reduction price; Step S4: The real-time analysis module of the trading system monitors the real-time market price of the investment target in real time. When the real-time market price meets the transaction trigger condition, the trading system triggers a transaction response behavior.
2. The financial quantitative trading method according to claim 1, characterized in that: In step S1, the method for generating the stop loss price includes: When the trading system monitors the user's purchase behavior of the investment target, it generates a user configuration interface to provide the user with the option of configuring the stop loss price for the investment target.
3. The financial quantitative trading method according to claim 1, characterized in that: The step S1 comprises: Step S11: the trading system monitors the user's purchase behavior of the investment subject to collect the entry price and the historical transaction data for the investment subject; Step S12: The trading system processes the historical trading data to determine the previous lowest price or the most recent inflection point price of the most recent large positive line associated with the user's purchase behavior, and uses the previous lowest price or the inflection point price as the stop loss price.
4. The financial quantitative trading method according to claim 3, characterized in that: The step S12 comprises: Step S121: sampling the historical transaction data in reverse order to obtain multiple historical transaction day data of a preset length; The historical trading day data includes the opening price, closing price, highest price and lowest price of the day; Step S122: Calculate the daily increase ratio according to the historical trading day data; The calculation method of the daily increase ratio includes: RDI = (CPD-OPD) / (HPD-LPD); Wherein, RDI is the ratio of the increase of the day, CPD is the closing price of the day, OPD is the opening price of the day, HPD is the highest price of the day, and LPD is the lowest price of the day; Step S123: Compare the current day increase ratio with the preset increase threshold to determine the most recent historical trading day data that meets the increase threshold, and use the current day's lowest price of the historical trading day data as the previous value's lowest price.
5. The financial quantitative trading method according to claim 1, characterized in that: The step S2 comprises: Step S21: determining stop loss parameters and stop profit conditions according to the entry price and the stop loss price; Step S22: configuring the corresponding number of positions reduction stages according to the stop loss parameters; Step S23: generating the position reduction price according to the stop loss parameter and the position reduction stage quantity.
6. The financial quantitative trading method according to claim 5, characterized in that: In step S21, the stop loss parameters include stop loss distance, single stop loss amount and overall position; The method for generating the stop loss distance includes: R = ES; Where, R is the stop loss distance, E is the entry price, and S is the stop loss price; The method for generating the single stop loss amount includes: Risk Money = N*M; Where Risk Money is the single stop loss amount, N is the expected principal decline percentage constant corresponding to the stop loss distance, and M is the user's principal; The method for generating the overall position includes: V = N*M / (ES); Wherein, V is the overall position, E is the entry price, S is the stop loss price, N is the expected decline percentage constant, and M is the user's principal.
7. The financial quantitative trading method according to claim 6, characterized in that: In the step S22, the number of the positions reduction stages configured is three; In step S23, the method for configuring the liquidation price includes: TP1=E+R; TP2 = E + 4R; TP3 = MP; In the formula, TP1 is the first reduction price, TP2 is the second reduction price, and TP3 is the third reduction price; E is the entry price, R is the stop loss distance, and MP is the stop loss price.
8. The financial quantitative trading method according to claim 7, characterized in that: In step S3, the transaction triggering conditions include: When the first position reduction price is reached, the trading system triggers a trading response behavior of the investment subject corresponding to selling 50% of the overall position; When the second position reduction price is reached, the trading system triggers a trading response behavior corresponding to selling the investment subject of the remaining 25% of the overall position; When the third position reduction price is reached, the trading system triggers a transaction response behavior corresponding to selling the remaining investment subject matter; When the stop-profit condition is reached, the trading system triggers a transaction response behavior corresponding to selling the investment subject; The transaction response behavior is generating a sell prompt message or automatically creating a sell order.
9. The financial quantitative trading method according to claim 1, characterized in that: The step S4 comprises: Step S41: determining whether the user still holds the investment object; If yes, go to step S42; If not, stop the transaction process; Step S42: collecting the real-time market price of the investment target object, and determining whether the real-time market price triggers the transaction trigger condition; If yes, go to step S43; If not, go to step S44; Step S43: Sell the investment subject according to the transaction triggering condition, and then turn to step S44; Step S44: adjusting the transaction triggering condition according to the real-time market price, and then returning to step S41.
10. The financial quantitative trading method according to claim 9, characterized in that: The step S44 comprises: Step S441: when the real-time market price meets the rising adjustment threshold relative to the previous reference price, a new stop loss price is generated according to the real-time market price; Step S442: updating the transaction triggering condition according to the stop loss price.
Citation Information
Patent Citations
Quantitative transaction strategy test method and device
CN117078423A