A number of different operations can be performed on or with DiscountFactor objects. Methods have been defined for base package generic operations including arithmetic and comparison.

Details

The operations are:

  • c: concatenates a vector of DiscountFactor objects

  • [: extract parts of a DiscountFactor vector

  • [<-: replace parts of a DiscountFactor vector

  • rep: repeat a DiscountFactor object

  • length: determines the length of a DiscountFactor vector

  • *: multiplication of DiscountFactor objects. The end date of the first discount factor object must be equivalent to the start date of the second (or vice versa). Arguments are recycled as necessary.

  • /: division of DiscountFactor objects. The start date date of both arguments must be the same. Arguments are recycled as necessary.

  • <, >, <=, >=, ==, !=: these operate in the standard way on the discount_factor field.