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

Marc Delvaux mdelvaux at gmail.com
Tue Jul 6 23:47:29 CEST 2010


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 at 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 at gmail.com>
> Sender: <r-sig-finance-bounces at stat.math.ethz.ch>
> Date: Tue, 6 Jul 2010 16:31:59
> To: R-Finance<r-sig-finance at 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 at 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 at 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.
>



More information about the R-SIG-Finance mailing list