CN110378751B - Option pricing method and system - Google Patents

Option pricing method and system Download PDF

Info

Publication number
CN110378751B
CN110378751B CN201910683742.1A CN201910683742A CN110378751B CN 110378751 B CN110378751 B CN 110378751B CN 201910683742 A CN201910683742 A CN 201910683742A CN 110378751 B CN110378751 B CN 110378751B
Authority
CN
China
Prior art keywords
option
price
pricing
delta
target asset
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910683742.1A
Other languages
Chinese (zh)
Other versions
CN110378751A (en
Inventor
李思昌
张勇
方义
张海荣
高鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Financial Futures Information Technology Co ltd
Original Assignee
Shanghai Financial Futures Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Financial Futures Information Technology Co ltd filed Critical Shanghai Financial Futures Information Technology Co ltd
Priority to CN201910683742.1A priority Critical patent/CN110378751B/en
Publication of CN110378751A publication Critical patent/CN110378751A/en
Application granted granted Critical
Publication of CN110378751B publication Critical patent/CN110378751B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0201Market modelling; Market analysis; Collecting market data
    • G06Q30/0206Price or cost determination based on market factors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q40/00Finance; Insurance; Tax strategies; Processing of corporate or income taxes
    • G06Q40/04Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange

Abstract

The invention discloses an option pricing method and system, which meet the high real-time requirement of option pricing and reduce the time complexity of a pricing algorithm. The technical proposal is as follows: dividing a transaction stage into a plurality of time slices, and respectively carrying out the following data preparation stage and real-time pricing stage on each time slice; clearing the hash table; splitting the target asset price; traversing each split target asset price, substituting the split target asset price and option execution price into an option pricing formula, calculating corresponding option theory price and Greek letter risk value, and obtaining a preset vector; all preset vectors are stored in a hash table, and then a real-time pricing stage is carried out; receiving a current market price for a target asset; searching a preset vector corresponding to the closest option theoretical price in the hash table; and carrying out Taylor interpolation calculation on the current market price, option theory price and corresponding preset vectors of the target asset, completing option pricing, and entering the processing of the next time slice until the end.

Description

Option pricing method and system
Technical Field
The invention relates to the field of financial futures, in particular to a method and a system for pricing, which are suitable for option trading software systems.
Background
One of the most important uses of options is to manage risk, and to effectively manage risk, the option must be correctly assessed, and the process of calculating the theoretical price of the option is generally called option pricing. In an option trading software system, option pricing belongs to a core business process. The option pricing models which are more commonly used at present are a Black-Scholes model (BS model for short), a binary tree model and the like.
The BS pricing model is the basis of option pricing and is mainly used to calculate the price of the euro option. In 1973 Black and Scholes published classical papers on option pricing, option pricing and corporate debt, BS pricing models were proposed. The basic idea of BS option pricing method is: the price of the derivative asset and the price of the target asset on which it depends are all affected by the same uncertainty factor, both following the same wiener process. If the wiener process can be eliminated by creating an asset portfolio that contains the appropriate derivative asset position and the target asset position, the earnings of the target asset position and the derivative asset position can cancel each other out. The portfolio thus constituted is a risk-free portfolio whose profit should be equal to the risk-free benefit without the risk-free equity opportunity, whereby a BS differential equation of derived asset price can be derived. And obtaining the BS pricing formula by solving the differential equation. The BS option pricing formula is as follows:
c=S 0 N(d 1 )-Ke -rt N(d 2 )
p=Ke -rt N(-d 2 )-S 0 N(-d 1 )
Figure BDA0002145561600000011
Figure BDA0002145561600000021
wherein c and p respectively represent prices of European rising and falling options, S 0 For the target asset price, K is the option execution price, r is the risk-free interest rate of continuous compound claims, sigma is the price fluctuation rate, T is the expiration time of option, and N (x) is the cumulative probability distribution function of standard normal distribution variables.
Binary tree option pricing models are proposed by CoxROSS and Rubinstein. The binary tree method not only can price the European option, but also can price the American option, and has strong applicability. The binary tree model decomposes the time of expiration of the expiration weight into potentially a large number of time intervals. As shown in FIG. 1, assume that during each time interval, the stock price is either from S 0 Move upward to S 0 u, or move down to S 0 d. At the end of the binary tree, i.e., the expiration date of the option, the option value of each possible stock price is known, equal to their intrinsic value. Assuming that the benefit function at the due date option is determined only by the value of the subject asset, and therefore is genericAfter each time interval, the option price of each step is calculated by recursion calculation. The recursive pricing process is based on the assumption that the risk neutrality, the expected benefits of a stock are risk-free benefits. Let the expected yield of stocks be u, the risk-free yield be r, and for each step of the binary tree derivation there is:
Figure BDA0002145561600000022
Figure BDA0002145561600000023
Figure BDA0002145561600000024
in option trading software systems, the performance requirements for option pricing are extremely high. In the option trading process, the market price change frequency of a standard contract is usually in the millisecond level, and the system needs to price option contracts under a plurality of series at the same time. The BS pricing model needs to solve differential equations, and the binary tree model needs to be solved in a recursive iteration mode, so that if parameters are directly substituted into the models to calculate, the time complexity of the algorithm is too high, and microsecond option pricing is difficult to achieve.
Disclosure of Invention
The following presents a simplified summary of one or more aspects in order to provide a basic understanding of such aspects. This summary is not an extensive overview of all contemplated aspects, and is intended to neither identify key or critical elements of all aspects nor delineate the scope of any or all aspects. Its sole purpose is to present some concepts of one or more aspects in a simplified form as a prelude to the more detailed description that is presented later.
The invention aims to solve the problems, and provides an option pricing method and system, which meet the requirement of an option trading software system on high real-time performance of option pricing and reduce the time complexity of a pricing algorithm.
The technical scheme of the invention is as follows: the invention discloses an option pricing method, which comprises the following steps:
dividing a transaction stage into a plurality of time slices, and respectively carrying out the following data preparation stage and real-time pricing stage on each time slice;
the data preparation phase includes the following processing:
clearing the hash table;
splitting the target asset price;
traversing each split target asset price, substituting each target asset price and option execution price into an option pricing formula, calculating a corresponding option theoretical price and a corresponding Greek letter risk value, and obtaining a preset vector;
all preset vectors obtained after the traversal is finished are stored in a hash table, and then a real-time pricing stage is carried out;
the real-time pricing phase includes the following processes:
receiving a current market price for a target asset;
searching a preset vector corresponding to the option theoretical price closest to the current market price of the target asset in the hash table;
and carrying out Taylor interpolation calculation on the current market price, option theory price and corresponding preset vectors of the target asset, completing option pricing, and entering the processing of the next time slice until the processing of all the time slices is finished.
According to an embodiment of the option pricing method of the present invention, the step of obtaining the preset vector further comprises:
traversing the target asset price sequence S, for each target asset price S i The four-element vector is obtained through the following steps:
(1) Price S of target i Substituting option pricing formula to calculate option price P i
The option pricing formula is as follows:
P call =S i N(d 1 )-Ke -rt N(d 2 )
P put =Ke -rt N(-d 2 )-S i N(-d 1 )
Figure BDA0002145561600000041
Figure BDA0002145561600000042
wherein c and p respectively represent prices of European rising and falling options, S i For the target asset price, K is the priority execution price, r is the risk-free rate of continuous compound claims, sigma is the price volatility, T is the expiration time of the option, T is the current time, N (x) is the cumulative probability distribution function of the standard normal distribution variable,
if the corresponding option is the expansion option, P i Taking P call Value, if the corresponding option is the falling option, P i Taking P put A value;
(2) Price S of target i Substituting the Delta calculation formula to obtain Delta i
Delta call =e -r(T-t) N(d 1 )
Delta put =e -r(T-t) (N(d 1 )-1)
Wherein e is natural logarithm, r is risk-free interest rate, T is expiration time of option, T is current time, N (x) is cumulative probability distribution function of standard normal distribution variable, d 1 For the intermediate result calculated in step (1),
if the corresponding option is the expansion option, delta i Delta is taken call Value, if the corresponding option is the traumatic option, delta i Delta is taken put A value;
(3) Price S of target i Substituting the Gamma calculation formula to obtain Gamma i
Figure BDA0002145561600000043
Wherein e is natural logarithm, r is risk-free interest rate, a is price fluctuation rate, T is expiration time of option, T is current time, N' (x) is probability density function of standard normal distribution, d 1 The intermediate result obtained by calculation in the step (1).
According to an embodiment of the option pricing method of the present invention, the step of performing taylor interpolation calculation further includes:
in the current time slice, the formula of Taylor interpolation calculation is as follows:
Figure BDA0002145561600000044
where S is the current market price of the subject asset, S i For the target asset price closest to S in the hash table, P i Delta for the calculated option theory price i And Gamma (Gamma) i For Greek letter risk value in option calculation, (S) i ,P i ,Delta i ,Gamma i ) The preset vectors of the quadruples are formed.
According to one embodiment of the option pricing method of the present invention, the data preparation phase and the real-time pricing phase are performed synchronously in different threads, respectively, and data interaction is performed between the two threads through a hash table.
The invention also discloses an option pricing system, which comprises:
a processor; and
a memory configured to store a series of computer-executable instructions and computer-accessible data associated with the series of computer-executable instructions,
wherein the series of computer executable instructions, when executed by the processor, cause the processor to perform the method as described above.
Also disclosed is a non-transitory computer-readable storage medium having stored thereon a series of computer-executable instructions that, when executed by a computing device, cause the computing device to perform a method as previously described.
The invention also discloses an option pricing system, which comprises:
a data preparation module for performing pre-computation within each time slice, comprising:
the hash table emptying unit is used for emptying the data in the hash table;
a splitting unit for splitting the target asset price;
the preset vector calculation unit traverses each split target asset price, substitutes each target asset price and option execution price into an option pricing formula, calculates a corresponding option theoretical price and a corresponding Greek letter risk value, and obtains a preset vector;
the vector storage unit is used for storing all preset vectors obtained after the traversal is finished into a hash table;
a real-time pricing module for option pricing by binomial calculation, comprising:
a market price receiving unit that receives a current market price of the target asset;
the query unit is used for searching a preset vector corresponding to the nearest option theoretical price in the hash table according to the current market price of the target asset;
and the interpolation calculation unit is used for carrying out Taylor interpolation calculation on the current market price, option theory price and corresponding preset vectors of the target asset to finish option pricing.
According to an embodiment of the option pricing system of the invention, the preset vector calculation unit is further configured to:
traversing the target asset price sequence S, for each target asset price S i The four-element vector is obtained through the following steps:
(1) Price S of target i Substituting option pricing formula to calculate option price P i
The option pricing formula is as follows:
P call =S i N(d 1 )-Ke -rt N(d 2 )
P put =Ke -rt N(-d 2 )-S i N(-d 1 )
Figure BDA0002145561600000061
Figure BDA0002145561600000062
wherein c and p respectively represent prices of European rising and falling options, S i For the target asset price, K is the priority execution price, r is the risk-free rate of continuous compound claims, sigma is the price volatility, T is the expiration time of the option, T is the current time, N (x) is the cumulative probability distribution function of the standard normal distribution variable,
if the corresponding option is the expansion option, P i Taking P call Value, if the corresponding option is the falling option, P i Taking P put A value;
(2) Price S of target i Substituting the Delta calculation formula to obtain Delta i
Delta call =e -r(T-t) N(d 1 )
Delta put =e -r(T-t) (N(d 1 )-1)
Wherein e is natural logarithm, r is risk-free interest rate, T is expiration time of option, T is current time, N (x) is cumulative probability distribution function of standard normal distribution variable, d 1 For the intermediate result calculated in step (1),
if the corresponding option is the expansion option, delta i Delta is taken call Value, if the corresponding option is the traumatic option, delta i Delta is taken put A value;
(3) Price S of target i Substituting the Gamma calculation formula to obtain Gamma i
Figure BDA0002145561600000071
Wherein e is natural logarithm, r is risk-free interest rate, sigma is price fluctuation rate, T is expiration time of option, T is current time, N' (x) is probability density function of standard normal distribution, d 1 The intermediate result obtained by calculation in the step (1).
According to an embodiment of the option pricing system of the invention, the interpolation calculation unit is further configured to calculate, in the current time slice, a formula of taylor interpolation as:
Figure BDA0002145561600000072
where S is the current market price of the subject asset, S i For the target asset price closest to S in the hash table, P i Delta for the calculated option theory price i And Gamma (Gamma) i For Greek letter risk value in option calculation, (S) i ,P i ,Delta i ,Gamma i ) The preset vectors of the quadruples are formed.
According to one embodiment of the option pricing system of the present invention, the data preparation module and the real-time pricing module are respectively and synchronously performed in different threads, and data interaction is performed between the two threads through a hash table.
Compared with the prior art, the invention has the following beneficial effects: based on the characteristic that the risk value of the option is kept unchanged in a short time, interpolation calculation is performed by using a secondary Taylor expansion method, the option theoretical price is obtained rapidly, and when the method is implemented by software, data preparation and real-time pricing are split into two threads to be executed in parallel, so that the overall delay of option pricing is reduced.
The calculation process of various options pricing models is complex, involves integral calculation and recursive iterative calculation, has high time complexity, and is difficult to meet the requirement of high real-time performance of an option trading software system by directly using a model formula for pricing. Therefore, the invention provides a Taylor expansion interpolation method, which utilizes the characteristic that the Taylor expansion of the option theory price and the Greek letters of the option remain unchanged in a short time, redesigns the option pricing flow, obtains the option theory price by pre-calculating in each time slice and only by simple binomial calculation in the real-time pricing stage, avoids the defect of high calculation complexity of the original option pricing model, ensures the accuracy of the result, can effectively promote the option pricing performance, and is suitable for different pricing models. In addition, at the software implementation level, the multi-thread pricing model is designed according to the invention, and the data preparation and option pricing are split into different threads, so that the overall pricing performance is further improved. The pricing method of the present invention provides a significant performance improvement over methods that directly use pricing formulas for calculation, as described in the following table.
Figure BDA0002145561600000081
/>
Drawings
The above features and advantages of the present invention will be better understood after reading the detailed description of embodiments of the present disclosure in conjunction with the following drawings. In the drawings, the components are not necessarily to scale and components having similar related features or characteristics may have the same or similar reference numerals.
Fig. 1 shows a schematic diagram of a conventional binary tree model.
FIG. 2 illustrates a flow diagram of one embodiment of the option pricing method of the present invention (i.e., interpolation pricing based on Taylor expansion).
Fig. 3 illustrates a flow diagram of the option pricing method of fig. 2 implemented by multithreading.
Fig. 4 illustrates a schematic diagram of an embodiment of an option pricing system of the present invention.
Detailed Description
The invention is described in detail below with reference to the drawings and the specific embodiments. It is noted that the aspects described below in connection with the drawings and the specific embodiments are merely exemplary and should not be construed as limiting the scope of the invention in any way.
The principle of the interpolation pricing method based on Taylor expansion is as follows: the option theoretical price is secondarily expanded using the taylor formula, and the expanded option theoretical price can be expressed as a quadratic polynomial with respect to the risk values delta and gamma. Assuming that the delta and gamma of options remain unchanged for an extreme time interval, a series of option theoretical prices can be calculated in advance using the most recent historical parameters, and the theoretical prices are calculated by linear interpolation when option pricing is performed.
Specifically, the method of the present invention is based on the following assumptions: the greek letter risk value (including delta, gamma, etc.) of the option is kept unchanged for a short time slice (e.g., millisecond time slice). In a time slice, corresponding option theoretical prices are calculated in advance according to the fluctuation rate and other known parameters aiming at a series of target asset prices, then pricing is not needed according to a pricing formula in the time slice, adjacent asset target prices and corresponding theoretical prices are found first, interpolation calculation is carried out through an option theoretical price Taylor expansion, and the current latest theoretical price is obtained.
Before describing the method of the present invention, the principle by which the method of the present invention is implemented will be described.
1. Taylor formula
The taylor formula is a formula where x=x 0 The function f (x) with an nth derivative is used with respect to (x-x) 0 ) Is a method of approximating a function by a polynomial of degree n. If the function f (x) is a function containing x 0 A, b of a certain closed interval [ a, b ]]Having n-th order derivatives thereon and (n+1) -th order derivatives on the open intervals (a, b), then for the closed intervals [ a, b ]]Any point x above, the following holds:
Figure BDA0002145561600000091
wherein f (n) (x) Representing the n-th derivative of f (x).
2. Option greek letter
Options are a financial derivative and their value may be influenced by market factors such as target asset price, deadline, volatility, and risk-free interest. The risk indicators associated with options are commonly referred to as option greek letters, by which the risk of price fluctuations from varying factors can be managed. Common greek letters include Delta, gamma, theta, vega, rho, etc.
Delta is used for measuring the sensitivity of the option price to the change of the futures contract price, the option price is marked as C, the target asset price is marked as F, and the first derivative of the option price is calculated through an option pricing formula to obtain the risk value:
Figure BDA0002145561600000092
gamma is used to measure the sensitivity of option Delta to option price change, from a mathematical perspective, delta is a first order derivative of option price with respect to a target asset price or futures contract price, and then the derivative, namely a second order derivative, of Delta with respect to the target asset price or futures contract price is calculated to obtain Gamma:
Figure BDA0002145561600000101
theta is used to measure the sensitivity of option prices over time. Assuming that other conditions are unchanged, theta measures the magnitude of the change in option price as the duration decreases. Theta is the first derivative of option price C with respect to time t:
Figure BDA0002145561600000102
vega is used to measure the sensitivity of option prices to change in volatility. The option price is C, the fluctuation rate is sigma, and the risk value can be obtained by calculating the first derivative of the fluctuation rate:
Figure BDA0002145561600000103
rho is used to measure how sensitive the option price changes with the interest rate. Assuming that other conditions are unchanged, rho measures the magnitude of the option price as the interest rate changes. Rho is the first derivative of option price C with respect to interest rate r:
Figure BDA0002145561600000104
3. option theory price taylor expansion
The option price is C, the target asset price is S, the expiration time is t, the fluctuation rate is sigma, and the risk-free interest rate is r. And performing second-order expansion on option prices according to a Taylor formula to obtain:
Figure BDA0002145561600000105
in the above formula, O (3) represents a set of expansion terms of the third order and higher.
According to the option Greek letter definition, neglecting higher order terms, there are:
Figure BDA0002145561600000106
in the option theory Taylor expansion, delta, gamma, theta, vega, rho is the option Greek letter, and the definition is detailed in the foregoing.
It is appreciated that option price variations can be represented as quadratic polynomials with respect to option greek letters and are independent of the option pricing model. Through testing, compared with the calculation result of directly using an option pricing formula, the error of the theoretical price obtained by using the quadratic polynomial calculation is not more than 0.1%, so that the option theoretical price can be calculated by using the formula.
The implementation steps of the interpolation pricing method based on taylor expansion in this embodiment are shown in fig. 2, and are described in detail below.
Step S1: the current time slice begins.
In an embodiment of the invention, successive transaction phases are sliced into time slices with a granularity on the order of seconds or milliseconds. In one time slice, option risk values (Delta, gamma, etc.) remain unchanged, and parameters such as risk-free interest rate, fluctuation rate, etc. remain unchanged. The pricing within each time slice is divided into two phases, a data preparation phase for pre-calculation and a real-time pricing phase for real-time option pricing based on target asset quotation, which will be described in detail later.
Step S21: the hash table is emptied.
Step S22: the target asset price is split according to step size (step).
Within a time slice, parameters required for option pricing include known option execution prices, due dates, risk-free rates, volatility, etc., with the only unknown parameter being the target asset price. Setting the variation range of the target asset price in one day as [ a, b ], and setting a step length to obtain an asset price sequence S with the following targets:
S=[a,a+step*1,a+step*2,…,a+step*n]
wherein the method comprises the steps of
Figure BDA0002145561600000111
Totally obtain n+1 target asset prices S i
Step S23: traversing a target asset price S i Substituting each target asset price S i Will S i And parameters such as option execution price are substituted into an option pricing formula of the pricing model to calculate a corresponding option theoretical price P i And corresponding Greek letter risk value Delta i And Gamma (Gamma) i . Thereby, a four-tuple vector (S) i ,P i ,Delta i ,Gamma i ) I.e. a preset vector.
The calculation steps of the preset vector are as follows:
traversing the target asset price sequence S, for each target asset price S i The four-element vector is obtained through the following steps:
(1) Price S of target i Substituting option pricing formula to calculate option price P i
Taking the BS pricing model as an example, the pricing formula is as follows:
P call =S i N(d 1 )-Ke -rt N(d 2 )
P put =Ke -rt N(-d 2 )-S i N(-d 1 )
Figure BDA0002145561600000121
Figure BDA0002145561600000122
wherein c and p respectively represent prices of European rising and falling options, S i For the target asset price, K is the priority execution price, r is the risk-free rate of continuous compound claims, sigma is the price fluctuation rate, T is the expiration time of the option, T is the current time, and N (x) is the cumulative probability distribution function of the standard normal distribution variable.
If the corresponding option is the expansion option, P i Taking P call A value; if the corresponding option is the traumatic option, P i Taking P put Values.
(2) Price S of target i Substituting the Delta calculation formula to obtain Delta i
Delta call =e -r(T-t) N(d 1 )
Delta put =e -r(T-t) (N(d 1 )-1)
Wherein e is natural logarithm, r is risk-free interest rate, T is expiration time of option, T is current time, N (x) is cumulative probability distribution function of standard normal distribution variable, d 1 The intermediate result obtained by calculation in the step (1).
If the corresponding option is the expansion option, delta i Delta is taken call A value; if the corresponding option is a traumatic option, delta i Delta is taken put Values.
(3) Price S of target i Substituting the Gamma calculation formula to obtain Gamma i
Figure BDA0002145561600000131
Wherein e is natural logarithm, r is risk-free interest rate, sigma is price fluctuation rate, T is expiration time of option, T is current time, N' (x) is probability density function of standard normal distribution, d 1 The intermediate result obtained by calculation in the step (1).
Step S24: and (3) saving n+1 preset vectors obtained after the traversal is finished in a hash table, so that quick retrieval is conveniently carried out according to the target asset price S. And then enter the real-time pricing phase.
Step S31: the latest market price for the subject asset is received.
Step S32: searching S closest to S in hash table according to current target asset price S i Corresponding preset vector (S i ,P i ,Delta i ,Gamma i )。
Step S33: asset price S and S i Corresponding preset vector (S i ,P i ,Delta i ,Gamma i ) Substituting the value into a Taylor interpolation formula to calculate so as to obtain a theoretical price P.
The taylor expansion of option theory price includes:
Figure BDA0002145561600000132
within one time slice, there is Δt=0, Δσ=0, Δr=0, and thus theoretical value can be obtained:
Figure BDA0002145561600000133
thus, by the known (S i ,P i ,Delta i ,Gamma i ) And the latest asset price S, and the option pricing can be completed through simple binomial calculation.
Step S4: and (3) ending the processing of the current time slice, and entering the processing of the next time slice until all the processing of all the time slices is ended.
In the step shown in fig. 2, data preparation is required first in each time slice, and a preset vector is calculated. When the software is implemented, a multithreading mechanism can be utilized to split data preparation and real-time pricing logic into two threads to synchronously carry out, so that the aim of reducing overall pricing delay is fulfilled. Fig. 3 shows a flow chart for implementing the method shown in fig. 2 by multithreading.
In fig. 3, thread 1 is a data preparation thread for periodically calculating preset vectors and updating the preset vectors to the hash table, and thread 2 is a real-time pricing thread for receiving target quotations and reading the preset vectors from the hash table for option pricing. The two threads perform data interaction through the hash tables, and in order to avoid locking operation, two hash tables are set: before the data preparation thread starts to calculate each time, a hash table is selected in a polling mode, a calculation result is written into the hash table, and after all calculation is completed, the real-time pricing thread is informed to switch to the hash table for pricing.
Fig. 4 illustrates the principles of an embodiment of the option pricing system of the present invention. Referring to fig. 4, the system of the present embodiment includes a data preparation module for performing precomputation in each time slice, and a real-time pricing module for performing option pricing through binomial computation.
The data preparation module includes: the device comprises a hash table emptying unit, a splitting unit, a preset vector calculating unit and a vector storing unit.
The hash table emptying unit is used for emptying the data in the hash table.
The splitting unit is used for splitting the target asset price.
Within a time slice, parameters required for option pricing include known option execution prices, due dates, risk-free rates, volatility, etc., with the only unknown parameter being the target asset price. Setting the variation range of the target asset price in one day as [ a, b ], and setting a step length, the following series of target asset prices can be obtained:
S=[a,a+step*1,a+step*2,…,a+step*n]
wherein the method comprises the steps of
Figure BDA0002145561600000141
Totally obtain n+1 target asset prices S i
And traversing each split target asset price in a preset vector calculation unit, substituting each target asset price and option execution price into an option pricing formula, and calculating a corresponding option theoretical price and a corresponding Greek letter risk value to obtain a preset vector.
The preset vector calculation unit is further configured to … …
The vector storage unit is used for storing all preset vectors obtained after the traversal is finished into the hash table.
The market price receiving unit receives a current market price of the subject asset.
The query unit searches the hash table for a corresponding preset vector of the option theoretical price closest to the current market price of the target asset.
And the interpolation calculation unit carries out Taylor interpolation calculation on the current market price, option theory price and corresponding preset vectors of the target asset to finish option pricing.
The interpolation calculation unit is further configured to calculate, in the current time slice, a taylor interpolation using the formula:
Figure BDA0002145561600000151
where S is the current market price of the subject asset, S i For the target asset price closest to S in the hash table, P i Delta for the calculated option theory price i And Gamma (Gamma) i For Greek letter risk value in option calculation, (S) i ,P i ,Delta i ,Gamma i ) The preset vectors of the quadruples are formed.
The data preparation module and the real-time pricing module are synchronously carried out in different threads respectively, and data interaction is carried out between the two threads through a hash table. To avoid locking operations, two hash tables are set: before the thread of the data preparation module starts to calculate each time, a hash table is selected in a polling mode, a calculation result is written into the hash table, and after all calculation is completed, the thread of the real-time pricing module is notified to switch to the hash table for pricing.
Furthermore, an option pricing system is disclosed comprising a processor and a memory configured to store a series of computer executable instructions and computer accessible data associated with the series of computer executable instructions, wherein the series of computer executable instructions when executed by the processor cause the processor to perform a method as in the previous embodiment. Since the method steps have been described in detail in the foregoing embodiments, they are not described in detail herein.
The invention also discloses a non-transitory computer-readable storage medium having stored thereon a series of computer-executable instructions that, when executed by a computing device, cause the computing device to perform a method as in the previous embodiments. Since the method steps have been described in detail in the foregoing embodiments, they are not described in detail herein.
While, for purposes of simplicity of explanation, the methodologies are shown and described as a series of acts, it is to be understood and appreciated that the methodologies are not limited by the order of acts, as some acts may, in accordance with one or more embodiments, occur in different orders and/or concurrently with other acts from that shown and described herein or not shown and described herein, as would be understood and appreciated by those skilled in the art.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The various illustrative logical blocks, modules, and circuits described in connection with the embodiments disclosed herein may be implemented or performed with a general purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. A general purpose processor may be a microprocessor, but in the alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. A processor may also be implemented as a combination of computing devices, e.g., a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP core, or any other such configuration.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an ASIC. The ASIC may reside in a user terminal. In the alternative, the processor and the storage medium may reside as discrete components in a user terminal.
In one or more exemplary embodiments, the functions described may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software as a computer program product, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. Any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a web site, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Disk (disk) and disc (disk) as used herein include Compact Disc (CD), laser disc, optical disc, digital Versatile Disc (DVD), floppy disk and blu-ray disc where disks (disk) usually reproduce data magnetically, while discs (disk) reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
The previous description of the disclosure is provided to enable any person skilled in the art to make or use the disclosure. Various modifications to the disclosure will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other variations without departing from the spirit or scope of the disclosure. Thus, the disclosure is not intended to be limited to the examples and designs described herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (6)

1. A method of option pricing, comprising:
dividing a transaction stage into a plurality of time slices, and respectively carrying out the following data preparation stage and real-time pricing stage on each time slice;
the data preparation phase includes the following processing:
clearing the hash table;
splitting the target asset price;
traversing each split target asset price, substituting each target asset price and option execution price into an option pricing formula, calculating a corresponding option theoretical price and a corresponding Greek letter risk value, and obtaining a preset vector;
all preset vectors obtained after the traversal is finished are stored in a hash table, and then a real-time pricing stage is carried out;
the real-time pricing phase includes the following processes:
receiving a current market price for a target asset;
searching a preset vector corresponding to the option theoretical price closest to the current market price of the target asset in the hash table;
carrying out Taylor interpolation calculation on the current market price, option theory price and corresponding preset vectors of the target asset, completing option pricing, and entering the processing of the next time slice until the processing of all the time slices is finished;
wherein the step of obtaining the preset vector further comprises:
traversing the target asset price sequence S, for each target asset price S i The four-element vector is obtained through the following steps:
(1) Price S of target i Substituting option pricing formula to calculate option price P i
The option pricing formula is as follows:
P call =S i N(d 1 )-Ke -rt N(d 2 )
P put =Ke -rt N(-d 2 )-S i N(-d 1 )
Figure FDA0004096604130000011
Figure FDA0004096604130000021
wherein c and p respectively represent prices of European rising and falling options, S i For the target asset price, K is the priority execution price, r is the risk-free rate of continuous compound claims, sigma is the price volatility, T is the expiration time of the option, T is the current time, N (x) is the cumulative probability distribution function of the standard normal distribution variable,
if the corresponding option is the expansion option, P i Taking P call Value, if the corresponding option is the falling option, P i Taking P put A value;
(2) Price S of target i Substituting the Delta calculation formula to obtain Delta i
Delta call =e -r(T-t) N(d 1 )
Delta put =e -r(T-t) (N(d 1 )-1)
Wherein e is natural logarithm, r is risk-free interest rate, T is expiration time of option, T is current time, N (x) is cumulative probability distribution function of standard normal distribution variable, d 1 For the intermediate result calculated in step (1),
if the corresponding option is the expansion option, delta i Delta is taken call Value, if the corresponding option is the traumatic option, delta i Delta is taken put A value;
(3) Price S of target i Substituting the Gamma calculation formula to obtain Gamma i
Figure FDA0004096604130000022
Wherein e is natural logarithm, r is risk-free interest rate, and sigma isPrice volatility, T is the expiration time of option, T is the current time, N' (x) is a probability density function of standard normal distribution, d 1 The intermediate result obtained by calculation in the step (1) is obtained;
wherein the step of performing taylor interpolation further comprises:
in the current time slice, the formula of Taylor interpolation calculation is as follows:
Figure FDA0004096604130000023
where S is the current market price of the subject asset, S i For the target asset price closest to S in the hash table, P i Delta for the calculated option theory price i And Gamma (Gamma) i For Greek letter risk value in option calculation, (S) i ,P i ,Delta i ,Gamma i ) The preset vectors of the quadruples are formed.
2. The option pricing method of claim 1, wherein the data preparation phase and the real-time pricing phase are each synchronized within different threads, and wherein data interaction is performed between the two threads via a hash table.
3. An option pricing system, comprising:
a processor; and
a memory configured to store a series of computer-executable instructions and computer-accessible data associated with the series of computer-executable instructions,
wherein the series of computer executable instructions, when executed by the processor, cause the processor to perform the method of any one of claims 1 to 2.
4. A non-transitory computer-readable storage medium having stored thereon a series of computer-executable instructions that, when executed by a computing device, cause the computing device to perform the method of any of claims 1-2.
5. An option pricing system, comprising:
a data preparation module for performing pre-computation within each time slice, comprising:
the hash table emptying unit is used for emptying the data in the hash table;
a splitting unit for splitting the target asset price;
the preset vector calculation unit traverses each split target asset price, substitutes each target asset price and option execution price into an option pricing formula, calculates a corresponding option theoretical price and a corresponding Greek letter risk value, and obtains a preset vector;
the vector storage unit is used for storing all preset vectors obtained after the traversal is finished into a hash table;
a real-time pricing module for option pricing by binomial calculation, comprising:
a market price receiving unit that receives a current market price of the target asset;
the query unit is used for searching a preset vector corresponding to the nearest option theoretical price in the hash table according to the current market price of the target asset;
the interpolation calculation unit is used for carrying out Taylor interpolation calculation on the current market price, option theory price and corresponding preset vectors of the target asset to finish option pricing;
wherein the preset vector calculation unit is further configured to perform the following processing:
traversing the target asset price sequence S, for each target asset price S i The four-element vector is obtained through the following steps:
(1) Price S of target i Substituting option pricing formula to calculate option price P i
The option pricing formula is as follows:
P call =S i N(d 1 )-Ke -rt N(d 2 )
P put =Ke -rt N(-d 2 )-S i N(-d 1 )
Figure FDA0004096604130000041
Figure FDA0004096604130000042
wherein c and p respectively represent prices of European rising and falling options, S i For the target asset price, K is the priority execution price, r is the risk-free rate of continuous compound claims, sigma is the price volatility, T is the expiration time of the option, T is the current time, N (x) is the cumulative probability distribution function of the standard normal distribution variable,
if the corresponding option is the expansion option, P i Taking P call Value, if the corresponding option is the falling option, P i Taking P put A value;
(2) Price S of target i Substituting the Delta calculation formula to obtain Delta i
Delta call =e -r(T-t) N(d 1 )
Delta put =e -r(T-t) (N(d 1 )-1)
Wherein e is natural logarithm, r is risk-free interest rate, T is expiration time of option, T is current time, N (x) is cumulative probability distribution function of standard normal distribution variable, d 1 For the intermediate result calculated in step (1),
if the corresponding option is the expansion option, delta i Delta is taken call Value, if the corresponding option is the traumatic option, delta i Delta is taken put A value;
(3) Price S of target i Substituting the Gamma calculation formula to obtain Gamma i
Figure FDA0004096604130000043
Wherein e is natural logarithm, r is risk-free interest rate, sigma is price fluctuation rate, T is expiration time of option, T is current time, N' (x) is probability density function of standard normal distribution, d 1 The intermediate result obtained by calculation in the step (1) is obtained;
wherein the interpolation calculation unit is further configured to calculate, in the current time slice, a formula of taylor interpolation as follows:
Figure FDA0004096604130000051
where S is the current market price of the subject asset, S i For the target asset price closest to S in the hash table, P i Delta for the calculated option theory price i And Gamma (Gamma) i For Greek letter risk value in option calculation, (S) i ,P i ,Delta i ,Gamma i ) The preset vectors of the quadruples are formed.
6. The option pricing system of claim 5, wherein the data preparation module and the real-time pricing module are each synchronized within different threads, and wherein data interactions between the two threads are via a hash table.
CN201910683742.1A 2019-07-26 2019-07-26 Option pricing method and system Active CN110378751B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910683742.1A CN110378751B (en) 2019-07-26 2019-07-26 Option pricing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910683742.1A CN110378751B (en) 2019-07-26 2019-07-26 Option pricing method and system

Publications (2)

Publication Number Publication Date
CN110378751A CN110378751A (en) 2019-10-25
CN110378751B true CN110378751B (en) 2023-05-09

Family

ID=68256466

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910683742.1A Active CN110378751B (en) 2019-07-26 2019-07-26 Option pricing method and system

Country Status (1)

Country Link
CN (1) CN110378751B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111507837A (en) * 2020-04-10 2020-08-07 浙江万里学院 Option value calculation system based on time fractional order option pricing model
CN111583042B (en) * 2020-05-13 2023-08-18 恒生电子股份有限公司 Method, system, storage medium and electronic device for calculating option real-time data

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101432773A (en) * 2005-04-11 2009-05-13 超级衍生品公司 Method and system of pricing financial instruments
EP2757518A1 (en) * 2013-01-19 2014-07-23 Tata Consultancy Services Limited Globally optimum trading positions for path-dependent options
CN107169807A (en) * 2017-06-30 2017-09-15 广东工业大学 A kind of method of option valuation, apparatus and system

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1856590A4 (en) * 2002-06-18 2007-11-21 Phil Kongtcheu Methods, systems and computer program products to facilitate the formation and trading of derivatives contracts
CN101098255A (en) * 2007-05-25 2008-01-02 清华大学 Option pricing model scheduling algorithm based implementation in interactive gridding system
JP2012123830A (en) * 2012-02-22 2012-06-28 Superderivatives Inc Method and system for pricing financial derivatives
EP3414673A4 (en) * 2016-04-05 2019-10-30 Hewlett-Packard Enterprise Development LP Simulation based on precomputed results of the simulation
US20180060959A1 (en) * 2016-08-30 2018-03-01 David Gershon Option pricing

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101432773A (en) * 2005-04-11 2009-05-13 超级衍生品公司 Method and system of pricing financial instruments
EP2757518A1 (en) * 2013-01-19 2014-07-23 Tata Consultancy Services Limited Globally optimum trading positions for path-dependent options
CN107169807A (en) * 2017-06-30 2017-09-15 广东工业大学 A kind of method of option valuation, apparatus and system

Also Published As

Publication number Publication date
CN110378751A (en) 2019-10-25

Similar Documents

Publication Publication Date Title
CN110378751B (en) Option pricing method and system
CN101432773A (en) Method and system of pricing financial instruments
Almendral et al. Accurate evaluation of European and American options under the CGMY process
Lim et al. Evaluating callable and putable bonds: an eigenfunction expansion approach
Heinisch et al. Bottom-up or direct? Forecasting German GDP in a data-rich environment
Fang et al. Fast valuation and calibration of credit default swaps under Lévy dynamics
Belomestny et al. Semitractability of optimal stopping problems via a weighted stochastic mesh algorithm
CA3060601A1 (en) Systems and methods for projecting data trends
Lorig Indifference prices and implied volatilities
Collet et al. Optimal management of a wind power plant with storage capacity
Carmona et al. The self-financing equation in high frequency markets
CN115936875A (en) Financial product form hanging processing method and device
CN110689436A (en) Strategy retest method and strategy retest system
Le Floc’h et al. Model-free stochastic collocation for an arbitrage-free implied volatility: Part I
Păuna198 Smoothed Heikin-Ashi algorithms optimized for automated trading systems
WO2021051976A1 (en) Financial time sequence synthesis method and device, and storage medium
Breton et al. Approximation of dynamic programs
CN113989048A (en) Investment portfolio management method and device, storage medium and terminal equipment
Wang et al. Dynamic interactions between intraday returns and trading volume on the CSI 300 index futures: an application of an svar model
CN114461734B (en) Dynamic control method and system for knowledge graph subgraph matching
CN113065970A (en) Option implied fluctuation rate and price analysis system based on fusion characteristics
Cho et al. Positive-definite modification of a covariance matrix by minimizing the matrix ℓ∞ norm with applications to portfolio optimization
JP3306806B2 (en) Retirement benefit obligation management device
Musiela et al. Forward exponential indifference valuation in an incomplete binomial model
CN110794778A (en) Method for processing water cooling efficiency value

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant