CN113342879B - Sample coupon data display method, device and equipment based on cubic spline function - Google Patents

Sample coupon data display method, device and equipment based on cubic spline function Download PDF

Info

Publication number
CN113342879B
CN113342879B CN202110734621.2A CN202110734621A CN113342879B CN 113342879 B CN113342879 B CN 113342879B CN 202110734621 A CN202110734621 A CN 202110734621A CN 113342879 B CN113342879 B CN 113342879B
Authority
CN
China
Prior art keywords
target display
sample
display point
target
sequence
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
CN202110734621.2A
Other languages
Chinese (zh)
Other versions
CN113342879A (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.)
Ping An Asset Management Co Ltd
Original Assignee
Ping An Asset Management 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 Ping An Asset Management Co Ltd filed Critical Ping An Asset Management Co Ltd
Priority to CN202110734621.2A priority Critical patent/CN113342879B/en
Publication of CN113342879A publication Critical patent/CN113342879A/en
Application granted granted Critical
Publication of CN113342879B publication Critical patent/CN113342879B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2474Sequence data queries, e.g. querying versioned data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/248Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Abstract

The application relates to a sample coupon data display method, device and equipment based on a cubic spline function. The display method comprises the following steps: obtaining sample coupons, and sequencing sample coupon data according to expiration time limit to obtain a target sequence; counting the number of the acquired sample coupon data, and obtaining the number of target display points according to the number of the sample coupon data; determining the minimum value and the maximum value of the position corresponding to the target display point according to a preset rule; determining an intermediate value of a position corresponding to the target display point according to the number of the target display points, the number of the sample coupon data and the target sequence; and displaying the sample coupon data according to the obtained target display point sequence. The yield calculation method comprises the following steps: acquiring a target display point sequence; and constructing a cubic spline function according to the target display point sequence and the basis function, and calculating to obtain a yield curve. By adopting the method, the reasonable target display point can be ensured, and the correct yield curve can be further ensured. The present application also relates to blockchain techniques in which yield curves may be stored in blockchain nodes.

Description

Sample coupon data display method, device and equipment based on cubic spline function
Technical Field
The application relates to the technical field of artificial intelligence, in particular to a sample coupon data display method, device and equipment based on a cubic spline function.
Background
With the development of artificial intelligence technology, the calculation method of the yield curve is more and more intelligent, and the construction method of the yield curve mainly comprises a parameter method and an nonparametric method. The parameter method mainly uses Nelson and Siegel and an expansion model thereof as main flows, firstly determines a spot interest rate curve expression containing parameters, secondly estimates the price theoretical value of each bond according to the expression, and obtains each parameter value by minimizing the square sum of errors compared with the observed market actual value. The non-parametric method is mainly characterized in that a spline function model is represented by a cubic spline function, a spline basis function is set, the objective function is expressed as a linear combination of the basis functions, the objective function is required to pass through a set target display point, further, the theoretical bond price is estimated according to the objective function, a penalty function is introduced to set an optimization function, and therefore the objective function is obtained, and a yield curve can be obtained. The spline function model can ensure the smoothness of the curve and the flexibility of the curve through the self-definition selection of the target display points, so that the interest rate level of the bond can be more fully described.
However, when the traditional method for constructing the yield curve by utilizing the cubic spline function needs to determine the function target display points, but the current target display points are determined by a clustering method based on statistics, the method is limited by the current market data statistical distribution, key points at the short-term end are easy to be too dense, and key points at the long-term end are easy to be lost, so that the constructed yield curve has severe fluctuation.
Disclosure of Invention
Based on the above, it is necessary to provide a sample coupon data display method, device and equipment based on cubic spline function, which can ensure that the target display point is reasonable, thereby ensuring that the yield curve is correct.
A sample coupon data display method based on a cubic spline function, the sample coupon data display method based on a cubic spline function comprising:
obtaining sample coupons, and sorting the sample coupon data according to an expiration period to obtain a target sequence;
counting the number of the acquired sample ticket data, and calculating the number of target display points according to the number of the sample ticket data;
determining the minimum value and the maximum value of the position corresponding to the target display point according to a preset rule;
Determining an intermediate value of a position corresponding to the target display point according to the number of the target display points, the number of the sample coupon data and the target sequence;
according to the minimum value, the maximum value and the intermediate value of the target display points, a target display point sequence is obtained;
and displaying the sample ticket data according to the target display point sequence and the sample ticket data corresponding to the target display point sequence.
In one embodiment, the determining the intermediate value of the position corresponding to the target display point according to the number of the target display points, the number of the sample ticket data and the target sequence includes:
calculating to obtain a reference position according to the number of the target display points and the number of the sample coupon data;
calculating to obtain a position deviation index according to the number of the target display points, the number of the sample coupon data and the reference position;
and calculating according to the target sequence and the position offset index to obtain an intermediate value of the position corresponding to the target display point.
In one embodiment, the determining, according to a preset rule, a minimum value and a maximum value of a position corresponding to the target display point includes:
adding a negative value and a zero value as minimum values in a short-term segment of the target display point;
And adding an approximate value of the maximum expiration period of the sample coupon data as a maximum value in a long-term section of the target display point.
In one embodiment, after the minimum value, the maximum value and the intermediate value of the target display point are calculated according to the target display point sequence, the method includes:
receiving a narrow error interval for each target display point;
generating constraint conditions according to the narrow error interval;
substituting the target display point sequence into a cubic spline fitting function, and optimizing the positions of all key points in the target display point sequence according to the constraint conditions through a preset nonlinear constraint optimizer.
In one embodiment, the obtaining the sample ticket includes:
and obtaining initial coupons, and carrying out standardization processing on each initial coupon to obtain sample coupon data.
In one embodiment, the normalizing each initial ticket to obtain sample ticket data includes:
filtering according to transaction attributes, interest rates and volume of transactions;
deleting bonds with mobility not meeting the requirement according to the remaining expiration period to obtain bonds to be processed;
grouping the bonds to be processed according to industry classification and rating classification to process sample bond data in each group.
A cubic spline function-based yield calculation method, the cubic spline function-based yield calculation method comprising:
calculating to obtain a target display point sequence according to the sample ticket data display method based on the cubic spline function;
and constructing a cubic spline function according to the target display point sequence and the basis function, and calculating to obtain a yield curve based on the cubic spline function.
A cubic spline function-based sample ticket data display apparatus, the cubic spline function-based sample ticket data display apparatus comprising:
the sequencing module is used for acquiring sample coupons and sequencing the sample coupon data according to an expiration period to obtain a target sequence;
the quantity calculating module is used for counting the quantity of the acquired sample ticket data and calculating the quantity of target display points according to the quantity of the sample ticket data;
the maximum value calculation module is used for determining the minimum value and the maximum value of the position corresponding to the target display point according to a preset rule;
the intermediate value calculation module is used for determining an intermediate value of a position corresponding to the target display point according to the number of the target display points, the number of the sample coupon data and the target sequence;
The first target display point determining module is used for determining a target display point sequence according to the minimum value, the maximum value and the intermediate value of the target display points;
and the display module is used for displaying the sample ticket data according to the target display point sequence and the sample ticket data corresponding to the target display point sequence.
A computer device comprising a memory storing a computer program and a processor implementing the steps of the method of any of the embodiments described above when the computer program is executed.
A computer storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method of any of the embodiments described above.
According to the sample ticket data display method, device and equipment based on the cubic spline function, the number of the target display points is calculated according to the number of the sample ticket data, so that the obtained number of the target display points is matched with the sample ticket data, excessive or insufficient number is avoided, and secondly, the intermediate value of the position corresponding to the target display points is determined according to the number of the target display points, the number of the sample ticket data and the target sequence, so that the intermediate value of the position corresponding to the target display points can be balanced at the position of the number of the target display points, and on the other hand, the real expiration periods in the target sequence are combined, so that the intermediate value of the position corresponding to the target display points can be reasonably spaced, and the displayed sample ticket data is more accurate.
Drawings
FIG. 1 is an application scenario diagram of a sample coupon data display method based on a cubic spline function in one embodiment;
FIG. 2 is a flow chart of a sample coupon data display method based on a cubic spline function in one embodiment;
FIG. 3 is a flowchart illustrating step S208 in the embodiment shown in FIG. 2;
FIG. 4 is a flow chart of a method for computing a yield curve based on a cubic spline function in one embodiment;
FIG. 5 is a block diagram of a sample coupon data display device based on a cubic spline function in one embodiment;
FIG. 6 is a block diagram of a device for calculating a yield curve based on a cubic spline function in one embodiment;
fig. 7 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
The sample ticket data display method based on the cubic spline function can be applied to an application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The server 104 may obtain the sample ticket data uploaded by the terminal 102, and sort the sample ticket data according to the expiration period to obtain a target sequence; counting the number of the acquired sample ticket data, and calculating the number of target display points according to the number of the sample ticket data; determining the minimum value and the maximum value of the position corresponding to the target display point according to a preset rule; determining an intermediate value of a position corresponding to the target display point according to the number of the target display points, the number of the sample coupon data and the target sequence; and displaying the sample coupon data according to the target display point sequence and the sample coupon data corresponding to the target display point sequence. The number of the target display points is calculated according to the number of the sample ticket data, the number of the obtained target display points is matched with the sample ticket data, excessive or insufficient number is avoided, and secondly, the intermediate values of the positions corresponding to the target display points are determined according to the number of the target display points, the number of the sample ticket data and the target sequence, so that the positions of the intermediate values of the positions corresponding to the target display points in the number of the target display points can be balanced, and the actual expiration periods in the target sequence are combined, so that the intermediate values of the positions corresponding to the target display points can be reasonably spaced.
The terminal 102 may be, but not limited to, various personal computers, notebook computers, smartphones, tablet computers, and portable wearable devices, and the server 104 may be implemented by a stand-alone server or a server cluster composed of a plurality of servers.
In one embodiment, as shown in fig. 2, there is provided a sample ticket data display method based on a cubic spline function, which is described by taking the server in fig. 1 as an example, and includes the following steps:
s202: and acquiring sample coupons, and sequencing sample coupon data according to an expiration period to obtain a target sequence.
In particular, the sample coupon data is a bond that is used to calculate a yield curve, which may include, but is not limited to, national bonds, national coupons, credit bonds, and the like, obtained by screening all bonds. Wherein the expiration period refers to the time of expiration of the respective sample ticket data. The server can firstly acquire all bonds in the market, and then screen the bonds according to preset rules to obtain sample bond data meeting the requirements, so that only the sample bond data meeting the requirements are used for subsequent processing.
Specifically, the server sorts the sample ticket data according to the expiration period, for example, sorts the sample ticket data according to a period from small to large to obtain a target sequence, wherein the dimension of the target sequence is the number of the sample ticket data, and each parameter in the target sequence is the expiration period of each sample ticket data.
S204: and counting the number of the acquired sample ticket data, and calculating the number of target display points according to the number of the sample ticket data.
Specifically, the number of sample ticket data, that is, the dimension of the above-described target sequence. The number of the target display points is calculated according to the number of the sample coupon data, and the target display points are needed to be used for representing the points on the yield curve due to the fact that the number of the sample coupon data is large, so that the points on the yield curve are reduced. That is, the target display point refers to a display point on the target curve.
In this embodiment, therefore, the server calculates the number of target display points from the number of sample ticket data, specifically, by the following formula:where floor () represents a downward rounding, n is the number of target display points, and k is the number of sample ticket data.
S206: and determining the minimum value and the maximum value of the position corresponding to the target display point according to a preset rule.
Specifically, the target display point is a point corresponding to an abscissa of the yield curve, and the abscissa is time, which is used to characterize the expiration period of each sample ticket data, so that the server can obtain the minimum value of all sample ticket data as the minimum value of the target display point, and obtain the maximum value of all sample ticket data as the maximum value of the target display point.
S208: and determining the intermediate value of the position corresponding to the target display point according to the number of the target display points, the number of the sample coupon data and the target sequence.
Specifically, the server considers the number of target display points and the number of sample ticket data so as to balance the positions of the target display points in the target sequence, and determines the intermediate value of the positions corresponding to the target display points according to each expiration period in the target sequence and the balance result.
Specifically, the server may calculate, according to the number of target display points and the number of sample ticket data, a reference position of the target display point in the target sequence. The server can calculate the offset degree of the next target display point by taking the current target display point as an initial point according to the number of the target display points and the number of the sample coupon data, and then can calculate the intermediate value of the position corresponding to the final target display point according to the reference position and the offset degree.
S210: and according to the minimum value, the maximum value and the intermediate value of the target display points, a target display point sequence is obtained.
S212: and displaying the sample ticket data according to the target display point sequence and the sample ticket data corresponding to the target display point sequence.
Specifically, connecting the minimum value, the maximum value and the intermediate value of the target display points according to the order of the sizes to obtain a target display point sequence, wherein the dimension of the sequence is the number of the target display points, and each parameter is the minimum value, the maximum value and the intermediate value which are arranged according to the order of the sizes. And then displaying the sample ticket data according to the target display point sequence and the sample ticket data corresponding to the target display point sequence.
In the above embodiment, the number of the target display points is calculated according to the number of the sample ticket data, so that the number of the obtained target display points is guaranteed to be matched with the sample ticket data, excessive or insufficient number is avoided, and secondly, the intermediate value of the position corresponding to the target display point is determined according to the number of the target display points, the number of the sample ticket data and the target sequence, so that on one hand, the intermediate value of the position corresponding to the target display point can be balanced at the position of the number of the target display points, and on the other hand, the actual expiration periods of the target sequence are combined, so that the intermediate value of the position corresponding to the target display point can be reasonably spaced.
In one embodiment, referring to fig. 3, fig. 3 is a schematic diagram of step S208 in the embodiment shown in fig. 2, in this embodiment, step S208, that is, determining an intermediate value of a position corresponding to the target display point according to the number of target display points, the number of sample ticket data, and the target sequence includes:
S302: and calculating according to the number of the target display points and the number of the sample coupon data to obtain a reference position.
Specifically, let m_max be assumed that the short end of the target display point is 0 and the long end is the maximum term of the sample ticket data. Let the number of sample ticket data be k, the sequence formed by the arrangement of all sample ticket data from small to large in expiration period be m, the number of target display points be n, the key point sequence be knots, the knots be n 1 dimension vector, then knots [1] =0, knots [ n ] =m_max. The first key point of the 2 nd to n-1 st key points is circularly determined as follows (ceil () represents a round-up):
wherein h is the reference position.
S304: and calculating according to the number of target display points, the number of sample coupon data and the reference position to obtain a position deviation index.
Specifically, the position offset index calculated by the server is:
s306: and calculating according to the target sequence and the position offset index to obtain an intermediate value of the position corresponding to the target display point.
Specifically, the intermediate value of the position corresponding to the target display point calculated by the server is:
knots[l]=m[h-1]+θ*(m[h]-m[h-1])
wherein, mh-1 is the h-1 parameter in the target sequence, and mh is the h parameter in the target sequence.
In the embodiment, the number of the target display points, the number of the sample coupon data and the target sequence are fully considered, so that the number of the sample coupon data among the points is ensured to be balanced.
In one embodiment, determining, according to a preset rule, a minimum value and a maximum value of a position corresponding to the target display point includes: adding a negative value and a zero value as minimum values in a short-term segment of the target display point; and adding an approximate value of the maximum expiration period of the sample coupon data as a maximum value in a long-term section of the target display point.
Specifically, in order to reduce the fluctuation of the short end of the curve term and the trend and stability of the long end of the holding term, in the embodiment, a negative value and a value of 0 are added to the short end as the target display point with the minimum value, and an approximate value of the maximum expiration term of the continuous bond is added to the long end as the target display point with the maximum value, so that reasonable target display points are ensured to exist on both the short end and the long end. Specifically, on the basis of=knots sequence, the short end is added with-20, -15, 0 as key points, and the long end is added with m_max+20 as key points.
In other embodiments, other points may be added, which do not have an actual physical meaning, simply to smooth the curve.
In the embodiment, the short end and the long end have reasonable target display points by introducing negative values, zero values and approximate values in the calculation process, so that the fluctuation of the short end of the curve period and the trend and the stability of the long end of the holding period are reduced.
In one embodiment, after the minimum value, the maximum value and the intermediate value of the target display point are calculated, the method includes: receiving a narrow error interval for each target display point; generating constraint conditions according to the narrow error interval; substituting the target display point sequence into a cubic spline fitting function, and optimizing the positions of all key points in the target display point sequence according to constraint conditions by a preset nonlinear constraint optimizer.
Specifically, after determining the positions of the target display points knots sequences, the server further sets a narrow error interval range where each target display point can change, and uses the narrow error interval range as a constraint condition, and the target display points are subjected to substitution into a cubic spline fitting function, and the positions of the target display points are optimized again through a nonlinear constraint optimizer of a mystin module in Python, so that the finally selected target display points are obtained.
The narrow error interval can be set by a user according to the needs and represents the variation amplitude of a specific target display point.
In one embodiment, obtaining sample tickets includes: and obtaining initial coupons, and carrying out standardization processing on each initial coupon to obtain sample coupon data.
In one embodiment, the normalizing the initial coupons to obtain sample coupon data includes: filtering according to transaction attributes, interest rates and volume of transactions; deleting bonds with mobility not meeting the requirement according to the remaining expiration period to obtain bonds to be processed; the bonds to be processed are grouped according to industry classification and rating classification to process the sample bond data in each group.
In particular, the filtering process in the normalization process of the sample coupon data may be classified, for example, by contemplating, normalized screening of bonds with sufficient sample being retained: the method comprises the steps of screening regional common bonds according to the aspects of use of collected funds, evaluation and selection procedures of green projects, tracking management of the collected funds, requirements for issuing relevant annual reports and the like, such as removing green bonds, secondary development or replacement bonds and counter-issued bonds, wherein the use of green bonds, secondary development or replacement bonds in the collection of funds, the evaluation and selection procedures of the green projects, the tracking management of the collected funds, requirements for issuing relevant annual reports and the like are different from the common bonds, counter-issued bonds are traded in the counter-trade market and bonds traded in the trade market and the trade market are different from the common bonds, and the step aims to screen out the common bonds and the counter-issued bonds in the inter-market and trade market and the like; secondly, removing non-fixed interest rate bonds, wherein fixed interest rate bonds are taken as the main part in the market, and removed floating interest rate bonds and the like are different from fixed interest rate bond pricing mechanisms, so that the method is not suitable for reflecting the integral pricing condition of the market; and finally, removing bonds with the transaction amount of 0, and ensuring that the screened sample bond data has certain fluidity.
While credit debts, i.e. short-melt, medium-ticket, public company debts, contain rights debts, but require a use of a line-of-rights estimate. Firstly, removing non-public bonds such as perpetual bonds, securities with guaranty, asset support securities, repayment bonds in advance, PPN and the like, and screening more common credit bonds which are issued by public markets and do not contain special terms; secondly, removing the debt with non-fixed interest rate as well; finally, since credit debt is lighter, no demand is made for the amount of credit.
Specifically, deleting bonds whose liquidity does not meet the requirement according to the remaining expiration period to obtain pending bonds may include: and replacing the sample of the national debt at the short term end, and removing the sample with low fluidity as much as possible. Bonds with active transactions and large amounts of transactions are more directed to the variation of market yields, and therefore it is important to screen and process sample coupon data based on liquidity. The mobility of the close expired bonds is poor, the transaction price is severe, and the real supply and demand relation of the market cannot be reflected, so that when a risk-free yield curve is constructed, the server can remove national bonds within 1 month of the remaining expiration period and replace the national bonds with mortgage type purchase samples with better mobility. The replacement of the short-end sample of the time limit of the risk-free yield curve enables the display of the price of the short end to be more accurate, avoids the influence of abnormal bargain of the bond with poor liquidity, and solves the problems that the short-end curve of the time limit greatly fluctuates, the morphological change is severe, and even abnormal hanging-over occurs, so that the price is difficult to serve as a price reference.
The final classification according to industry classification and rating classification may be classification according to a pre-trained model, wherein the industry classification includes: coal, oil and gas exploitation services, agriculture, forestry, animal husbandry, steel, colored and nonmetallic exploitation services, chemical industry, equipment manufacturing, electronic equipment and devices, light industry spinning clothing, national railway, power grid, power generation, utility, transportation, building materials, real estate, architecture, automobiles, household appliances, information technology and services, food and beverage, business retail, cultural media, medical care, social services, integration, others, securities, insurance, trust, leases, financial asset management companies, comprehensive financial companies, other financial enterprises; the rating classification may then be defined by the user, for example by a quantitative rating model, which may output a subject quantitative credit rating, in particular trained from historical data. The division of credit bonds ensures better distinction between curves of different bond classifications, and the representativeness of the curves to the market price of one type of bond is improved. By adopting the credit rating in the scheme, the arrangement of the yield curves with different ratings is more orderly, the curves with high ratings are lower, the curves with low ratings are upper, and the curve crossing situations are less.
In the above embodiment, the standardized sample coupon data selection helps the yield curve better reflect market prices, reducing the impact of special sample coupon data on curve pricing.
In one embodiment, as shown in fig. 4, a method for calculating a yield based on a cubic spline function is provided, and the method is applied to the server in fig. 1 for illustration, and includes the following steps:
s402: according to the sample ticket data display method based on the cubic spline function in any one of the embodiments, the target display point sequence is calculated.
In particular, the specific definition of this step can be found above and will not be repeated here.
S404: and constructing a cubic spline function according to the target display point sequence and the basis function, and calculating to obtain a yield curve based on the cubic spline function.
Specifically, the server constructs a cubic spline function f (t, beta) as an interest rate function according to the target display point and the basis function, wherein beta is a parameter set to be estimated. Let the number of target display points be K, then the function be a linear combination of k+2 cubic spline basis functions, where the cubic spline basis functions are cubic polynomial equations.
The server makes the estimated price vector of all bonds (total N) based on f (t, beta) be pi (beta) = (pi) 1 (β)、π 2 (β)、...、π n (β)), the bond actual price vector is p= (P) 1 、P 2 、...、P n ). Solving beta by optimizing the following least square problem with penalty term to obtain the interest rate function and curve:
where λ is the smoothness factor.
It should be emphasized that to further ensure privacy and security of the sample coupon, the target display point sequence, and the yield curve, the sample coupon, the target display point sequence, and the yield curve may also be stored in a blockchain node.
It should be understood that, although the steps in the flowcharts of fig. 2 to 4 are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in fig. 2-4 may include multiple sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor does the order in which the sub-steps or stages are performed necessarily occur in sequence, but may be performed alternately or alternately with at least a portion of other steps or sub-steps or stages of other steps.
In one embodiment, as shown in fig. 5, there is provided a sample ticket data display apparatus based on a cubic spline function, including: a ranking module 100, a number calculation module 200, a maximum calculation module 300, an intermediate value calculation module 400, a first target display point determination module 500, and a display module 600, wherein:
the sorting module 100 is configured to obtain a sample coupon, and sort sample coupon data according to an expiration period to obtain a target sequence;
the number calculating module 200 is configured to count the number of the obtained sample coupon data, and calculate the number of the target display points according to the number of the sample coupon data;
the maximum value calculation module 300 is configured to determine a minimum value and a maximum value of a position corresponding to the target display point according to a preset rule;
the intermediate value calculating module 400 is configured to determine an intermediate value of a position corresponding to the target display point according to the number of target display points, the number of sample coupon data, and the target sequence;
a first target display point determining module 500, configured to determine a target display point sequence according to a minimum value, a maximum value, and a median value of the target display points;
and the display module 600 is configured to display the sample ticket data according to the target display point sequence and the sample ticket data corresponding to the target display point sequence.
In one embodiment, the intermediate value calculation module 400 includes:
the reference position determining unit is used for calculating a reference position according to the number of target display points and the number of sample coupon data;
a position deviation index calculation unit for calculating a position deviation index according to the number of target display points, the number of sample coupon data and the reference position;
and the intermediate value calculation unit is used for calculating and obtaining the intermediate value of the position corresponding to the target display point according to the target sequence and the position deviation index.
In one embodiment, the maximum value calculation module 300 includes:
a minimum value calculation unit for adding a negative value and a zero value as a minimum value in a short-term section of the target display point;
and a maximum value calculation unit for adding the approximate value of the maximum expiration period of the sample ticket data as the maximum value in the long-term section of the target display point.
In one embodiment, the sample ticket data display apparatus based on the cubic spline function further includes:
the receiving module is used for receiving the narrow error interval aiming at each target display point;
the constraint condition generation module is used for generating constraint conditions according to the narrow error interval;
and the optimization module is used for substituting the target display point sequence into the cubic spline fitting function, and optimizing the positions of all key points in the target display point sequence according to constraint conditions through a preset nonlinear constraint optimizer.
In one embodiment, the sorting module 100 is further configured to obtain initial coupons, and perform normalization processing on each initial coupon to obtain sample coupon data.
In one embodiment, the sorting module 100 includes:
the filtering unit is used for filtering according to the transaction attribute, the interest rate and the volume of the transaction;
a deleting unit for deleting the bonds with mobility not meeting the requirement according to the remaining expiration period to obtain bonds to be processed;
and the grouping unit is used for grouping bonds to be processed according to industry classification and rating classification so as to process the sample bond data in each grouping.
In one embodiment, as shown in fig. 6, there is provided a cubic spline function-based yield calculation apparatus, including: a second target display point determination module 700 and a curve generation module 800, wherein:
a second target display point determining module 700, configured to calculate a target display point sequence according to the sample coupon data display method based on the cubic spline function in any one of the foregoing embodiments;
the curve generating module 800 is configured to construct a cubic spline function according to the target display point sequence and the basis function, and calculate a yield curve based on the cubic spline function.
For the specific definition of the cubic spline function-based sample ticket data display apparatus and the cubic spline function-based yield calculation apparatus, reference may be made to the above definition of the cubic spline function-based sample ticket data display method and the cubic spline function-based yield calculation method, and the description thereof will be omitted. The respective modules in the above-described cubic spline function-based sample ticket data display apparatus and cubic spline function-based yield calculation apparatus may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 7. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used to store sample tickets and a yield curve. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program, when executed by a processor, implements a sample ticket data display method based on a cubic spline function and a yield calculation method based on a cubic spline function.
It will be appreciated by those skilled in the art that the structure shown in FIG. 7 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In one embodiment, a computer device is provided comprising a memory storing a computer program and a processor that when executing the computer program performs the steps of: obtaining sample coupons, and sequencing sample coupon data according to expiration dates to obtain a target sequence; counting the number of the acquired sample ticket data, and calculating the number of target display points according to the number of the sample ticket data; determining the minimum value and the maximum value of the position corresponding to the target display point according to a preset rule; determining an intermediate value of a position corresponding to the target display point according to the number of the target display points, the number of the sample coupon data and the target sequence; and displaying the sample coupon data according to the target display point sequence and the sample coupon data corresponding to the target display point sequence.
In one embodiment, determining the intermediate value of the position corresponding to the target display point according to the number of target display points, the number of sample ticket data and the target sequence, which is implemented when the processor executes the computer program, includes: calculating to obtain a reference position according to the number of target display points and the number of sample coupon data; calculating to obtain a position deviation index according to the number of target display points, the number of sample coupon data and the reference position; and calculating according to the target sequence and the position offset index to obtain an intermediate value of the position corresponding to the target display point.
In one embodiment, determining, by the processor, a minimum value and a maximum value of a position corresponding to the target display point according to a preset rule, where the minimum value and the maximum value are implemented when the processor executes the computer program, includes: adding a negative value and a zero value as minimum values in a short-term segment of the target display point; and adding an approximate value of the maximum expiration period of the sample coupon data as a maximum value in a long-term section of the target display point.
In one embodiment, after the processor executes the computer program to implement the sequence of target display points according to the minimum value, the maximum value and the intermediate value of the target display points, the method comprises: receiving a narrow error interval for each target display point; generating constraint conditions according to the narrow error interval; substituting the target display point sequence into a cubic spline fitting function, and optimizing the positions of all key points in the target display point sequence according to constraint conditions by a preset nonlinear constraint optimizer.
In one embodiment, the acquisition of sample tickets implemented when the processor executes a computer program includes: and obtaining initial coupons, and carrying out standardization processing on each initial coupon to obtain sample coupon data.
In one embodiment, the normalization of each initial coupon to sample coupon data implemented when the processor executes the computer program comprises: filtering according to transaction attributes, interest rates and volume of transactions; deleting bonds with mobility not meeting the requirement according to the remaining expiration period to obtain bonds to be processed; the bonds to be processed are grouped according to industry classification and rating classification to process the sample bond data in each group.
In one embodiment, a computer device is provided comprising a memory storing a computer program and a processor that when executing the computer program performs the steps of: according to any one of the above embodiments, a sample coupon data display method based on a cubic spline function is calculated to obtain a target display point sequence; and constructing a cubic spline function according to the target display point sequence and the basis function, and calculating to obtain a yield curve based on the cubic spline function.
In one embodiment, a computer storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of: obtaining sample coupons, and sequencing sample coupon data according to expiration dates to obtain a target sequence; counting the number of the acquired sample ticket data, and calculating the number of target display points according to the number of the sample ticket data; determining the minimum value and the maximum value of the position corresponding to the target display point according to a preset rule; determining an intermediate value of a position corresponding to the target display point according to the number of the target display points, the number of the sample coupon data and the target sequence; and displaying the sample coupon data according to the target display point sequence and the sample coupon data corresponding to the target display point sequence.
In one embodiment, the computer program, when executed by the processor, determines an intermediate value for a location corresponding to the target display point based on the number of target display points, the number of sample coupon data, and the target sequence, comprising: calculating to obtain a reference position according to the number of target display points and the number of sample coupon data; calculating to obtain a position deviation index according to the number of target display points, the number of sample coupon data and the reference position; and calculating according to the target sequence and the position offset index to obtain an intermediate value of the position corresponding to the target display point.
In one embodiment, determining the minimum and maximum values of the positions corresponding to the target display points according to the preset rules, which is implemented when the computer program is executed by the processor, includes: adding a negative value and a zero value as minimum values in a short-term segment of the target display point; and adding an approximate value of the maximum expiration period of the sample coupon data as a maximum value in a long-term section of the target display point.
In one embodiment, after the computer program is executed by the processor to implement a sequence of target display points according to the minimum value, the maximum value, and the intermediate value of the target display points, the method comprises: receiving a narrow error interval for each target display point; generating constraint conditions according to the narrow error interval; substituting the target display point sequence into a cubic spline fitting function, and optimizing the positions of all key points in the target display point sequence according to constraint conditions by a preset nonlinear constraint optimizer.
In one embodiment, the acquisition of sample tickets implemented when the computer program is executed by a processor comprises: and obtaining initial coupons, and carrying out standardization processing on each initial coupon to obtain sample coupon data.
In one embodiment, the normalization of each initial coupon to sample coupon data, when the computer program is executed by the processor, comprises: filtering according to transaction attributes, interest rates and volume of transactions; deleting bonds with mobility not meeting the requirement according to the remaining expiration period to obtain bonds to be processed; the bonds to be processed are grouped according to industry classification and rating classification to process the sample bond data in each group.
In one embodiment, a computer storage medium is provided having a computer program stored thereon, which when executed by a processor, performs the steps of: according to any one of the above embodiments, a sample coupon data display method based on a cubic spline function is calculated to obtain a target display point sequence; and constructing a cubic spline function according to the target display point sequence and the basis function, and calculating to obtain a yield curve based on the cubic spline function.
The blockchain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanism, encryption algorithm and the like. The Blockchain (Blockchain), which is essentially a decentralised database, is a string of data blocks that are generated by cryptographic means in association, each data block containing a batch of information of network transactions for verifying the validity of the information (anti-counterfeiting) and generating the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, an application services layer, and the like.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include non-volatile and/or volatile memory. The nonvolatile memory can include Read Only Memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), memory bus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), among others.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The above examples illustrate only a few embodiments of the application, which are described in detail and are not to be construed as limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of protection of the present application is to be determined by the appended claims.

Claims (10)

1. The sample coupon data display method based on the cubic spline function is characterized by comprising the following steps of:
acquiring sample coupon data, and sequencing the sample coupon data according to an expiration period to obtain a target sequence;
counting the number of the acquired sample ticket data, and calculating the number of target display points according to the number of the sample ticket data;
Determining the minimum value and the maximum value of the position corresponding to the target display point according to a preset rule;
determining an intermediate value of a position corresponding to the target display point according to the number of the target display points, the number of the sample coupon data and the target sequence;
according to the minimum value, the maximum value and the intermediate value of the target display points, a target display point sequence is obtained;
displaying the sample ticket data according to the target display point sequence and the sample ticket data corresponding to the target display point sequence;
the determining the minimum value and the maximum value of the position corresponding to the target display point according to the preset rule comprises the following steps:
adding a negative value and a zero value as minimum values in a short-term segment of the target display point;
adding an approximation of the maximum expiration period of the sample coupon data as a maximum value at a long-term segment of the target display point;
the determining the intermediate value of the position corresponding to the target display point according to the number of the target display points, the number of the sample coupon data and the target sequence comprises the following steps:
calculating to obtain a reference position according to the number of the target display points and the number of the sample coupon data;
calculating to obtain a position deviation index according to the number of the target display points, the number of the sample coupon data and the reference position;
And calculating according to the target sequence and the position offset index to obtain an intermediate value of the position corresponding to the target display point.
2. The sample ticket data display method based on a cubic spline function according to claim 1, wherein after the minimum value, the maximum value and the intermediate value according to the target display point are set, comprising:
receiving a narrow error interval for each target display point;
generating constraint conditions according to the narrow error interval;
substituting the target display point sequence into a cubic spline fitting function, and optimizing the positions of all key points in the target display point sequence according to the constraint conditions through a preset nonlinear constraint optimizer.
3. The method for displaying sample ticket data based on cubic spline function according to claim 1, wherein the acquiring sample ticket comprises:
and obtaining initial coupons, and carrying out standardization processing on each initial coupon to obtain sample coupon data.
4. The method for displaying sample ticket data based on cubic spline function according to claim 3, wherein the normalizing each initial ticket to obtain sample ticket data comprises:
filtering according to transaction attributes, interest rates and volume of transactions;
Deleting bonds with mobility not meeting the requirement according to the remaining expiration period to obtain bonds to be processed;
grouping the bonds to be processed according to industry classification and rating classification to process sample bond data in each group.
5. The method for calculating the yield based on the cubic spline function is characterized by comprising the following steps of:
calculating a target display point sequence according to the target display points by adopting the sample ticket data display method based on the cubic spline function as claimed in any one of claims 1 to 4;
and constructing a cubic spline function according to the target display point sequence and the basis function, and calculating to obtain a yield curve based on the cubic spline function.
6. A cubic spline function-based sample ticket data display apparatus, characterized in that the cubic spline function-based sample ticket data display apparatus comprises:
the sorting module is used for acquiring sample coupons and sorting the sample coupon data according to the expiration period to obtain a target sequence;
the quantity calculating module is used for counting the quantity of the acquired sample ticket data and calculating the quantity of target display points according to the quantity of the sample ticket data;
The maximum value calculation module is used for determining the minimum value and the maximum value of the position corresponding to the target display point according to a preset rule;
the intermediate value calculation module is used for determining an intermediate value of a position corresponding to the target display point according to the number of the target display points, the number of the sample coupon data and the target sequence;
the first target display point determining module is used for determining a target display point sequence according to the minimum value, the maximum value and the intermediate value of the target display points;
the display module is used for displaying the sample ticket data according to the target display point sequence and the sample ticket data corresponding to the target display point sequence;
the maximum value calculation module comprises:
a minimum value calculation unit for adding a negative value and a zero value as a minimum value in a short-term section of the target display point;
a maximum value calculation unit for adding an approximate value of a maximum expiration period of the sample ticket data as a maximum value in a long-term section of the target display point;
the intermediate value calculation module includes:
a reference position determining unit, configured to calculate a reference position according to the number of the target display points and the number of the sample coupon data;
a position deviation index calculation unit for calculating a position deviation index according to the number of the target display points, the number of the sample coupon data and the reference position;
And the intermediate value calculation unit is used for calculating and obtaining the intermediate value of the position corresponding to the target display point according to the target sequence and the position deviation index.
7. The cubic spline-based sample ticket data display apparatus of claim 6, further comprising:
the receiving module is used for receiving the narrow error interval aiming at each target display point;
the constraint condition generation module is used for generating constraint conditions according to the narrow error interval;
and the optimization module is used for substituting the target display point sequence into a cubic spline fitting function, and optimizing the positions of all key points in the target display point sequence according to the constraint conditions through a preset nonlinear constraint optimizer.
8. The cubic spline-based sample coupon data display device of claim 6, wherein the ranking module comprises:
the filtering unit is used for filtering according to the transaction attribute, the interest rate and the volume of the transaction;
a deleting unit for deleting the bonds with mobility not meeting the requirement according to the remaining expiration period to obtain bonds to be processed;
and the grouping unit is used for grouping the bonds to be processed according to industry classification and rating classification so as to process the sample bond data in each grouping.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any one of claims 1 to 5 when the computer program is executed.
10. A computer storage medium having stored thereon a computer program, which when executed by a processor realizes the steps of the method according to any of claims 1 to 5.
CN202110734621.2A 2021-06-30 2021-06-30 Sample coupon data display method, device and equipment based on cubic spline function Active CN113342879B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110734621.2A CN113342879B (en) 2021-06-30 2021-06-30 Sample coupon data display method, device and equipment based on cubic spline function

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110734621.2A CN113342879B (en) 2021-06-30 2021-06-30 Sample coupon data display method, device and equipment based on cubic spline function

Publications (2)

Publication Number Publication Date
CN113342879A CN113342879A (en) 2021-09-03
CN113342879B true CN113342879B (en) 2023-09-05

Family

ID=77481686

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110734621.2A Active CN113342879B (en) 2021-06-30 2021-06-30 Sample coupon data display method, device and equipment based on cubic spline function

Country Status (1)

Country Link
CN (1) CN113342879B (en)

Citations (4)

* 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
CN102750651A (en) * 2012-05-31 2012-10-24 中国工商银行股份有限公司 Curve fitting-based device and method for processing data
JP2014029582A (en) * 2012-07-31 2014-02-13 Fujitsu Ltd Curve estimation method and device
CN110335328A (en) * 2019-06-25 2019-10-15 杭州汇萃智能科技有限公司 A kind of curve plotting method based on B-spline, system and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10984016B2 (en) * 2016-12-02 2021-04-20 Persephone GmbH Apparatuses, systems and methods for processing, acknowledging, transferring and custody of assets or rights on a distributed ledger

Patent Citations (4)

* 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
CN102750651A (en) * 2012-05-31 2012-10-24 中国工商银行股份有限公司 Curve fitting-based device and method for processing data
JP2014029582A (en) * 2012-07-31 2014-02-13 Fujitsu Ltd Curve estimation method and device
CN110335328A (en) * 2019-06-25 2019-10-15 杭州汇萃智能科技有限公司 A kind of curve plotting method based on B-spline, system and storage medium

Also Published As

Publication number Publication date
CN113342879A (en) 2021-09-03

Similar Documents

Publication Publication Date Title
Zamore et al. Credit risk research: Review and agenda
Baležentis et al. An integrated assessment of Lithuanian economic sectors based on financial ratios and fuzzy MCDM methods
Chava et al. Modeling the loss distribution
Post et al. Risk aversion and skewness preference
Short et al. A manual for the economic evaluation of energy efficiency and renewable energy technologies
Munk Fixed income modelling
Cuchiero et al. Affine multiple yield curve models
Papageorgiou et al. Multiscale intensity models for single name credit derivatives
Levy et al. Portfolio selection in a two-regime world
Cipiloglu Yildiz et al. A portfolio construction framework using LSTM‐based stock markets forecasting
Braun et al. The impact of private equity on a life insurer's capital charges under solvency II and the Swiss solvency test
Gatzert et al. Portfolio optimization with irreversible long-term investments in renewable energy under policy risk: A mixed-integer multistage stochastic model and a moving-horizon approach
Liu et al. Non-homogeneous volatility correlations in the bivariate multifractal model
Christopoulos et al. Commercial Mortgage‐Backed Securities (CMBS) and Market Efficiency with Respect to Costly Information
Ingermann et al. The recovery rate for retail and commercial customers in Germany: a look at collateral and its adjusted market values
CN113342879B (en) Sample coupon data display method, device and equipment based on cubic spline function
Chae et al. A reexamination of diversification premiums: An information asymmetry perspective
Chava et al. Modeling expected loss
Hwang Predicting issuer credit ratings using generalized estimating equations
Hasan et al. Metal and Mineral Mining Firm’s Equity Valuation in Indonesia Stock Exchange
Niknya et al. Financial distress prediction of Tehran Stock Exchange companies using support vector machine
Chava et al. Modeling expected loss with unobservable heterogeneity
Mirsadeghpour Zoghi et al. The effect of underlying distribution of asset returns on efficiency in DEA models
Momen et al. Modeling the operational risk in Iranian commercial banks: case study of a private bank
Bianchi et al. Italian real estate investment funds: market structure and risk measurement

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