**Sent this e-mail to just one person. So Im sending it again (but to the
entire mailing list)

Im sorry, Mr. Gallon.
I did not know the rules of posting and I apologize for the infringement.
Are these rules online somewhere to read?

and the chunk of code looks like this :
---------------
library(quantmod)
....
now <- Sys.time()

midnight <- strptime()        #<--------- I want to make this a static
variable that will be equal to 12:00:00 am but I dont know what to put here.
I keep getting NA for everything I do

if(now == midnight) {
getFX("EUR/USD", from = Sys.Date() -1, to = Sys.Date() - 1)
write.table(EURUSD, "~Documents/stat arb/project/eurusd.csv", append = TRUE,
row.names = FALSE, col.names = FALSE)
        ....
}

....
---------------

Also, append is always ignored when I use "write.csv". I had to resort to
using "write.table". Is this always the case?

As for the historical interest rates, thank you all very much for providing
me with the information.
I used the fImport package and called the method "fredSeries" to download
"DPRIME" data for the same time frame as currency data I have (Thank you,
Mr. Gallon).

But that is only data for the US. What about other countries?

I was talking to a professor and he said that there was a way to read data
from a website into R if you know the url. Would this help in getting the
interest rates of other countries? (I believe the function is aptly named
"url")
I also found a website that has a lot of data I need:
http://research.eco5.com/index.php?parent=2&subparent=39. From here, I want
to download the appropriate files into R.

All help is very much appreciated.

Sincerely,
Aaditya Nanduri

On Tue, Jul 6, 2010 at 6:07 PM, Corey Gallon <corey@coreygallon.com> wrote:
>
>> Try ?fImport::Oanda for an automated solution.
>>
>>
>>
>> * Sent from my BlackBerry handheld device
>>
>> -----Original Message-----
>> From: Marc Delvaux <mdelvaux@gmail.com>
>> Date: Tue, 6 Jul 2010 14:47:29
>> To: <corey@coreygallon.com>; Aaditya Nanduri<aaditya.nanduri@gmail.com>;
>> <r-sig-finance-bounces@stat.math.ethz.ch>; R-Finance<
>> r-sig-finance@stat.math.ethz.ch>
>> Reply-To: <mdelvaux@gmail.com>
>> Subject: Re: [R-SIG-Finance] Comparing time and getting historical
>> interest
>>        rates
>>
>> For the specific case of cost of carry in FX, you might want to also
>> check oanda, that would provide you with real rates available from a
>> FX broker.  There is no automatic way to extract them that I know of,
>> but it is not difficult to extract them from the information provided
>> at
>> http://fxtrade.oanda.com/tools/statistical_information/oanda_interest_rates
>> ,
>> just cut and paste the interest table in a spreadsheet.  I have some
>> python code automating some but not all the processing if you are
>> interested, with the ultimate result a list of interest rates in a
>> file compatible with xts for R processing.
>>
>> The cost of carry for a pair will be given by the difference between
>> ask and bid interest rates for the two components of the pair as
>> defined in
>> http://fxtrade.oanda.com/forex_trading/oanda_trading_practices/feature_trade_interest
>> .
>>  This would be especially interesting if you want retail rates, other
>> sources will generally be for institutional rates.
>>
>> On Tue, Jul 6, 2010 at 2:09 PM, Corey Gallon <corey@coreygallon.com>
>> wrote:
>> > Re question #1, per the posting guidelines please submit sample code
>> highlighting your issue.  Re question #2, ?fImport::fredSeries or
>> ?fImport::fredImport ought to provide some clarity.
>> >
>> >
>> >
>> > Cheers,
>> >
>> > Corey
>> >
>> > * Sent from my BlackBerry handheld device
>> >
>> > -----Original Message-----
>> > From: Aaditya Nanduri <aaditya.nanduri@gmail.com>
>> > Sender: <r-sig-finance-bounces@stat.math.ethz.ch>
>> > Date: Tue, 6 Jul 2010 16:31:59
>> > To: R-Finance<r-sig-finance@stat.math.ethz.ch>
>> > Subject: [R-SIG-Finance] Comparing time and getting historical interest
>> rates
>> >
>> > Hello All,
>> >
>> > 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.
>> >
>> >
>> > Question 2 : Is there a way to get historical interest rate data?
>> >
>> > Earlier, I asked how to get currency data and Wolfgang showed me a loop
>> to
>> > get 2500 days of data. I then modified it to fit my requirements and it
>> has
>> > worked without a hitch (Thank you Wolfgang).
>> >
>> > However, I also need the interest rate data for my assignment (FX carry)
>> and
>> > I havent found any sources besides fxstreet (from whom I am searching
>> for a
>> > way to download the data).
>> > Are there any other sources for this? Possibly automated (on the lines
>> of
>> > getFX() or getSymbols() )?
>> >
>> > Sincerely,
>> > Aaditya Nanduri
>> >
>> > On a side note, I think I am relying too much on the mailing list. You
>> guys
>> > are very helpful and I am very grateful but I feel like Im not putting
>> in
>> > enough effort. Have to mend my ways now...cant be too reliant on you
>> guys.
>> >
>> >        [[alternative HTML version deleted]]
>> >
>> >_______________________________________________
>> > R-SIG-Finance@stat.math.ethz.ch mailing list
>> > https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>> > -- Subscriber-posting only. If you want to post, subscribe first.
>> > -- Also note that this is not the r-help list where general R questions
>> should go.
>> >
>> >_______________________________________________
>> > R-SIG-Finance@stat.math.ethz.ch mailing list
>> > https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>> > -- Subscriber-posting only. If you want to post, subscribe first.
>> > -- Also note that this is not the r-help list where general R questions
>> should go.
>> >
>>
>>
>

	[[alternative HTML version deleted]]

