Embodiment
For making the object of the invention, technical scheme and advantage clearer, below in conjunction with specific embodiment, and with reference to accompanying drawing, to further explain of the present invention.
The term that the present invention relates to and the explanation as follows:
Cash flow day: on the date that cash flow changes, include but not limited to date of expiry, the pay date of bond interest.
Change Business Day Convention (" BDC ") working day: convert nonworkdays (for example: weekend, public holiday) into workaday method, as postpone, adjusting type is postponed.
Name day convention settlement convention: the fate on working day between valuation day and name day (just 0 day is t+0, and 1 day is t+1, and 2 days is t+2).
Conversion expires the end of month: the conversion that expires the end of month is the universal method of sign date of expiry at the end of month.
Par interest rate Par rate: make the equipollent Coupon interest rate of bond price and par interest rate.
Spot interest rate Spot rate:N spot interest rate refers to the interest rate of behind n, recouping capital outlay.All interests and capital are realized at n the year end.So according to this definition, the spot interest rate zero breath interest rate that is otherwise known as.Wherein, N and n are natural number.
Day count conventions Day Count Convention (" DCC "): during each cash flow, need the utilization rules specific to calculate fate and the fate in a year between beginning day and the closing day.A lot of different market rules are arranged when calculating these fates, and these different rules also are called day count conventions.DCC is expressed as usually: and the fate in the date fate in computing interval/calculating place year (for example: 30/360, ACTUAL/360, ACTUAL/ACTUAL).
Time series: to the date sequence of cash flow day series arrangement formation.
Standard point: the data interpolating unit will read its par interest rate ri automatically from data storage device cash flow day.Wherein, r and i are natural number.
On schedule nonstandard: for the cash flow day that calculates that does not have corresponding quotation on the market.
Fig. 1 shows the structured flowchart of the data processing equipment that the present invention is based on curve fitting.As shown in Figure 1, this device comprises: data storage device 1,data pretreatment unit 2,time series device 3,data fitting device 4,data output device 5.
Data storage device 1 is used for the parameter that storage system need use and the result of calculation of follow up device.The parameter that system need use comprises system-level parameters, quotation product sound attitude parameter, marketing data image parameter and term structure request.
System-level parameters comprises that curve makes up the correlation parameters such as the ageing requirement of quotation, data precision scope and circulation threshold values of regulation.
Quotation product static parameter comprises changes the expire calendar correlation parameters such as (for example tabulating festivals or holidays) in conversion and affiliated market of BDC, name day convention settlement convention, day count conventions, the end of month working day of the product of offer.
Quotation product dynamic parameter comprises the quotation product date of expiry that may be read into, issue date, correlation parameter such as interest date first.
The static parameter in the market under the main finger receiving of the marketing data image parameter valency product.Specific targets are with above-mentioned quotation product static parameter.As can't read quotation product static parameter, then system will read its affiliated market static parameter automatically.
Data pretreatment unit 2; Be used to receive the data (the for example efficient market of Reuter quotation) of external data source; And from data storage device 1, read screening rule, and reject the abnormal data that does not meet rule, avoid the final target data accuracy of calculating of this type of data influence.As through ageing screening rule, reject the expired data that surpass date range, improve the accurately fixed of follow-up data.To pass through pretreated data and be stored in the data storage device 1, and send notice totime series device 3.
Time series device 3; Receive the notice thatdata pretreatment unit 2 sends; Correlation parameter of reading of data memory storage 1 (for example name day convention, conversion on working day and date of expiry etc.) and the pretreated data of process; Calculate name day, the date of expiry of each product, and make up time series according to the ordering of cash flow day.Cash flow day is in chronological sequence sorted, and calculate last date of expiry of outputting standard point.
Data fitting device 4; Be used for calculating cash flow day par interest rate through the cubic spline optimization algorithm; Progressively guide method (bootstrapping) to realize three's organic transformation through par interest rate, discount factor, spot interest rate, the loop iteration fitting data reduces the error of calculation.
Data output device 5 is used for after the notice that receivesdata fitting device 4, from data storage device 1, reads the par interest rate (ResultParRatei) of required term structure and offers the user.
Fig. 2 shows the structured flowchart of the time series device in the data processing equipment that the present invention is based on curve fitting.As shown in Figure 2,time series device 3 comprise Data Date unit 301, name day unit 302, date of expiry unit 303 and cash flow day unit 304.
Data Date unit 301 is used for the term structure request of reading of data memory storage 1, will send to name day unit 302 through the correlation parameter (for example expiring conversion, date of expiry etc. at name day convention " settlement convention ", conversion on working day, time limit, the end of month) after the 2 screening processing of data pretreatment unit.
Name day unit 302 is used for the parameters such as 301 receiving quotation product name day conventions " settlement convention ", conversion on working day, date of expiry from the Data Date unit, calculates name day t according to following stepsSpot, and with the name day t of parameter and each quotation productSpotSend to date of expiry unit 303.
1) when the quotation product name day convention " settlement convention "=0:tSpot=t0
2) when the quotation product name day convention " settlement convention "=1:tSpot=t0+ 1 (conversion on+working day)
3) when the quotation product name day convention " settlement convention "=2:tSpot=[t0+ 1 (conversion on+working day)]+1 (conversion on+working day)
4) when the quotation product name day convention " settlement convention "=3:tSpot={ [t0+ 1 (conversion on+working day)]+1 (conversion on+working day) }+1 (conversion on+working day)
Wherein, t0Be Data Date, i.e. on the date that quotation receives, t is a natural number; (change+working day) expression has been carried out a nonworkdays (for example weekend, public holiday) and has been converted workaday calculating into.
Date of expiry unit 303 is used for from the name day unit 302 receiving quotation product conversions on working day, the end of month data such as conversion, date of expiry that expire, and calculates the date of expiry of the product of offering, and the corresponding date of expiry is sent to cash flow day unit 304.The calculating of date of expiry has following two types:
1) directly from name day unit 302, reads date of expiry tn
2) as can't directly reading, then can be through name day t with name day unit 302SpotWith the date of expiry addition, again according to working day convention adjust nonworkdays and calculate, computing method are following:
tn=tSpot+ time expiry (conversion expires the+the end of month) (conversion on+working day)
Wherein, t0Be Data Date, i.e. on the date that quotation receives, t is a natural number; (change+working day) expression has been carried out a nonworkdays (for example weekend, public holiday) and has been converted workaday calculating into; The conversion that expires a end of month has been carried out in (conversion expires the+the end of month) expression.
Cash flow day, unit 304 was used for the date of expiry t of the 303 receiving quotation products from the date of expiry unit0, to date of expiry tnTwo kinds of approach that read, the each payment of interest produces the date t of cash flowiAlso have two kinds of different computing method, concrete grammar is following:
1) for the date of expiry t that calculatesn, cash flow day unit 304 calculate cash flow day through read the similar after the match quotation product in city the longest date of expiry under same payment of interest frequency from date of expiry unit 303.I cash flow day tiEqual name day tSpotAdd apart from the fate of this cash flow day again according to convention adjustment on working day, wherein, equal i apart from the fate of this cash flow day and multiply by time limit period:
ti=tSpot+ iperiod (conversion expires the+the end of month) (conversion on+working day) i=1 ..., n-1
Wherein, n-1 is the sequence number of cash flow day, and does not comprise date of expiry tn, wherein n, t are natural number.Time limit equals 12 months divided by payment frequency.
2) for the date of expiry t that directly readsn, cash flow day unit 304 read correlation parameter from date of expiry unit 303, calculate each quotation product cash flow day according to following steps are independent respectively: i cash flow day tiEqualing the date of expiry deducts the fate apart from this cash flow day, again according to convention adjustment on working day, wherein equals the time limit apart from the fate of this cash flow day and multiply by n and subtract the poor of i.
ti=tn-(n-i) * period (conversion expires the+the end of month) (conversion on+working day) fori=1...n-1
Wherein, n-1 is the sequence number of cash flow day, and does not comprise date of expiry tn, wherein n, t are natural number.Time limit equals 12 months divided by payment frequency.
Cash flow day unit 304 calculated curves cash flow day tiAfter the completion, to cash flow day tiSort and time series is kept in the data storage device 1, and send notice todata fitting device 4.
Fig. 3 shows the structured flowchart of the data fitting device in the data processing equipment that the present invention is based on curve fitting.As shown in Figure 3,data fitting device 4 comprisesdata interpolating unit 401, Date Conversion Unit 1,Date Conversion Unit 2 403,loop iteration unit 404 andDate Conversion Unit 3 405,Date Conversion Unit 4 406.
Data interpolating unit 401 is used for reading from data storage device 1 time series of the cash flow day of curve.For the cash flow day that has corresponding quotation on the quotation market,data interpolating unit 401 will read its par interest rate r automatically from data storage device 1i, with date of this type of cash flow day as standard point.For the cash flow day that does not have corresponding quotation on the market,data interpolating unit 401 will pass through the cubic spline method for this cash flow day t automaticallyiIts par interest rate of interpolation calculation ri, and with date of this type of cash flow day as on schedule nonstandard.
The cubic spline method is with Si(x)=ai+ bi(t-ti)+ci(t-ti)2+ di(t-ti)3Formal representation.For one group of known standard point cash flow day tiAnd corresponding par interest rate riArray { (t1, r1), (t2, r2) ..., (tn, rn), make it satisfy S through the structure cubic spline functioni(ti)=ri=SI-1(ti), Si' (ti)=SI-1' (ti), Si" (ti)=SI-1(ti) and S0" (t0)=Sn" (tn)=0, thus one group of n-1 batten obtained.Wherein, a, b, c, d, i, n, t, r, x are natural number.Obtain t through cubic splineiCorresponding nonstandard par interest rate r on scheduleiBe stored in the data storage device 1.
Calculate throughdata interpolating unit 401, with each cash flow day tiCorresponding par interest rate riBe stored in the data storage device 1, and notification data converting unit 1 begins to carry out the conversion process flow process of par interest rate to discount factor.
Date Conversion Unit 1 is used for reading par interest rate r from data storage device 1iCalculate discount factor DiscountFactorkConversion from the par interest rate to discount factor can realize through progressively guiding method (bootstrapping), is that once be example half a year with the curve payment frequency, and its calculation procedure is following:
At first, for cash flow day tiPar interest rate ParRate smaller or equal to six monthsk, convert it into the discount factor in corresponding time limit.Because payment frequency be half a year once, so cash flow day tiOnly can represent a cash flow smaller or equal to six months par interest rates---the principal and interest of repaying at the date of maturity, calculate cash flow day t according to following stepsiEach discount factor DiscountFactor smaller or equal to six monthsk:
Here, DayCountFactorStartDate, EndDateExpression cash flow day tiThe time interval;
ParRatekExpression is with the cash flow day t in yeariCorresponding par interest rate ri
The interest-bearing frequency of Compounding Frequency corresponding product (for instance, bond) is (if payment in a year once then is 1, if semi-annual payment once then is that payment in 2, months once then is 12, by that analogy);
StartDate representes the name day t of this point on the curveSpot
EndDate representes the cash flow day t of this point on the curvei
Secondly, for cash flow day tiPar interest rate ParRate greater than six monthsk, discount factor must be calculated according to the sequencing of cash flow, and when calculating n discount factor, front n-1 must all be calculated.Calculate cash flow day t according to following stepsiEach discount factor DiscountFactor greater than six monthsk:
Here; 1 expression equals the 1st cash flow pairing discount factor under day the time limit in
; N representes n cash flow pairing discount factor under day; Wherein, n is a natural number.
ParRatekBe meant cash flow day t with yeariCorresponding par interest rate ri
The interest-bearing frequency of Compounding Frequency corresponding product (for instance, bond) is (if payment in a year once then is 1, if semi-annual payment once then is that payment in 2, months once then is 12, by that analogy).
Calculate through Date Conversion Unit 1, with each cash flow day tiCorresponding discount factor DiscountFactorkBe stored in the data storage device 1, notificationsDate Conversion Unit 2 403 begins to carry out the conversion process flow process.
Date Conversion Unit 2 403 is used for from each cash flow day t that data storage device 1 reading of data converting unit 1 calculatesiCorresponding discount factor DiscountFactorkBe transformed into spot interest rate ZeroCouponRateiWith the curve payment frequency is that once be example half a year, and its calculation procedure is following:
Here, ZeroCouponRateiIn 1 expression equal the 1st cash flow pairing spot interest rate under day the time limit, n representes n cash flow pairing spot interest rate under day, wherein, n is a natural number;
DayCountFactorStartDate, EndDateExpression cash flow day tiThe time interval;
StartDate representes the name day t of this point on the curveSpot
EndDate representes the cash flow day t of this point on the curvei
The interest-bearing frequency of Compounding Frequency corresponding product (for instance, bond) is (if payment in a year once then is 1, if semi-annual payment once then is that payment in 2, months once then is 12, by that analogy).
Calculate throughDate Conversion Unit 2 403, with cash flow day tiCorresponding spot interest rate ZeroCouponRateiBe stored in the data storage device 1, noticeloop iteration unit 404 begins to carry out the treatment scheme that circulation reduces error.
Loop iteration unit 404 is used for circular treatment from cash flow day t that data storage device 1 readsiCorresponding spot interest rate ZeroCouponRateiCarry out conversion Calculation, reduce error, make data reach the threshold values requirement of system's regulation.1), from data storage device 1, reads earlier the spot interest rate ZeroCouponRate of " standard point " for the nonstandard day of cash flow on scheduleiAs basic array, cubic spline interpolation calculates the spot interest rate NewZeroCouponRate of " on schedule nonstandard " cash flow daySpot, tiAfter spot interest rate calculated and accomplishes, the loop iteration unit sent notice and givesDate Conversion Unit 3 405, according to the discount factor Newdiscountfactor after the following method computation cyclesSpot, ti, and the NewZeroCouponRate that " on schedule nonstandard " cash flow day is correspondingSpot, ti, NewdiscountfactorSpot, tiBe saved in the data storage device 1.
Here, DayCountFactorStartDate, EndDateExpress time at interval.
The interest-bearing frequency of Compounding Frequency corresponding product (for instance, bond) is (if payment in a year once then is 1, if semi-annual payment once then is that payment in 2, months once then is 12, by that analogy).2), from data storage device 1, read the par interest rate of standard point, notification data converting unit 1 andDate Conversion Unit 2 403, the discount factor Newdiscountfactor after the circulation of calculating " standard point " for the cash flow day of standard pointSpot, ti, and spot interest rate NewZeroCouponRateSpot, ti, and be stored in the data storage device 1.
With cash flow day tiThe spot interest rate NewZeroCouponRate that calculates after the circulationSpot, tiWith a preceding spot interest rate ZeroCouponRate who preserves in the data storage device 1iRelatively, if both differences reach system's predetermined data accuracy requirement of data storage device 1, then stop the NewZeroCouponRate that circulatesSpot, ti, otherwise continue the threshold values requirement of the difference compliance with system until between twice circulation that circulates, and the final spot interest rate ResultZeroCouponRate in back that will circulateSpot, tiBe saved in the data storage device 1.
Date Conversion Unit 3 405 is used for the final spot interest rate ResultZeroCouponRate in data memory storage 1 circulation backSpot, tiCarry out the discount factor conversion, convert Resultdiscountfactor intoSpot, ti, and be stored in the data storage device 1.
Date Conversion Unit 4 406 is used for circular treatment final discount factor Resultdiscountfactor after the corresponding circulation of all that data storage device 1 reads cash flow daysSpot, ti, according to the par interest rate (Resu/tParRate of the following method calculating term structure of askingi), be stored in the data storage device 1 notificationdata output unit 5 after calculating is accomplished.
For cash flow day tiThe discount factor that is less than or equal to six months cash flow days, calculate according to following method:
Here, DayCountFactorStartDate, EndDateExpress time at interval.
The interest-bearing frequency of Compounding Frequency corresponding product (for instance, bond) is (if payment in a year once then is 1, if semi-annual payment once then is that payment in 2, months once then is 12, by that analogy).
For cash flow day tiDiscount factor greater than six months cash flow days:
Here; 1 expression time limit equaled the discount factor of 6 months cash flow day in; N representes the discount factor of n 6 months cash flow day; Wherein, n is a natural number.
The interest-bearing frequency of Compounding Frequency corresponding product (for instance, bond) is (if payment in a year once then is 1, if semi-annual payment once then is that payment in 2, months once then is 12, by that analogy).
Fig. 4 shows the process flow diagram of a kind of data processing method based on curve fitting provided by the invention.
Step 101: the checksum filter step of effectively offering.Data pretreatment unit 2 receives data and carries out pre-service.If system can receive and filter out active data through pre-service, then forward step 102 to, otherwise finish the native system flow process, use the proxima luce (prox. luc) data, anddata output device 5 prompting users.
Data pretreatment unit 2 receives the data (the for example efficient market of Reuter quotation) of external data source; And from data storage device 1, read screening rules such as ageing; Rejecting does not meet the abnormal data of rule, avoids the final target data accuracy of calculating of this type of data influence.To pass through pretreated data is stored in the data storage device 1.Step 102: from data storage device 1, inquire about and read quotation product unit and system's static parameter.
Data storage device 1 is used for the parameter that storage system need use and the result of calculation of follow up device.The parameter that system need use comprises system-level parameters, quotation product sound attitude parameter, marketing data image parameter and term structure request.
Step 103:time series device 3 calculation and quotation curves each the quotation product name day with and the date of expiry.
Step 104:time series device 3 calculates each cash flow day that curve construction relates to, and arranges the time series that makes up curve in order.
Step 105:data fitting device 4 releases and can't read cash flow day of quotation through the cubic spline method for curve, carry out cubic spline interpolation and calculate its corresponding par interest rate.
Data interpolating unit 401 in the datafitting device 4 is used for reading from data storage device 1 time series of the cash flow day of curve.For the cash flow day that has corresponding quotation on the quotation market,data interpolating unit 401 will read its par interest rate r automatically from data storage device 1i, with date of this type of cash flow day as standard point.For the cash flow day that does not have corresponding quotation on the market,data interpolating unit 401 will pass through the cubic spline method for this cash flow day t automaticallyiIts par interest rate of interpolation calculation ri, and with date of this type of cash flow day as on schedule nonstandard.
Step 106:data fitting device 4 is a discount factor with the par interest rate swap of each cash flow day, and is stored in the data storage device 1.
Date Conversion Unit 402 in the datafitting device 4 is used for reading par interest rate r from data storage device 1i, calculate discount factor DiscountFactork, the conversion from the par interest rate to discount factor can realize through progressively guiding method (bootstrapping).
Step 107:data fitting device 4 converts the discount factor of each cash flow day into spot interest rate, and is stored in the data storage device 1.
Step 108:data fitting device 4 is the difference between the circulation of the spot interest rate circulation The Fitting Calculation of each cash flow day, the accuracy requirement of Control Circulation match, and be stored in the data storage device 1.If difference compliance with system requirement; Then read final round-robin spot interest rate, and reversecalculation procedure 108,step 107; To be converted into discount factor earlier according to the reverse formula spot interest rate ofstep 108; Obtain the par interest rate according to the reverse formula ofstep 107 again, and the result is stored in the data storage device 1, otherwise just continuecirculation step 108.
Step 109:data output device 5 reads the par interest rate of corresponding requirements term structure from data storage device 1, data offer the user.
Above-described specific embodiment; The object of the invention, technical scheme and beneficial effect have been carried out further explain, and institute it should be understood that the above is merely specific embodiment of the present invention; Be not limited to the present invention; All within spirit of the present invention and principle, any modification of being made, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.