ZeroPriceByYield {RQuantLib} | R Documentation |
The ZeroPriceYield
function evaluates a zero-coupon clean price based on its yield.
## Default S3 method: ZeroPriceByYield(yield, faceAmount, issueDate, maturityDate, dayCounter=2, frequency=2, compound=0, businessDayConvention=4) ## S3 method for class 'Bond': plot ## S3 method for class 'Bond': print ## S3 method for class 'Bond': summary
yield |
yield of the bond |
faceAmount |
face amount of the bond |
issueDate |
date the bond is issued |
maturityDate |
maturity date, an R's date type |
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 |
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 |
compound |
compounding type. 0=Simple, 1=Compounded, 2=Continuous, all other=SimpleThenCompounded. See QuantLib's Compound class |
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 |
The ZeroPriceByYield
function returns an object of class
ZeroPriceByYield
(which inherits from class
Bond
). It contains a list with the following
components:
yield |
yield of the bond |
The interface might change in future release as QuantLib
stabilises its own API.
Khanh Nguyen knguyen@cs.umb.edu
http://quantlib.org for details on QuantLib
. http://www.mathworks.com/access/helpdesk/help/toolbox/finfixed/zeroyield.html for more details about this function
ZeroPriceByYield(0.1478, 100, as.Date("1993-6-24"), as.Date("1993-11-1"))