找回密码
 注册
查看: 471|回复: 0

R语言 RQuantLib包 FloatingRateBond()函数中文帮助文档(中英文对照)

[复制链接]
发表于 2012-9-28 20:33:32 | 显示全部楼层 |阅读模式
FloatingRateBond(RQuantLib)
FloatingRateBond()所属R语言包:RQuantLib

                                        Floating rate bond pricing
                                         浮动利率债券定价

                                         译者:生物统计家园网 机器人LoveR

描述----------Description----------

The FloatingRateBond function evaluates a floating rate bond using discount curve.  More specificly, the calculation is done by DiscountingBondEngine from QuantLib. The NPV, clean price, dirty price, accrued interest, yield and cash flows of the bond is returned.  For more detail, see the source codes in quantlib's test-suite. test-suite/bond.cpp
FloatingRateBond函数计算的浮动利率债券,采用的折现曲线。更多specificly,计算通过从QuantLib DiscountingBondEngine。返回净现值(NPV),清洁的价格,全价,应计利息,收益和现金流的债券。欲知更多详情,请参阅源代码在quantlib的测试套件。 test-suite/bond.cpp


用法----------Usage----------


## Default S3 method:[默认方法]
FloatingRateBond(bond, gearings, spreads,
                                   caps, floors, index,
                                   curve, dateparams )



参数----------Arguments----------

参数:bond
bond parameters, 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 </td> </tr> <tr>  <td align="left">         </td><td align="left">         face amount that will be returned at maturity </td> </tr> <tr>  <td align="left">         </td><td align="left">    date. Default value is 100.</td> </tr> <tr>  <td align="left"> effectiveDate  </td><td align="left"> (Optinal) a Date, the bond's effective date. Default value is issueDate</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 ALIGN="LEFT">  </ TD> <TD ALIGN="LEFT">票面金额于到期日将返回</ TD> </ TR> <TR > <td ALIGN="LEFT">  </ TD> <TD ALIGN="LEFT">日期。默认值是100。</ TD> </ TR> <TR> <td ALIGN="LEFT"> effectiveDate </ TD> <TD ALIGN="LEFT">(Optinal)一个日期,债券的有效日。默认值是issueDate的</ TD> </ TR> <TR> <td ALIGN="LEFT"> </ TD> </ TR> </ TABLE>


参数:gearings
(Optional) a numeric vector, bond's gearings. See quantlib's doc on FloatingRateBond for more detail. Default value is an empty vector c().
(可选)一个数值向量,债券的传动装置。更多详细信息,quantlib的doc FloatingRateBond。默认值是一个空的向量c()。


参数:spreads
(Optional) a numeric vector, bond's spreads. See quantlib's doc on FloatingRateBond for more detail.Default value is an empty vector c()
(可选)一个数值向量,债券的差价。的quantlib的doc FloatingRateBond更多detail.Default值是一个空的向量c()


参数:caps
(Optional) a numeric vector, bond's caps. See quantlib's doc on FloatingRateBond for more detail. Default value is an empty vector c()
(可选)一个数值向量,债券的帽子。更多详细信息,quantlib的doc FloatingRateBond。默认值是一个空的向量c()


参数:floors
(Optional) a numeric vector, bond's floors. See quantlib's doc on FloatingRateBond for more detail. Default value is an empty vector c()
(可选)一个数值向量,债券的地板。更多详细信息,quantlib的doc FloatingRateBond。默认值是一个空的向量c()


参数:curve
Can be one of the following:   <table summary="Rd table"> <tr>  <td align="left"> a DiscountCurve </td><td align="left">  a object of DiscountCurve class </td> </tr> <tr>  <td align="left">         </td><td align="left"> For more detail, see example or </td> </tr> <tr>  <td align="left">          </td><td align="left"> the discountCurve function </td> </tr> <tr>  <td align="left"> A 2 items list </td><td align="left"> specifies a flat curve in two </td> </tr> <tr>  <td align="left">         </td><td align="left"> values "todayDate" and "rate"   </td> </tr> <tr>  <td align="left"> A 3 items list </td><td align="left"> specifies three values to construct a </td> </tr> <tr>  <td align="left">         </td><td align="left"> DiscountCurve object, "params" , </td> </tr> <tr>  <td align="left">   </td><td align="left"> "tsQuotes", "times". </td> </tr> <tr>  <td align="left">         </td><td align="left"> For more detail, see example or </td> </tr> <tr>  <td align="left">          </td><td align="left"> the discountCurve function </td> </tr> <tr>  <td align="left"> </td> </tr>  </table>  
可以是下列之一:<table summary="Rd table"> <TR> <td ALIGN="LEFT">a DiscountCurve </ TD> <TD ALIGN="LEFT">一个对象的DiscountCurve类< / TD> </ TR> <TR> <td ALIGN="LEFT">  </ TD> <TD ALIGN="LEFT">的更多详细信息,请参阅示例或</ TD> </ TR> <TR> <td ALIGN="LEFT"> </ TD> <TD ALIGN="LEFT"> discountCurve功能</ TD> </ TR> <TR> <td ALIGN="LEFT"> A 2 items list </ TD> <TD ALIGN="LEFT">指定一条平坦的曲线在2 </ TD> </ TR> <TR> <td ALIGN="LEFT"></ TD > <td ALIGN="LEFT">的价值“todayDate”和“速度”</ TD> </ TR> <TR> <td ALIGN="LEFT">A 3 items list </ TD> <TD对齐=“离开“>指定三个值来构建一个</ TD> </ TR> <TR>”<td ALIGN="LEFT">的 </ TD> <TD ALIGN="LEFT"> DiscountCurve对象,“PARAMS “</ TD> </ TR> <TR> <td ALIGN="LEFT">  </ TD> <TD ALIGN="LEFT">”tsQuotes“,”与时俱进“。 </ TD> </ TR> <TR> <td ALIGN="LEFT">  </ TD> <TD ALIGN="LEFT">的更多详细信息,请参阅示例或</ TD> </ TR文章<td ALIGN="LEFT"> </ TD> <TD ALIGN="LEFT"> discountCurve功能</ TD> </ TR> <TR> <TD对齐=“左边” > </ TD> </ TR> </ TABLE>


参数:index
a named list whose elements are parameters of an IborIndex term structure.    <table summary="Rd table"> <tr>  <td align="left"> type </td><td align="left"> a string, currently support only "USDLibor" </td> </tr> <tr>  <td align="left"> length </td><td align="left"> an integer, length of the index </td> </tr> <tr>  <td align="left"> inTermOf </td><td align="left"> a string, period unit, currently support only 'Month' </td> </tr> <tr>  <td align="left"> term </td><td align="left"> a DiscountCurve object, the term structure of the index</td> </tr> <tr>  <td align="left"> </td> </tr>  </table>  
一个命名的的IborIndex期限结构的参数列表,其元素。 <table summary="Rd table"> <TR> <td ALIGN="LEFT"> type</ TD> <TD ALIGN="LEFT">一个字符串,目前只支持“USDLibor”</ TD> </ TR> <TR> <td ALIGN="LEFT">length </ TD> <TD ALIGN="LEFT">一个整数,该指数的长度</ TD> </ TR> <TR> <td ALIGN="LEFT"> inTermOf </ TD> <TD ALIGN="LEFT">一个字符串,期间单位,目前支持“月”</ TD> </ TR> <TR> <TD ALIGN =>term </ TD> <TD ALIGN="LEFT">对象的一个DiscountCurve,期限结构的索引</ TD> </ TR> <TR> TD对齐=“左边的”左“ “> </ TD> </ TR> </ TABLE>


参数: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"> endOfMonth </td><td align="left"> (Optional) a numeric with value 1 or 0. </td> </tr> <tr>  <td align="left">     </td><td align="left"> End of Month rule. Default value is 0.</td> </tr> <tr>  <td align="left"> dateGeneration </td><td align="left"> (Optional) a numeric, date generation method. </td> </tr> <tr>  <td align="left">   </td><td align="left"> See Enum. Default value is 'Backward' </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> <TR> <td ALIGN="LEFT"> </ TD> <TD ALIGN="LEFT">终止日约定。 </ TD> </ TR> <TR> <td ALIGN="LEFT"> </ TD> <TD ALIGN="LEFT">枚举。默认值是“继”。 </ TD> </ TR> <TR> <td ALIGN="LEFT"> endOfMonth </ TD> <TD ALIGN="LEFT">(可选)一个数字值1或0。 </ TD> </ TR> <TR> <td ALIGN="LEFT">  </ TD> <TD ALIGN="LEFT">月份结束规则。默认值是0。</ TD> </ TR> <TR> <td ALIGN="LEFT"> dateGeneration </ 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----------

A discount curve is built to calculate the bond value.
的折扣曲线是建立在计算债券价值。

Please see any decent Finance textbook for background reading, and the QuantLib documentation for details on the QuantLib implementation.  
请参阅任何像样的金融教科书的背景阅读,QuantLibQuantLib实施的细节上的文件。


值----------Value----------

The FloatingRateBond function returns an object of class FloatingRateBond (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> clean 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>
FloatingRateBond函数返回一个类的对象FloatingRateBond(继承自类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.umbno.edu">knguyen@cs.umbno.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:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|生物统计家园 网站价格

GMT+8, 2024-11-26 20:28 , Processed in 0.030650 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表