[R-SIG-Finance] Comparing time and getting historical interest rates

Dirk Eddelbuettel edd at debian.org
Tue Jul 6 23:54:52 CEST 2010


On 6 July 2010 at 16:31, Aaditya Nanduri wrote:
| Question 1 : How can we compare two time variables?
| 
| What I want to do is check to see if its 12:00 am and if it is, request fx
| data from oanda and append the day's close to the csv file that I have.
| So far, I cant even convert a variable using the strptime(). I keep getting
| NA as the result.

Try and use a correct format:

    R> strptime(format(Sys.time()), "%Y-%m-%d %H:%M:%OS")
    [1] "2010-07-06 16:52:59 CDT"
    R> strptime(format(Sys.time()), "frodo")
    [1] NA
    R>
 
| Question 2 : Is there a way to get historical interest rate data?

Have you looked at the sites of the various central banks, e.g. FRED?

-- 
  Regards, Dirk



More information about the R-SIG-Finance mailing list