FittedBondCurve(RQuantLib)
FittedBondCurve()所属R语言包:RQuantLib
Returns the discount curve (with zero rates and forwards) given set of bonds
返回给定的债券的折现曲线(零利率和远期)
译者:生物统计家园网 机器人LoveR
描述----------Description----------
FittedBondCurve fits a term structure to a set of bonds using three different fitting methodologies. For more detail, see QuantLib/Example/FittedBondCurve.
FittedBondCurve适合使用三种不同的拟合方法的一组债券的期限结构。欲知更多详情,看到QuantLib,/例/ FittedBondCurve的。
用法----------Usage----------
FittedBondCurve(curveparams, lengths, coupons, marketQuotes, dateparams)
参数----------Arguments----------
参数:curveparams
curve parameters <table summary="Rd table"> <tr> <td align="left"> method </td><td align="left"> a string, fitting methods: "ExponentialSplinesFitting", </td> </tr> <tr> <td align="left"> </td><td align="left"> "SimplePolynomialFitting", "NelsonSiegelFitting"</td> </tr> <tr> <td align="left"> origDate </td><td align="left"> a Date, starting date of the curve </td> </tr> <tr> <td align="left"> </td> </tr> </table>
曲线参数表summary="Rd table"> <TR> <td ALIGN="LEFT">method </ TD> <TD ALIGN="LEFT">一个字符串,拟合的方法:“ExponentialSplinesFitting”, / TD> </ TR> <TR> <td ALIGN="LEFT"> </ TD> <TD ALIGN="LEFT">的“SimplePolynomialFitting”,“NelsonSiegelFitting”</ TD> </ TR> <TR> <td ALIGN="LEFT"> origDate</ TD> <TD ALIGN="LEFT">一个日期,开始日期的曲线</ TD> </ TR> <TR> <TD对齐=“左”> </ TD> </ TR> </ TABLE>
参数:lengths
an numeric vector, length of the bonds in year
数值向量,长度在今年的债券
参数:coupons
a numeric vector, coupon rate of the bonds
一个数值向量的债券,票面利率为
参数:marketQuotes
a numeric vector, market price of the bonds
一个数值向量的债券,市场价格
参数:dateparams
(Optional) a named list, QuantLib's date parameters of the bond. <table summary="Rd table"> <tr> <td align="left"> settlementDays </td><td align="left"> (Optional) a double, settlement days. </td> </tr> <tr> <td align="left"> </td><td align="left"> Default value is 1.</td> </tr> <tr> <td align="left"> dayCounter </td><td align="left"> (Optional) a number or string, </td> </tr> <tr> <td align="left"> </td><td align="left"> day counter convention.</td> </tr> <tr> <td align="left"> </td><td align="left"> See Enum. Default value is 'Thirty360' </td> </tr> <tr> <td align="left"> period </td><td align="left"> (Optional) a number or string, </td> </tr> <tr> <td align="left"> </td><td align="left"> interest compounding interval. See Enum. </td> </tr> <tr> <td align="left"> </td><td align="left"> Default value is 'Semiannual'.</td> </tr> <tr> <td align="left"> businessDayConvention </td><td align="left"> (Optional) a number or string, </td> </tr> <tr> <td align="left"> </td><td align="left"> business day convention. </td> </tr> <tr> <td align="left"> </td><td align="left"> See Enum. Default value is 'Following'. </td> </tr> <tr> <td align="left"> </td> </tr> </table> See example below.
(可选)命名列表,QuantLib的日期参数的债券。 <table summary="Rd table"> <TR> <td ALIGN="LEFT">settlementDays </ TD> <TD ALIGN="LEFT">(可选)双交收日。 </ TD> </ TR> <TR> <td ALIGN="LEFT"> </ TD> <TD ALIGN="LEFT">默认值是1。</ TD> </ TR> < TR> <td ALIGN="LEFT"> dayCounter </ TD> <TD ALIGN="LEFT">(可选)一个数字或字符串,</ TD> </ TR> <TR> <TD对齐= “左”> </ TD> <TD ALIGN="LEFT">日反惯例。</ TD> </ TR> <TR> <td ALIGN="LEFT"> / TD> <TD ALIGN="LEFT">枚举。默认值是“Thirty360”</ TD> </ TR> <TR> <td ALIGN="LEFT"> period </ TD> <TD ALIGN="LEFT">(可选)一个数字或字符串, </ TD> </ TR> <TR> <td ALIGN="LEFT"> </ TD> <TD ALIGN="LEFT">利息复利的时间间隔。请参阅枚举。 </ TD> </ TR> <TR> <td ALIGN="LEFT"> </ TD> <TD ALIGN="LEFT">默认值是“半年报”。</ TD> </ TR文章<td ALIGN="LEFT"> businessDayConvention </ TD> <TD ALIGN="LEFT">(可选)一个数字或字符串</ TD> </ TR> <TR> <TD ALIGN =“”> </ TD> <TD ALIGN="LEFT">工作日约定。 </ TD> </ TR> <TR> <td ALIGN="LEFT"> </ TD> <TD ALIGN="LEFT">枚举。默认值是“继”。 </ TD> </ TR> <TR> <td ALIGN="LEFT"> </ TD> </ TR> </ TABLE>参见下面的例子。
Details
详细信息----------Details----------
Please see any decent Finance textbook for background reading, and the QuantLib documentation for details on the QuantLib implementation.
请参阅任何像样的金融教科书的背景阅读,QuantLibQuantLib实施的细节上的文件。
值----------Value----------
table, a three columns "date - zeroRate - discount" data frame
table,三列“日期 - zeroRate - 折扣”的数据框
(作者)----------Author(s)----------
Khanh Nguyen <a href="mailto:knguyen@cs.umb.edu">knguyen@cs.umb.edu</a> for the inplementation; Dirk Eddelbuettel <a href="mailto:edd@debian.org">edd@debian.org</a> for the <font face="Courier New,Courier" color="#666666"><b>R</b></font> interface;
the QuantLib Group for <code>QuantLib</code>
参考文献----------References----------
http://quantlib.org/ for details on <code>QuantLib</code>.
实例----------Examples----------
lengths <- c(2,4,6,8,10,12,14,16,18,20,22,24,26,28,30)
coupons <- c( 0.0200, 0.0225, 0.0250, 0.0275, 0.0300,
0.0325, 0.0350, 0.0375, 0.0400, 0.0425,
0.0450, 0.0475, 0.0500, 0.0525, 0.0550 )
marketQuotes <- rep(100, length(lengths))
dateparams <- list(settlementDays=0, period="Annual",
dayCounter="ActualActual",
businessDayConvention ="Unadjusted")
curveparams <- list(method="ExponentialSplinesFitting",
origDate = Sys.Date())
curve <- FittedBondCurve(curveparams, lengths, coupons, marketQuotes, dateparams)
library(zoo)
z <- zoo(curve$table$zeroRates, order.by=curve$table$date)
plot(z)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|