Dear R forum,
Following is an customized extract of a code I am working on.
settlement = as.Date(2013-11-25)
maturity = as.Date(2015-10-01)
coupon = 0.066
yield = 0.1040
basis = 1
frequency = 2
redemption = 100
#
This will get you close:
settlement = as.Date(2013-11-25)
maturity = as.Date(2015-10-01)
coupon = 0.066
yield = 0.1040
basis = 1
frequency = 2
redemption = 100
# __
add.months = function(date, n)
+ {
+ nC
Katherine,
One easy way to do this for small data is by using the append() function
(see code below). But, if you have a lot of data, it may be too slow for
you. In that case, you can gain some efficiency if you determine in
advance how long the vectors will be, then use indexing to fill in the
Dear Jean
Thanks a lot for this solution. Its very useful. I did only one small change
and defined
cashflow.tenure - numeric(0) instead of character(0). This helps me in further
numerical calculations using these dates like finding the difference between
two dates etc.
Thanks again,
Dear Sir,
Thanks a lot for your guidance and efforts. Appreciate it.
Thanks again.
Katherine
On Thursday, 3 April 2014 6:55 PM, jim holtman jholt...@gmail.com wrote:
This will get you close:
settlement = as.Date(2013-11-25)
maturity = as.Date(2015-10-01)
coupon = 0.066
yield =
5 matches
Mail list logo