[R-SIG-Finance] Days between dates

Martin Becker martin.becker at mx.uni-saarland.de
Fri Jan 12 10:22:59 CET 2007


genx schrieb:
> What is the function to calculate amount of days between dates ? This is
> useful when pricing options, number of days (t) expressed as fraction year
> between today and strike day.
>
>   
There is more than one way to represent dates in R, but mostly "-" 
works. To do calculations based on these differences, as.numeric() might 
be useful, e.g.:

 > as.numeric(as.Date("2006-10-10")-as.Date("2005-05-05"))
[1] 523

> Question two, are there any functions to price warrants ? 
>   
I am not aware of the particular differences of pricing options and 
pricing warrants. Package "fOptions" implements some option pricing 
formulae.

Kind regards,

  Martin Becker



More information about the R-SIG-Finance mailing list