FixedRateBondPriceByYield {RQuantLib}R Documentation

Zero Coupon Bond Yield evaluation

Description

The FixedRateBondPriceByYield function calculates the theoretical price of a fixed rate bond from its yield

Usage

## Default S3 method:
FixedRateBondPriceByYield( settlementDays=1, yield, faceAmount, 
                                 effectiveDate, maturityDate,
                                 period, calendar="us", 
                                 rates, dayCounter=2,
                                 businessDayConvention=0, compound = 0, redemption=100, 
                                 issueDate)

## S3 method for class 'Bond':
plot
## S3 method for class 'Bond':
print
## S3 method for class 'Bond':
summary

Arguments

settlementDays an integer, 1 for T+1, 2 for T+2, etc...
yield yield of the bond
effectiveDate bond's effective date
maturityDate bond's maturity date
period 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
calendar Business Calendar. Either us or uk
faceAmount face amount of the bond
rates vector of rates
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
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
compound compounding type. 0=Simple, 1=Compounded, 2=Continuous, all other=SimpleThenCompounded. See QuantLib's Compound class
redemption redemption when the bond expires
issueDate date the bond is issued

Value

The FixedRateBondPriceByYield function returns an object of class FixedRateBondPriceByYield (which inherits from class Bond). It contains a list with the following components:

yield yield of the bond

Note

The interface might change in future release as QuantLib stabilises its own API.

Author(s)

Khanh Nguyen knguyen@cs.umb.edu

References

http://quantlib.org for details on QuantLib. http://www.mathworks.com/access/helpdesk/help/toolbox/finfixed/FixedRateBondPriceByYield.html for more details about this function

Examples

FixedRateBondPriceByYield(,0.0307, 100000, as.Date("2004-11-30"), as.Date("2008-11-30"), 3, , c(0.02875), , , , ,as.Date("2004-11-30"))

[Package RQuantLib version 0.3.2 Index]