CallableBond(RQuantLib)
CallableBond()所属R语言包:RQuantLib
CallableBond evaluation
CallableBond评价
译者:生物统计家园网 机器人LoveR
描述----------Description----------
The CallableBond function sets up and evaluates a callable fixed rate bond using Hull-White model and a TreeCallableFixedBondEngine pricing engine. For more detail, see the source codes in quantlib's example folder, Examples/CallableBond/CallableBond.cpp
CallableBond功能设置和使用Hull-White模型和一个TreeCallableFixedBondEngine的定价引擎评估一个可赎回固定利率债券。欲知更多详情,请参阅源代码quantlib的示例文件夹,的例子/ CallableBond的/ CallableBond.cpp
用法----------Usage----------
## Default S3 method:[默认方法]
CallableBond(bondparams, hullWhite, coupon, dateparams)
参数----------Arguments----------
参数:bondparams
a named list whose elements are: <table summary="Rd table"> <tr> <td align="left"> issueDate </td><td align="left"> a Date, the bond's issue date </td> </tr> <tr> <td align="left"> maturityDate </td><td align="left"> a Date, the bond's maturity date </td> </tr> <tr> <td align="left"> faceAmount </td><td align="left"> (Optional) a double, face amount of the bond. </td> </tr> <tr> <td align="left"> </td><td align="left"> Default value is 100.</td> </tr> <tr> <td align="left"> redemption </td><td align="left"> (Optional) a double, percentage of the initial face </td> </tr> <tr> <td align="left"> </td><td align="left"> amount that will be returned at maturity date. </td> </tr> <tr> <td align="left"> </td><td align="left"> Default value is 100. </td> </tr> <tr> <td align="left"> callSch </td><td align="left"> (Optional) a data frame whose columns are "Price",</td> </tr> <tr> <td align="left"> </td><td align="left"> "Type" and "Date" corresponding to QuantLib's </td> </tr> <tr> <td align="left"> </td><td align="left"> CallabilitySchedule. Defaule is an empty frame, or no callability.</td> </tr> <tr> <td align="left"> </td> </tr> </table>
命名列表,它的元素是:<table summary="Rd table"> <TR> <td ALIGN="LEFT"> issueDate </ TD> <TD ALIGN="LEFT">一个日期,债券的发行日</ TD> </ TR> <TR> <td ALIGN="LEFT"> maturityDate </ TD> <TD ALIGN="LEFT">一个日期,债券的到期日</ TD> </ TR> <TR> <td ALIGN="LEFT">faceAmount </ TD> <TD ALIGN="LEFT">(可选)双,债券的票面金额。 </ TD> </ TR> <TR> <td ALIGN="LEFT"> </ TD> <TD ALIGN="LEFT">默认值是100。</ TD> </ TR> < TR> <td ALIGN="LEFT"> redemption</ TD> <TD ALIGN="LEFT">(可选)双,初始表面的百分比</ TD> </ TR> <TR> < TD对齐=“”> </ TD> <TD ALIGN="LEFT">金额于到期日将返回。 </ TD> </ TR> <TR> <td ALIGN="LEFT"> </ TD> <TD ALIGN="LEFT">默认值是100。 </ TD> </ TR> <TR> <td ALIGN="LEFT"> callSch </ TD> <TD ALIGN="LEFT">(可选)数据框的列是“价格”,< / TD> </ TR> <TR> <td ALIGN="LEFT"> </ TD> <TD ALIGN="LEFT">“类型”和“日期”对应QuantLib的</ TD> < / TR> <TR> <td ALIGN="LEFT"> </ TD> <TD ALIGN="LEFT"> CallabilitySchedule。 Defaule是一个空的框架,或没有callability的。</ TD> </ TR> <TR> <td ALIGN="LEFT"> </ TD> </ TR> </ TABLE>
参数:hullWhite
a named list whose elements are parameters needed to set up a HullWhite pricing engine in QuantLib: <table summary="Rd table"> <tr> <td align="left"> term </td><td align="left"> a double, to set up a flat rate yield term structure </td> </tr> <tr> <td align="left"> alpha </td><td align="left"> a double, Hull-White model's alpha value </td> </tr> <tr> <td align="left"> sigma </td><td align="left"> a double, Hull-White model's sigma value </td> </tr> <tr> <td align="left"> gridIntervals. </td><td align="left"> a double, time intervals parameter to </td> </tr> <tr> <td align="left"> </td><td align="left"> set up the TreeCallableFixedBondEngine </td> </tr> <tr> <td align="left"> </td> </tr> </table> Currently, the codes only support a flat rate yield term structure. For more detail, see QuantLib's doc on HullWhite and TreeCallableFixedBondEngine.
命名列表,它的元素是需要建立一个HullWhite定价引擎QuantLib的参数:<table summary="Rd table"> <TR> <td ALIGN="LEFT"> term</ TD> <TD调整=“左”了一倍,成立了一个扁平率收益率期限结构</ TD> </ TR> <TR> <td ALIGN="LEFT"> alpha</ TD> <TD对齐=“离开“了一倍,Hull-White模型的alpha值</ TD> </ TR> <TR> <td ALIGN="LEFT"> sigma</ TD> <TD ALIGN="LEFT">一个双Hull-White模型的Σ值</ TD> </ TR> <TR> <td ALIGN="LEFT">gridIntervals。 </ TD> <TD ALIGN="LEFT">了一倍,时间间隔参数</ TD> </ TR> <TR> <td ALIGN="LEFT"> </ TD> <TD调整=“”>成立TreeCallableFixedBondEngine </ TD> </ TR> <TR> <td ALIGN="LEFT"> </ TD> </ TR> </ TABLE>目前,该代码只支持一个扁平率收益率利率期限结构。欲知更多详情,请参阅QuantLib的doc上HullWhite和TreeCallableFixedBondEngine。
参数:coupon
a numeric vector of coupon rates
一个数值向量的票面息率
参数: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"> calendar </td><td align="left"> (Optional) a string, either 'us' or 'uk' </td> </tr> <tr> <td align="left"> </td><td align="left"> corresponding to US Goverment Bond </td> </tr> <tr> <td align="left"> </td><td align="left"> calendar and UK Exchange calendar.</td> </tr> <tr> <td align="left"> </td><td align="left"> Default value is 'us'.</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"> terminationDateConvention </td><td align="left"> (Optional) a number or string </td> </tr> <tr> <td align="left"> </td><td align="left"> termination 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"> calendar </ TD> <TD ALIGN="LEFT">(可选)一个字符串,是我们或UK</ TD> </ TR> < TR> <td ALIGN="LEFT"> </ TD> <TD ALIGN="LEFT">相应的美国电子政务债券的</ TD> </ TR> <TR> <TD对齐=“左边” ></ TD> <TD ALIGN="LEFT">日历和英国的Exchange日历。</ TD> </ TR> <TR> <td ALIGN="LEFT"></ TD> <TD ALIGN="LEFT">默认值是我们。</ TD> </ TR> <TR> <td ALIGN="LEFT">dayCounter </ TD> <TD对齐=“左“>(可选)一个数字或字符串,</ TD> </ TR> <TR> <td ALIGN="LEFT"> </ 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"> terminationDateConvention </ TD> <TD ALIGN="LEFT">(可选)一个数字或字符串</ TD> </ TR文章<td ALIGN="LEFT"> </ TD> <TD ALIGN="LEFT">终止日约定。</ TD> </ TR> <TR> <TD对齐=“左边“> </ TD> <TD ALIGN="LEFT">枚举。默认值isFollowing“。</ 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----------
The CallableBond function returns an object of class CallableBond (which inherits from class Bond). It contains a list with the following components: <table summary="R valueblock"> <tr valign="top"><td>NPV</td> <td> net present value of the bond</td></tr> <tr valign="top"><td>cleanPrice</td> <td> price price of the bond</td></tr> <tr valign="top"><td>dirtyPrice</td> <td> dirty price of the bond</td></tr> <tr valign="top"><td>accruedAmount</td> <td> accrued amount of the bond</td></tr> <tr valign="top"><td>yield</td> <td> yield of the bond</td></tr> <tr valign="top"><td>cashFlows</td> <td> cash flows of the bond</td></tr> </table>
CallableBond函数返回一个类的对象CallableBond(继承自类Bond)。它包含以下组件的列表:<table summary="R valueblock"> <tr valign="top"> <TD>NPV</ TD> <TD>的债券净现值</ TD > </ TR> <tr valign="top"> <TD>cleanPrice </ TD> <TD>价债券价格</ TD> </ TR> <tr valign="top"> < dirtyPrice TD> </ TD> <TD>脏债券价格</ TD> </ TR> <tr valign="top"> <TD> accruedAmount</ TD> <TD>应计的债券金额</ TD> </ TR> <tr valign="top"> <TD>yield </ TD> <TD>债券的收益率</ TD> </ TR> <TR VALIGN =“顶”> <TD>cashFlows </ TD> <TD>现金流的债券</ TD> </ TR> </ TABLE>
注意----------Note----------
The interface might change in future release as QuantLib
该接口在将来的版本中可能会改变QuantLib
(作者)----------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://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|