Fusion option pricing interpreter based on Heston model and random forest

By combining the Heston model and random forest, the fused option pricing interpreter solves the problems of option pricing inaccuracy and computational complexity in the existing technology, improves the accuracy and efficiency of option pricing in market noise environments, and enhances the accuracy of model output. interpretive.

CN118551291APending Publication Date: 2024-08-27SHANGHAI NORMAL UNIVERSITY +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410265488.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-08
Publication Date
2024-08-27

AI Technical Summary

Technical Problem

Existing option pricing models, such as the Heston model and the random forest model, have problems with pricing inaccuracies and computational complexity when faced with market noise and complex market environments, and the random forest model is difficult to explain its internal decision-making process, which limits the model. Understanding and application of output.

Method used

A fusion option pricing interpreter based on the Heston model and random forest is proposed. By combining the theoretical basis of the Heston model and the data processing capabilities of the random forest, the option pricing model is optimized, and the random forest is used to explain the pricing deviation of the Heston model, thereby improving the accuracy of option pricing. Accuracy and efficiency.

Benefits of technology

It has improved the accuracy and efficiency of option pricing in complex market environments, provided a deeper understanding of option pricing output, and enhanced investor confidence in decision-making.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118551291A
    Figure CN118551291A
Patent Text Reader

Abstract

The embodiment of the invention provides a fusion option pricing interpreter based on a Heston model and a random forest, and relates to the field of financial engineering, in particular to the field of option pricing models. The method comprises the following steps: collecting target data related to option pricing; necessary preprocessing is carried out on the obtained target data to enable the target data to become target input data suitable for being input into an option pricing interpreter; sending the preprocessed target input data into a trained option pricing interpreter to obtain a price prediction value of a target option; wherein the option pricing interpreter is a fusion neural network model based on a Heston model and a random forest, the option pricing interpreter is obtained through training of option price training values and option price predicted values under different sample option types, the option price training values are obtained according to sample data uploaded by a user, and the option price predicted values are obtained according to the sample data uploaded by the user. The option price predicted value is obtained after sample data are input into the option pricing interpreter. According to the method, the theoretical analysis of the Heston model and the data processing advantages of the random forest are combined, the efficiency of option pricing is improved by analyzing the historical prices and the prediction data of the options, the prices of different option types can be accurately predicted, and effective guidance about option decision is provided for users.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of financial engineering, specifically the field of option pricing models, and particularly focuses on the integrated application of the Heston model and the random forest model, aiming to improve the accuracy and interpretability of option pricing. Background Art

[0002] In financial markets, accurate option pricing is crucial for investors and market participants. Existing option pricing models, such as the Heston model, have achieved some success in describing changes in stock prices and volatility. However, due to market complexity and the limitations of the models themselves, these models may exhibit inaccurate pricing in some cases.

[0003] Current option pricing models, including the Heston model and the random forest model, have some shortcomings despite their excellent performance in some cases. The Heston model shows high sensitivity in the face of market noise, which may lead to option pricing bias in the actual market. Involving the solution of stochastic differential equations, its computational complexity may limit its application in real-time scenarios. The model is usually based on the assumption of conditional heteroskedasticity, which may not be in line with the actual situation in some market environments, affecting the accuracy of the model. The random forest model is difficult to explain its internal decision-making process, which limits the in-depth understanding of the model output. When dealing with noisy financial market data, random forests are prone to overfitting, resulting in poor generalization performance on new data. Prior knowledge of option pricing theory is usually not fully utilized, and the special properties of the option market may not be captured in some cases.

[0004] In order to improve the accuracy and interpretability of option pricing, our motivation is to combine the theoretical price of the Heston model as a feature variable, take advantage of the random forest, improve the accuracy of option pricing, and be able to explain the pricing deviation of the Heston model through the output of the random forest. This not only improves the accuracy of pricing, but also increases the understanding of the model output, allowing option investors to more confidently apply this option pricing explainer to make decisions. Summary of the invention

[0005] The purpose of the embodiment of the present application is to propose a fusion option pricing interpreter based on the Heston model and random forest, which can handle a variety of option pricing problems and improve the accuracy and efficiency of option pricing prediction.

[0006] In order to achieve the purpose of option pricing, this embodiment proposes a fusion option pricing interpreter based on the Heston model and random forest. The method includes: first obtaining target data related to option pricing; then preprocessing these data to make them suitable as input for the Heston model and random forest fusion interpreter; then, inputting the processed data into the trained option pricing model to obtain the price prediction of the target option. The option pricing model here combines the theoretical basis of the Heston model and the data processing capability of the random forest, and is optimized by the expected value and predicted value of the option price in the training sample. This method aims to improve the accuracy and efficiency of option pricing in a complex market environment.

[0007] The present application embodiment adopts the following technical solutions:

[0008] In this embodiment, the training steps of the option pricing interpreter based on the fusion of the Heston model and the random forest include: firstly, extracting a training sample set from the data set, and preprocessing these samples to make them suitable for model input; then calculating the expected value of the option price of the training sample; then inputting these data into the option pricing model for price prediction, and obtaining the predicted value of the option price of the training sample; finally, by comparing the predicted value and the expected value of the option price, calculating the loss value of the model, and adjusting the model parameters according to the loss value, thereby optimizing the option pricing model. In addition, the method also includes similar processing of the test sample set to evaluate the performance of the model, which is mainly completed by calculating the mean square error between the predicted value and the actual value of the option price of the test sample.

[0009] In this embodiment, the pricing deviation of the Heston model is explained by the random forest model, and a new estimated price is obtained by combining the theoretical price of the Heston model with the deviation prediction value. The training sample set is preprocessed, and the relevant data (such as time, underlying asset price, etc.) are sampled according to different types of options as the input of the fusion model of Heston and random forest (Heston-SA-RF model). The difference between the actual price of the option and the estimated price of the Heston model is calculated, that is, the residual. Features are selected to explain the residual, specifically including the characteristic variables of the random forest model, and the estimated price of the Heston model is newly added as a characteristic variable to train the model together. After the model training is completed, the test set data is substituted to obtain the residual prediction value, and the call option price estimated by the Heston-SA-RF model is calculated according to the residual prediction value. Finally, the pricing error is calculated, that is, the judgment indicators MAPE and RMSE, which are used to evaluate the model performance. The smaller the value, the better the effect of the model calculation.

[0010] In order to achieve the above-mentioned purpose, the embodiment of the present application proposes an option pricing system that integrates the Heston model and random forest. The system can realize option pricing based on the fusion of these two methods, and includes the following main modules: Data acquisition module (DAM): used to collect target data related to option pricing, which are the key to effective option pricing. Data preprocessing module (DPM): preprocess the collected target data so that these data can be suitable for the input requirements of the Heston model and random forest model fusion interpreter. Option pricing module (OPM): input the preprocessed target data into the pre-trained Heston-SA-RF model to obtain the price prediction value of the target option. The model is trained by sample data under the corresponding type of options, including the expected value and predicted value of the sample option price.

[0011] At least one of the above technical solutions adopted in the embodiments of the present application can achieve the following beneficial effects:

[0012] The embodiment of the present application proposes a fusion option pricing interpreter based on the Heston model and random forest. In the option pricing method based on the Heston model and random forest, the target data related to various option types are first collected; then the data are preprocessed to make them suitable for the input of the fusion model; finally, the preprocessed data is input into the optimized option pricing model to generate predicted prices for different option types. This model combines the theoretical analysis of the Heston model and the data processing advantages of random forests, and improves the efficiency of option pricing by analyzing the historical prices and predicted data of options. This method can accurately predict the prices of different option types, thereby providing users with effective guidance on option decisions. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] Figure 1 It is a framework diagram of an option pricing interpreter based on the fusion of the Heston model and the random forest model provided in an embodiment of the present application;

[0014] Figure 2 It is an optional flow chart of the fusion option pricing interpreter based on the Heston model and random forest provided in the embodiment of the present application;

[0015] Figure 3 It is an optional flow chart of the fusion option pricing interpreter based on the Heston model and random forest provided in the embodiment of the present application;

[0016] Figure 4 It is an optional flow chart of the fusion option pricing interpreter based on the Heston model and random forest provided in the embodiment of the present application;

[0017] Figure 5 It is a detailed flow chart of the fusion option pricing interpreter based on the Heston model and random forest provided in the embodiment of the present application;

[0018] Figure 6 yes Figure 5 An implementation flowchart in step Step5.3;

[0019] Figure 7 yes Figure 5 An implementation flowchart in step Step5.4;

[0020] Figure 8 It is a schematic diagram of the training sample call option price fitting provided in the embodiment of the present application;

[0021] Fig. 9 It is a schematic diagram of the training sample put option price fitting provided in the embodiment of the present application;

[0022] Fig.10 This is a flowchart of the idea implementation of step 5.3;

[0023] Fig.11 It is a functional module diagram of an option pricing interpreter based on the fusion of the Heston model and random forest in an embodiment of the present application;

[0024] Fig.12 It is a comprehensive process framework diagram of the fusion option pricing interpreter based on the Heston model and random forest provided in the embodiment of the present application. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0026] In this application, the option pricing interpreter based on the fusion of the Heston model and the random forest model, although the functional modules are clearly divided in the schematic diagram and the logical order is shown in the flowchart, it should be noted that in some cases, the interpreter may perform the steps shown or described in a manner different from the module division or the flowchart order. In this specification, claims and drawings, the terms "first", "second", etc. are only used to distinguish similar objects, rather than to specify a specific order or sequence of execution.

[0027] Unless otherwise expressly defined, all technical and scientific terms used in this application shall be consistent with the meanings generally understood by professionals in this technical field. These terms are only used for the purpose of describing the embodiments of this application and are not intended to limit the scope of this application. First, several nouns involved in this application are parsed to ensure that the concepts and functions of the option pricing interpreter based on the fusion of the Heston model and the random forest model are clearly explained:

[0028] An option contract is a derivative instrument widely used in financial markets. It first appeared in 1973 and began trading on the Chicago Board Options Exchange. This contract allows the buyer to buy or sell a certain amount of the underlying asset at a predetermined price at a specific time in the future, regardless of how the market price changes.

[0029] Option pricing refers to the amount of money specified in the option contract at which the option buyer can buy or sell the underlying asset. The key factors that determine option prices include the relationship between the current market price of the underlying asset and the option's strike price, the remaining life of the option, the current risk-free interest rate, and the volatility of the underlying asset's price. In short, option pricing is a complex calculation process based on market conditions and the specific properties of the option.

[0030] The price of a call option is the amount the buyer pays for the right to buy an asset (usually a stock) at a specific price on a specific date in the future. Conversely, the price of a put option is the amount the seller pays for the right to sell an asset at a specific price on a specific date in the future.

[0031] The expiration date of an option contract refers to the specific date on which the option contract expires. After the expiration date, the option contract becomes invalid and can no longer be exercised.

[0032] The opening price of an option on the current trading day refers to the price of the option at the beginning of the trading day.

[0033] The exercise price of an option contract refers to the price specified in the option contract at which the buyer can buy (call option) or sell (put option) the underlying asset.

[0034] The previous closing price of an option refers to the closing price of the option contract on the previous trading day.

[0035] The previous settlement price of an option refers to the settlement price of the option at the end of the previous trading day.

[0036] The remaining time to expiration refers to the length of time from the current date to the expiration date of the option contract. This parameter has an important impact on the value of the option.

[0037] Daily logarithmic return refers to an indicator used to measure changes in asset prices. It is calculated by taking the difference between the natural logarithms of asset prices on two consecutive trading days.

[0038] Volatility is calculated through daily logarithmic returns and annualized based on 255 trading days in a year. It is determined by the trading data of the last 60 consecutive trading days.

[0039] The skewness coefficient is calculated through the daily logarithmic return rate and is determined by the trading data of the last 60 consecutive trading days.

[0040] The kurtosis coefficient is calculated through the daily logarithmic return rate and is determined by the trading data of the last 60 consecutive trading days.

[0041] Option pricing is a key tool for controlling investment risks in the financial market. It not only helps investors optimize their investment strategies, but also predicts market trends, thereby achieving higher investment returns. In the field of option pricing, traditional pricing methods such as stochastic differential equation models, tree models, partial differential equation (PDE) methods, and Monte Carlo methods each have their own advantages and limitations. For the Heston model and random forest model described in this application, the Heston model shows high sensitivity in responding to market fluctuations, which may lead to pricing deviations in the actual market environment. Market noise refers to random price fluctuations that cannot be predicted by classical financial theory. These fluctuations may be caused by various factors that are not considered by the model, such as breaking news, market sentiment, etc.; the model involves solving stochastic differential equations, which is computationally quite complex. This complexity may become a limiting factor in real-time trading and fast market analysis because option prices need to be calculated quickly and accurately; the model is usually based on the assumption of conditional heteroskedasticity, which means that it assumes that the volatility of financial markets has certain trends and regularities. However, in a highly dynamic and irregular market environment, these assumptions may no longer be valid, thus affecting the accuracy of the model. As a black box model, the internal decision-making process of the random forest model is difficult to explain. This opacity limits analysts' in-depth understanding of the model output, especially in financial market analysis, where it is crucial to understand how the model makes predictions; when dealing with noisy financial market data, the random forest model is prone to overfitting. Overfitting refers to a situation where a model performs well on training data but performs poorly on new or unseen data. This is particularly critical in financial markets because market data often contains a lot of noise and nonlinear patterns; although random forests perform well in data-driven decision-making, they generally do not make full use of prior knowledge of option pricing theory. This may result in the model failing to capture the special properties of the options market in some cases, such as specific market dynamics or behavioral patterns.

[0042] In response to the above problems, the embodiment of the present application proposes an option pricing interpreter based on the fusion of the Heston model and the random forest model. The interpreter can effectively handle multidimensional option problems and significantly improve the efficiency of option pricing. By integrating the theoretical depth of the Heston model and the data processing capabilities of the random forest, the interpreter provides a new perspective and method for the pricing of complex financial derivatives.

[0043] The option pricing interpreter based on the fusion of the Heston model and the random forest model provided in the embodiments of the present application is described in detail through the following embodiments. First, the system framework and working principle of the interpreter will be introduced to clarify its application mode and advantages in option pricing.

[0044] For example, Figure 1 As shown in Figure 1, the architecture of the interpreter consists of two main parts: data processing unit and user interface. This architecture design aims to optimize the accuracy of option pricing and user experience.

[0045] The data processing unit is the computational core of the option pricing interpreter and is responsible for receiving and processing data from financial markets, such as stock prices, volatility, etc., as well as model parameters set by the user. The data processing unit integrates a fusion algorithm based on the Heston model and random forest. The Heston model provides theoretical insights into market volatility, while the random forest uses its powerful data processing capabilities to optimize the pricing process. After receiving the input data, the unit performs complex computational tasks, including data preprocessing, model training, and option pricing.

[0046] User interface, users can input the required market data and model parameters through this interface, and can also adjust the model settings to adapt to different market conditions. Pricing results will be displayed intuitively on this interface, and users can easily view and analyze pricing results, such as the theoretical price and risk indicators of options.

[0047] The interpreter in the embodiment of the present application utilizes the latest advances in artificial intelligence and machine learning, such as deep learning and natural language processing, to improve the accuracy and efficiency of data processing. Basic technologies such as cloud computing services, big data processing, and distributed storage provide the interpreter with the necessary computing resources and data processing capabilities. The interpreter can be deployed in different computing environments, including personal computers, professional servers, or cloud platforms, to ensure efficient operation in a variety of computing needs and environments. When it is necessary to process large amounts of data or conduct high-frequency trading, the interpreter can run in a distributed computing environment, using multiple computing units to work together to improve processing speed and efficiency.

[0048] The above details show the detailed architecture and functions of the option pricing explainer based on the fusion of the Heston model and random forest, highlighting its ability to handle complex financial data and provide user-friendly interactions. By integrating advanced AI technology and traditional financial pricing models, the explainer aims to provide financial market participants with a powerful and intuitive tool for more accurate and efficient option pricing.

[0049] In all embodiments of the present application, especially when processing sensitive data involving user identity or characteristics, such as user information, user behavior data, historical data, and user location information, the present application always adheres to obtaining the explicit permission or consent of the user. The present application will strictly comply with applicable national and regional laws, regulations, and standards when collecting, using, and processing these data. This means that all data operations will be carried out within the legal framework and ethical standards. In particular, when it is necessary to collect sensitive personal information of users, the present application will take additional measures to protect user privacy and data security. This includes but is not limited to prompting through pop-up windows, jumping to the confirmation page, etc., to ensure that the user can express his or her permission or consent individually and explicitly. Only after the user's separate permission or consent is clearly obtained, the present application will obtain the user-related data necessary for the normal operation of the embodiment. In short, the embodiments of the present application have the highest degree of respect and attention to user privacy and data security, ensuring that all operations are carried out with the informed consent of the user, while complying with relevant legal and ethical standards.

[0050] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.

[0051] like Figure 2 As shown, Figure 2 is an optional flow chart of the fusion option pricing interpreter based on the Heston model and random forest provided in the embodiment of the present application. Figure 2 The method may include but is not limited to Step 2.1 to Step 2.3.

[0052] Step 2.1, collect target data related to option pricing, which is crucial for implementing the Heston model and random forest fusion interpreter.

[0053] Step 2.2, perform necessary preprocessing on the acquired target data to make it suitable for input into the Heston-SA-RF model.

[0054] Step 2.3, the preprocessed target input data is fed into the trained Heston-SA-RF model to obtain the target option price prediction value. The Heston-SA-RF model here is trained with sample data of different types of options, including the expected value and predicted value of the sample option price.

[0055] In some embodiments, target data can be obtained from public platforms, interfaces, and open source data, which are the key basis for executing option pricing.

[0056] In some embodiments, the directly acquired target data may not be suitable for direct input into the Heston-SA-RF model, and therefore needs to be preprocessed and converted into a data format that can be used for model input.

[0057] In some embodiments, on the one hand, an expected value calculation is performed to obtain an expected price of a test sample, and on the other hand, the test sample is input into the Heston-SA-RF model for price prediction. By comparing the predicted price with the expected price, a loss value is calculated, and this loss value is used to adjust and optimize the Heston-SA-RF model.

[0058] In some embodiments, a specific stop condition may be set to terminate the training of the Heston-SA-RF model, for example, the number of iterations is set to 1000. The model is adjusted according to the calculated loss value until the preset stop condition is reached.

[0059] It should be noted that the termination condition of the model training can be set according to the specific situation, such as the loss value being lower than a specific threshold or other conditions, and this embodiment does not make specific requirements.

[0060] The option pricing model can also process multiple option types by training different types of option sample data and output corresponding predicted prices. The description of this embodiment only represents the best practice and is not specifically limited.

[0061] The trained Heston-SA-RF model can process the input target data and output the corresponding option price prediction value. Since the model is based on the combination of the Heston model and the random forest algorithm, it has the ability to handle multi-dimensional option pricing problems and can effectively improve the efficiency and accuracy of option pricing.

[0062] like Figure 3 As shown, Figure 3 is an optional flow chart of the fusion option pricing interpreter based on the Heston model and random forest provided in the embodiment of the present application. Figure 3 The method may include but is not limited to Step 3.1 to Step 3.5.

[0063] Step 3.1, collect sample data sets from relevant options markets and select data sets suitable for training.

[0064] Step 3.2, perform necessary data processing on the selected training dataset to ensure that its format and structure meet the input requirements of the Heston model and random forest model fusion interpreter.

[0065] Step 3.3, use the processed data and the Heston model to calculate the theoretical price of the option, which will be used as the expected value in subsequent steps.

[0066] Step 3.4, input the processed training data into the Heston-SA-RF model, execute the model to predict option prices, and generate option price prediction values ​​for the training samples.

[0067] Step 3.5, by comparing the predicted value with the expected value, calculate the loss value of the model, and adjust the Heston-SA-RF model parameters accordingly to optimize and improve the model.

[0068] In some embodiments, the sample data set can be obtained through public market data, relevant API interfaces or open source data, and the training sample set is divided accordingly. Generally, depending on the size of the data set, about 80% of the data is used to train the Heston-SA-RF model.

[0069] It should be emphasized that the division ratio of the training sample set can be flexibly adjusted according to demand to meet the training objectives of the Heston-SA-RF model.

[0070] In some embodiments, the acquired training sample set contains information related to options, which needs to be properly preprocessed to conform to the input format of the Heston-SA-RF model.

[0071] In some embodiments, it is necessary to calculate the expected value of the training samples to obtain the theoretical price of the option, and to input the training data into the model for actual price prediction. By comparing the theoretical price with the predicted price, the loss value of the option is calculated, and the model parameters are adjusted using this loss value to obtain the optimized Heston-SA-RF model.

[0072] like Figure 4 As shown, Figure 4 is an optional flow chart of the fusion option pricing interpreter based on the Heston model and random forest provided in the embodiment of the present application. Figure 4 The method may include but is not limited to Step 4.1 to Step 4.5.

[0073] Step 4.1, collect and screen sample data sets suitable for model testing, and obtain the test sample set from them.

[0074] Step 4.2, perform necessary preprocessing on the acquired test sample set to meet the input requirements of the Heston-SA-RF model and form test sample data suitable for input.

[0075] Step 4.3, calculate the expected value of the preprocessed test sample data to obtain the theoretical option price of the test sample.

[0076] Step 4.4, input the test sample data into the Heston-SA-RF model, execute the model to predict the option price, and generate the option price prediction value of the test sample.

[0077] Step 4.5, based on the predicted value and expected value of the option price of the test sample, calculate the mean square error (MSE) of the option, and evaluate the performance of the Heston-SA-RF model based on the MSE. The smaller the mean square error, the higher the prediction accuracy of the model; the larger the mean square error, the lower the prediction accuracy of the model.

[0078] In some embodiments, the sample data set can be obtained through public market data, relevant API interfaces or open source data. Depending on the size of the data set, usually about 20% of the data is used as a test sample set to evaluate the effect of the Heston-SA-RF model.

[0079] It should be pointed out that the division ratio of the test sample set can be flexibly adjusted as needed, as long as it meets the test purpose of the Heston-SA-RF model.

[0080] In some embodiments, the acquired test sample set contains information related to option trading, and before being input into the Heston-SA-RF model, this information needs to be properly preprocessed to ensure that its format and structure are suitable for model input.

[0081] In some embodiments, on the one hand, it is necessary to calculate the expected value of the theoretical price of the test sample, and on the other hand, it is necessary to input the test sample data into the Heston-SA-RF model to predict the option price. By comparing the theoretical price of the test sample with the predicted price, the mean square error is calculated, and the error value is used to evaluate the effect of the model. Generally, a smaller mean square error indicates that the model has a better prediction effect.

[0082] like Figure 5 As shown, Figure 5This is a detailed flow chart of the fusion option pricing interpreter based on the Heston model and random forest provided in the embodiment of the present application. In some embodiments (taking call options as an example), the option pricing process can be carried out as follows:

[0083] In this embodiment, the random forest model is used to explain the pricing deviation of the Heston model, and a new estimated price is obtained by combining the Heston model theoretical price and the deviation prediction value:

[0084] Step 5.1, according to different types of options, relevant data (such as time, underlying asset price, etc.) are sampled as input to the Heston and random forest fusion model (Heston-SA-RF model).

[0085] Step 5.2, initialization of training parameters of Heston-SA-RF model.

[0086] Step 5.3, calculate the difference between the actual option price and the estimated price of the Heston model, that is, the residual, which is specifically expressed as: .

[0087] Step 5.4, select features to explain the residuals, including the feature variables of the random forest model, and newly add the estimated price of the Heston model as a feature variable to train the model together.

[0088] Step 5.5, after the model training is completed, substitute the test set data to obtain the residual prediction value, that is, .

[0089] Here, Heston represents the estimated price of call options obtained by the Heston model.

[0090] Step 5.6, calculate the call option price estimated by the Heston-SA-RF model based on the residual prediction value. The calculation formula is: .

[0091] Step 5.7, finally calculate the pricing error, that is, the judgment indicators MAPE and RMSE, which are used to evaluate the model performance. The smaller the value, the better the model calculation effect.

[0092] like Figure 6 As shown, Figure 6 yes Figure 5 An implementation flow chart of step 5.3. In some embodiments, step 5.3 may include steps 6.1 to 6.3:

[0093] Step 6.1, simulated annealing algorithm estimates Heston model parameters , the parameter ranges are , , , , .

[0094] Step 6.2, after obtaining the parameter estimates in the Heston model, the Heston model is now used to calculate the estimated option price. According to the factors involved in the model, there are option strike price, underlying asset price, remaining expiration time and risk-free interest rate. Corresponding to the collected data, the Heston model theoretical prices in the call and put option categories are: , .

[0095] Where SA represents the parameter sequence to be estimated obtained using the simulated annealing algorithm.

[0096] Step 6.3, in this embodiment, the difference between the actual option price and the estimated price of the Heston model, i.e., the residual, is calculated, which is specifically expressed as: .

[0097] In this embodiment, the simulated annealing algorithm is used to adjust the parameters in the Heston model. Estimate. Let the parameter space be , the estimated value of the parameter to be estimated in the final Heston model The expression is:

[0098] in Represents the theoretical price of a call option under the Heston model.

[0099] In this embodiment, the parameter estimation value of each trading day is calculated based on the trading day, and the estimated option price corresponding to each exercise price on the trading day is calculated accordingly. N is the sample size, which represents the sample size of the trading day being calculated.

[0100] Set the maximum number of iterations of the simulated annealing algorithm , initial temperature According to the parameter value ranges in relevant literature, the parameter ranges are , , , , .

[0101] Since in each iteration, the parameters need to be continuously updated using random numbers, the random number generation rule is: if the parameter , No. Step location , then from the normal distribution Generate random numbers ,like , then take ; If not, generate another random number to satisfy the range setting. , it should be noted that it is also necessary to meet .

[0102] In this embodiment, the temperature is set to ,in represents the number of iterations, It reflects the temperature drop and is set to 0.95, indicating that the temperature changes by 5% each time. The algorithm implementation and parameter update are as follows: Now the objective function is required The minimum point of Step location , the temperature is , No. The algorithm is:

[0103] (1) Generate random numbers according to specified rules .

[0104] (2) Generate a random number from a uniform distribution (0, 1) .

[0105] (3) The generation principle is ,in .

[0106] in represents the probability of accepting the new solution.

[0107] (4) Temperature Updated to .

[0108] like Figure 7 As shown, Figure 7 yes Figure 5 An implementation flow chart of step 5.4, in some embodiments, step 5.3 may include steps 7.1 to 7.3:

[0109] Step 7.1, on the basis of the inherent important variables (K, St, t, r), add the option's opening price open on the current trading day, the previous closing price precls, the previous settlement price settle and the 60-day volatility sigma, and use a total of 8 characteristic variables to explain the option price.

[0110] Step 7.2, substitute the training set into the random forest model for learning, and use the grid search method to optimize the number of decision trees in the forest (n_estimators) and the maximum depth of the tree (max_depth). Set the parameter criterion = 'mse', that is, use MSE as the standard for feature selection, as an indicator of the branching quality of the regression tree, and use the default values ​​for the other parameters.

[0111] Step 7.3, get the call and put option pricing model based on the random forest model and , bringing the test set data (i.e. the original data set) into the model will get the prediction results, which are: , .

[0112] Step 7.4, add the theoretical estimated price obtained by the Heston model in Step 5.3 as a feature variable to the random forest model, and let the model be RF (Heston), then we have , .

[0113] Step 7.5, train the model together.

[0114] In this embodiment, the Heston-SA-RF model predicts the gap between the theoretical price and the actual price of an option. On the basis of obtaining the theoretical price using a mechanism-based model, the estimated pricing deviation is referred to, so that the final model price is closer to the actual price of the option.

[0115] like Figure 8 and Fig. 9 As shown, Figure 8 A schematic diagram of the training sample call option price fitting provided in the embodiment of the present application, Fig. 9 Schematic diagram of the training sample put option price fitting provided in the embodiment of the present application. Under the Heston-SA-RF model, the points in the figure are evenly distributed on the straight line. y=x , and compared with the option price fitting of other pricing models, the points in the figure are closer to the straight line, and the overall fitting is better. In addition, Figure 8 and Fig. 9 There is no serious deviation from the straight line y=x The point is that the Heston-SA-RF model has a lower probability of serious mispricing and performs better overall.

[0116] In some embodiments, the model of step 5.3 can be explained as follows:

[0117] In this embodiment, random forest is an integrated learning algorithm based on decision trees as the base classifier, which can be used to solve classification and regression problems. Multiple weak classifiers are integrated into a strong classifier, and the results of the weak classifiers are voted or averaged to obtain the final result, so that the result of the overall model has higher accuracy and generalization performance. The random forest algorithm extracts samples from the training set through the bootstrap resampling technique to ensure that the randomness of the samples is very effective in reducing the variance of the model, and can achieve better generalization ability and anti-overfitting ability, so random forest generally does not require additional pruning. :

[0118] Random forest uses CART decision tree as a weak classifier and is applied to regression problems. For the input training data set , the space given by the dataset is recursively divided into sub-regions, and finally the regression tree is output .

[0119] like Fig.10 As shown, Fig.10 This is a flowchart of the idea of ​​implementing step 5.3. In some embodiments, the idea of ​​applying random forest to regression problems includes steps 10.1 to 10.3:

[0120] Step 10.1, determine the optimal segmentation feature With the cut point ,satisfy .

[0121] in

[0122]

[0123] is the mean of the explained variable in the region and is used as the output value in the region.

[0124] Step 10.2, continue to repeat the above division operation on the divided sub-regions until the proposed stop condition is met, and finally obtain K divided sub-regions .

[0125] Step 10.3, generate decision tree and output .

[0126] like Fig.11 As shown, Fig.11 The functional module diagram of the option pricing interpreter based on the fusion of the Heston model and random forest in this embodiment is shown. This embodiment provides an option pricing system that combines the Heston model and random forest. The system can realize option pricing based on the fusion of these two methods, including the following main modules:

[0127] Data Acquisition Module (DAM): used to collect target data related to option pricing, which is the key to effective option pricing.

[0128] Data preprocessing module (DPM): preprocesses the collected target data so that the data can be suitable for the input requirements of the Heston model and random forest model fusion interpreter.

[0129] Option Pricing Module (OPM): Input the pre-processed target data into the pre-trained Heston-SA-RF model to obtain the price forecast of the target option. The model is trained with sample data of the corresponding type of options, including the expected value and forecast value of the sample option price.

[0130] In some embodiments, the pre-processed target data is input into the option pricing model. The model trained with the training sample set can effectively predict the price of these data, thereby generating option price prediction values, providing an important reference for the user's option trading decision.

[0131] In some embodiments, the sample data set can be obtained through a public platform, interface, and open source data. According to the size of the data set, a training sample set for training the Heston-SA-RF model is generally divided at a ratio of 80%.

[0132] In some embodiments, the training sample set needs to be preprocessed to ensure that its format and structure are suitable for input into the Heston-SA-RF model.

[0133] In some embodiments, it is necessary to perform expected value calculation on the training sample data to obtain the expected value of the option price of the training sample, and at the same time, input the training sample data into the option pricing model for price prediction to obtain the predicted value of the option price of the training sample. Afterwards, by comparing the predicted value and the expected value, the option loss value is calculated, and the model parameters are adjusted using this loss value.

[0134] In some embodiments, a specific termination condition can be set to stop the model training, for example, when the number of iterations reaches 1000. If the set number of iterations is not reached, the training sample data is continuously input and the model is adjusted according to the option loss value.

[0135] In some embodiments, it is also necessary to calculate the expected value of the test sample data and input it into the option pricing model for price prediction so that the trained model can be evaluated by the mean square error.

[0136] The specific implementation of the option pricing system based on the fusion of the Heston model and the random forest in this embodiment is basically the same as the embodiment of the above fusion method. In addition, based on the requirements of this embodiment, the option pricing system can also be provided with other functional modules to achieve a wider range of option pricing applications.

[0137] In this embodiment, the example of the fusion option pricing interpreter based on the Heston model and random forest is only used to more clearly illustrate the technical solution of this embodiment, and does not impose limitations on the technical solution provided by this embodiment. Technical experts should understand that with the advancement of technology and the emergence of new application scenarios, the technical solution provided by this embodiment is also applicable to solving similar technical problems.

[0138] Technical experts can understand that the technical solutions shown in this embodiment are not limitations of this embodiment. The actual implementation may include more or fewer steps than those in the schematic diagram, or some steps may be combined, or a different order of steps may be used.

[0139] The device embodiments described are exemplary only. The units shown as separate components can be physically separated, centralized, or even distributed across multiple network units. Some or all of the modules can be selected to achieve the objectives of this embodiment as needed.

[0140] Technical experts may understand that all or part of the steps in the disclosed method, the functional modules or units in the system may be implemented by software, firmware, hardware or a suitable combination thereof.

[0141] The terms "first", "second", etc. in this specification and the drawings are used to distinguish similar objects rather than to describe a specific order. These terms can be interchanged where appropriate so that the present embodiment can be implemented in a manner other than the order shown or described. The terms "including" and "having" are intended to cover non-exclusive inclusion, that is, the steps or units included are not limited to those explicitly listed, and may also include other steps or units that are not explicitly listed or inherent.

[0142] In this application, "at least one" and "several" mean one or more, and "multiple" means two or more. The term "and / or" describes the relationship between associated objects and can represent three situations: only A exists, only B exists, and both A and B exist. "At least one of the following" refers to any combination of these items.

[0143] In several embodiments provided in this embodiment, the disclosed system and method can be implemented in other ways. For example, the described system embodiment is only exemplary, and the division of the above units is only a logical function division, and other division methods can be used in actual implementation.

[0144] The units described as separate components may or may not be physically separate and may be located in one place or distributed across multiple network units.

[0145] Each functional unit may be integrated into one processing unit, or may exist physically independently, or two or more units may be integrated into one unit. These units may be implemented in the form of hardware or in the form of software functional units.

[0146] If implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this, the technical solution of this embodiment or part of it can be embodied in the form of a software product, which is stored in a storage medium and contains multiple instructions to enable a computer device to execute all or part of the steps of the method of this embodiment. The storage medium includes a USB flash drive, a hard disk, etc.

[0147] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims

1. A fusion option pricing interpreter based on Heston model and random forest, characterized by: The method comprises: Collect target data relevant to option pricing; Perform necessary preprocessing on the acquired target data to make it suitable for input into the Heston-SA-RF model; The preprocessed target input data is fed into the trained Heston-SA-RF model to obtain the price forecast value of the target option; Among them, the option pricing interpreter is the Heston-SA-RF model, and the Heston-SA-RF model here is trained by sample data of different types of options, including expected values ​​and predicted values ​​of sample option prices. The expected value of the sample option price comes from the input sample data, and the predicted value of the sample option price is obtained by outputting the sample data after inputting it into the option pricing interpreter.

2. The method for solving option pricing based on the fusion of Heston model and random forest according to claim 1, characterized in that: The option pricing interpreter is trained by the following steps, including: Collect sample data sets from relevant option markets and select data sets suitable for training; Perform necessary data processing on the selected training dataset to ensure that its format and structure meet the input requirements of the option pricing interpreter; Input data of the training sample and calculate the theoretical price of the option in combination with the Heston model as the expected value for subsequent steps; Inputting the training sample input data into the option pricing interpreter, executing the Heston-SA-RF model to predict option prices, and generating option price prediction values ​​for the training samples; The loss value of the option pricing model is calculated based on the predicted value of the training sample option price and the expected value of the training sample option price, and the parameters of the option pricing interpreter are adjusted based on the option loss value to optimize and improve the option pricing interpreter.

3. The fusion option pricing method based on Heston model and random forest according to claim 2 is characterized in that: The method further comprises: Collect sample data sets from relevant option markets and select data sets suitable for testing; Perform necessary data processing on the selected test dataset to ensure that its format and structure meet the input requirements of the option pricing interpreter; Input data of the test sample and calculate the theoretical price of the option in combination with the Heston model as the expected value for subsequent steps; Inputting the test sample input data into the option pricing interpreter, executing the Heston-SA-RF model to predict option prices, and generating option price prediction values ​​for the test sample; The loss value of the option pricing model is calculated based on the predicted value of the test sample option price and the expected value of the training sample option price, and the performance of the option pricing interpreter is evaluated based on the option loss value.

4. The fusion option pricing method based on Heston model and random forest according to claim 2 is characterized in that: The method further comprises: According to different types of options, relevant data (such as time, underlying asset price, etc.) are sampled as input to the option pricing interpreter; Initializing training parameters of the option pricing interpreter; Calculate the difference between the actual option price and the estimated price of the Heston model in the option pricing explainer, i.e., the residual; Select features to explain the residuals, specifically including the feature variables of the random forest model, and newly add the estimated price of the Heston model as a feature variable to jointly train the option pricing explainer; After the model training of the option pricing interpreter is completed, the test set data is substituted to obtain the residual prediction value, and the option price estimated by the option pricing model is calculated according to the residual prediction value; The option pricing interpreter error is calculated to evaluate the performance of the option pricing model.

5. The fusion option pricing method based on Heston model and random forest according to claim 4 is characterized in that: The estimated price of the Heston model in the Option Pricing Explainer is calculated, including: Estimate the Heston model parameters of the option pricing interpreter using a simulated annealing algorithm; After obtaining the parameter estimates in the Heston model of the option pricing interpreter, the Heston model is used to calculate the estimated option price, according to the factors involved in the model, including the option strike price, the underlying asset price, the remaining expiration time and the risk-free interest rate, corresponding to the collected data; the theoretical prices of the Heston model of the option pricing interpreter are: , , Where SA represents the parameter sequence to be estimated obtained using the simulated annealing algorithm.

6. The fusion option pricing method based on Heston model and random forest according to claim 4 is characterized in that: Performing feature selection on the option pricing explainer includes: On the basis of inherent important variables, the opening price of the current trading day, the previous closing price, the previous settlement price and the 60-day volatility of the option are added, and a total of 8 characteristic variables are used to explain the option price; Substitute the training samples into the random forest model for learning, and use the grid search method to optimize the number of decision trees in the forest and the maximum depth of the tree, set the parameters, use MSE as the standard for feature selection, as an indicator of the quality of the regression tree branch, and take the default values ​​for the other parameters; The option pricing model based on the random forest model is obtained. The prediction results will be obtained by bringing the test set data into the model, which are: , ; The theoretical estimated price obtained by the Heston model in the option pricing interpreter is added as a feature variable to the random forest model, and the model is denoted as RF(Heston). Then, , 。 7. A fusion option pricing interpreter system based on Heston model and random forest, characterized in that: When the option pricing interpreter system is executed by a processor, the option pricing method based on the Heston-SA-RF model according to any one of claims 1 to 7 is implemented. The interpreter includes: Data Acquisition Module (DAM): used to collect target data related to option pricing; Data Preprocessing Module (DPM): preprocesses the collected target data so that it can be suitable for the input requirements of the Heston model and random forest model fusion interpreter; Option Pricing Module (OPM): Input the pre-processed target data into the pre-trained Heston-SA-RF model to obtain the price forecast of the target option. The model is trained with sample data of the corresponding type of options, including the expected value and forecast value of the sample option price.