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

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

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

                                        Zero-Coupon bond pricing
                                         零息债券定价

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

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

The ZeroCouponBond function evaluates a zero-coupon plainly 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 code in the QuantLib file test-suite/bond.cpp.
ZeroCouponBond函数计算的零息票明明白白使用的折现曲线。更多specificly,计算通过从QuantLib DiscountingBondEngine。返回净现值(NPV),清洁的价格,全价,应计利息,收益和现金流的债券。欲知更多详情,请参阅QuantLib文件test-suite/bond.cpp中的源代码。

The ZeroPriceYield function evaluates a zero-coupon clean price based on its yield.
ZeroPriceYield函数计算的零息干净的价格根据其产量。

The ZeroYield function evaluations a zero-coupon yield based. See also http://www.mathworks.com/access/helpdesk/help/toolbox/finfixed/zeroyield.html
ZeroYield功能评估的零息票收益率。另请参阅http://www.mathworks.com/access/helpdesk/help/toolbox/finfixed/zeroyield.html


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


## Default S3 method:[默认方法]
ZeroCouponBond(bond, discountCurve, dateparams)

## Default S3 method:[默认方法]
ZeroPriceByYield(yield, faceAmount,
                            issueDate, maturityDate,
                            dayCounter=2, frequency=2,
                            compound=0, businessDayConvention=4)

## Default S3 method:[默认方法]
ZeroYield(price, faceAmount,
                            issueDate, maturityDate,
                            dayCounter=2, frequency=2,
                            compound=0, businessDayConvention=4)



参数----------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"> </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"> </ TD> </ TR> </ TABLE>


参数:discountCurve
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>


参数: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"> 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"> 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">businessDayConvention </ TD> <TD对齐=“左“>(可选)一个数字或字符串,</ 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"> </ TD> </ TR> </ TABLE>参见下面的例子。


参数:yield
yield of the bond
收益率的债券


参数:price
price of the bond
债券价格


参数:faceAmount
face amount of the bond
债券的票面金额


参数:issueDate
date the bond is issued
债券发行的日期


参数:maturityDate
maturity date, an R's date type
到期日,R的日期类型


参数:dayCounter
day count convention. 0 = Actual360(), 1 = Actual365Fixed(), 2 = ActualActual(), 3 = Business252(), 4 = OneDayCounter(), 5 = SimpleDayCounter(), all other = Thirty360(). For more information, see QuantLib's DayCounter class
天数计算惯例。 0 = Actual360(),1 = Actual365Fixed(),2 = ActualActual(),3 = Business252(),4 = OneDayCounter(),5 = SimpleDayCounter(),所有其他= Thirty360()。有关详细信息,请参阅QuantLib的DayCounter类


参数:frequency
frequency of events,0=NoFrequency, 1=Once, 2=Annual, 3=Semiannual, 4=EveryFourthMonth, 5=Quarterly, 6=Bimonthly ,7=Monthly ,8=EveryFourthWeely,9=Biweekly, 10=Weekly, 11=Daily. For more information, see QuantLib's Frequency class
频率的事件,0 = NoFrequency,1 =一次,2 =年,3 =半年,EveryFourthMonth,4 = 5 = 6 =双月刊,7 =月,8 = EveryFourthWeely,9 =双周,10 =每周11 =日报。有关详细信息,请参阅QuantLib的频率类


参数:compound
compounding type. 0=Simple, 1=Compounded, 2=Continuous, all other=SimpleThenCompounded. See QuantLib's Compound class
复合型。 0 =简单,1 =复合,2 =连续,所有其他= SimpleThenCompounded。 QuantLib的复合类


参数:businessDayConvention
convention used to adjust a date in case it is not a valid business day. See quantlib for more detail. 0 = Following, 1 = ModifiedFollowing, 2 = Preceding, 3 = ModifiedPreceding, other = Unadjusted
惯例来调整日期的情况下,它是不是一个有效的营业日。更多详细信息,请参阅quantlib。 0 =以下,1 = ModifiedFollowing,2 = 3 = ModifiedPreceding前面,其他月份未经调整的


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 ZeroCouponBond function returns an object of class ZeroCouponBond (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>
ZeroCouponBond函数返回一个类的对象ZeroCouponBond(继承自类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> The ZeroPriceByYield function returns an object of class ZeroPriceByYield (which inherits from class  Bond). It contains a list with the following components: <table summary="R valueblock"> <tr valign="top"><td>price</td> <td> price of the bond</td></tr>
</ TABLE> ZeroPriceByYield函数返回一个类的对象ZeroPriceByYield(继承自类Bond)。它包含了以下组件:<table summary="R valueblock"> <tr valign="top"> <TD> price </ TD> <TD>债券价格</ TD> < / TR>

</table> The ZeroYield function returns an object of class ZeroYield (which inherits from class  Bond). It contains a list with the following components: <table summary="R valueblock"> <tr valign="top"><td>yield</td> <td> yield of the bond</td></tr> </table>
</ TABLE> ZeroYield函数返回一个类的对象ZeroYield(继承自类Bond)。它包含了以下组件:<table summary="R valueblock"> <tr valign="top"> <TD> yield </ 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:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-26 18:53 , Processed in 0.031077 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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