Free download for USD Spot Index

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Free download for USD Spot Index

Bogaso
Hi,

I was looking for some way to download daily historical quotes of USD Spot
Index (as in https://www.fxstreet.com/rates-charts/dollarindexspot) to be
downloaded using R.

Any pointer will be highly appreciated.

Thanks,

        [[alternative HTML version deleted]]

_______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: Free download for USD Spot Index

Frank-2
Use DTWEXM instead of DGS3MO:

library(quantmod)
library(chron)


##
## Get DGS3MO Treasury yield from FRED
##

getSymbols('DGS3MO',src='FRED')
DGS3MO<-na.locf(DGS3MO/100.0,na.rm = TRUE)
tail(DGS3MO)
file_name <- "DGS3MO.csv"
write.zoo(DGS3MO, file = file_name, append = FALSE, quote = TRUE, sep = ",")
quit()


-----Original Message-----
From: R-SIG-Finance <[hidden email]> On Behalf Of
Christofer Bogaso
Sent: Monday, October 08, 2018 4:57 AM
To: [hidden email]
Subject: [R-SIG-Finance] Free download for USD Spot Index

Hi,

I was looking for some way to download daily historical quotes of USD Spot
Index (as in https://www.fxstreet.com/rates-charts/dollarindexspot) to be
downloaded using R.

Any pointer will be highly appreciated.

Thanks,

        [[alternative HTML version deleted]]

_______________________________________________
[hidden email] 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.

_______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: Free download for USD Spot Index

Bogaso
I could not relate DGS3MO to Dollar Index Spot values - any explanation?

On Mon, Oct 8, 2018 at 5:17 PM Frank <[hidden email]> wrote:

> Use DTWEXM instead of DGS3MO:
>
> library(quantmod)
> library(chron)
>
>
> ##
> ## Get DGS3MO Treasury yield from FRED
> ##
>
> getSymbols('DGS3MO',src='FRED')
> DGS3MO<-na.locf(DGS3MO/100.0,na.rm = TRUE)
> tail(DGS3MO)
> file_name <- "DGS3MO.csv"
> write.zoo(DGS3MO, file = file_name, append = FALSE, quote = TRUE, sep =
> ",")
> quit()
>
>
> -----Original Message-----
> From: R-SIG-Finance <[hidden email]> On Behalf Of
> Christofer Bogaso
> Sent: Monday, October 08, 2018 4:57 AM
> To: [hidden email]
> Subject: [R-SIG-Finance] Free download for USD Spot Index
>
> Hi,
>
> I was looking for some way to download daily historical quotes of USD Spot
> Index (as in https://www.fxstreet.com/rates-charts/dollarindexspot) to be
> downloaded using R.
>
> Any pointer will be highly appreciated.
>
> Thanks,
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> [hidden email] 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]]

_______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: Free download for USD Spot Index

Eric Berger
Frank was suggesting to get the data from the Federal Reserve (FRED) and he
supplied code that showed how to do it for the series DGS3MO.
However, he pointed out that in that code you would need to replace the
string 'DGS3MO' by the string 'DTWEXM' to get what (he thought) you want.

The FRED series 'DTWEXM' refers to the "Trade Weighted U.S. Dollar Index:
Major Currencies".
As far as I can tell, this is not the same as the series you asked about,
namely the "U.S. Dollar Index" which is apparently computed by ICE US.
Per Bloomberg, the index you want has ticker DXY and involves "rates
supplied by some 500 banks."

HTH,
Eric


On Mon, Oct 8, 2018 at 5:32 PM, Christofer Bogaso <
[hidden email]> wrote:

> I could not relate DGS3MO to Dollar Index Spot values - any explanation?
>
> On Mon, Oct 8, 2018 at 5:17 PM Frank <[hidden email]> wrote:
>
> > Use DTWEXM instead of DGS3MO:
> >
> > library(quantmod)
> > library(chron)
> >
> >
> > ##
> > ## Get DGS3MO Treasury yield from FRED
> > ##
> >
> > getSymbols('DGS3MO',src='FRED')
> > DGS3MO<-na.locf(DGS3MO/100.0,na.rm = TRUE)
> > tail(DGS3MO)
> > file_name <- "DGS3MO.csv"
> > write.zoo(DGS3MO, file = file_name, append = FALSE, quote = TRUE, sep =
> > ",")
> > quit()
> >
> >
> > -----Original Message-----
> > From: R-SIG-Finance <[hidden email]> On Behalf Of
> > Christofer Bogaso
> > Sent: Monday, October 08, 2018 4:57 AM
> > To: [hidden email]
> > Subject: [R-SIG-Finance] Free download for USD Spot Index
> >
> > Hi,
> >
> > I was looking for some way to download daily historical quotes of USD
> Spot
> > Index (as in https://www.fxstreet.com/rates-charts/dollarindexspot) to
> be
> > downloaded using R.
> >
> > Any pointer will be highly appreciated.
> >
> > Thanks,
> >
> >         [[alternative HTML version deleted]]
> >
> > _______________________________________________
> > [hidden email] 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]]
>
> _______________________________________________
> [hidden email] 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]]

_______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: Free download for USD Spot Index

Bogaso
Thank you Eric and Frank for such details. Regards,

On Mon, Oct 8, 2018 at 8:17 PM Eric Berger <[hidden email]> wrote:

> Frank was suggesting to get the data from the Federal Reserve (FRED) and
> he supplied code that showed how to do it for the series DGS3MO.
> However, he pointed out that in that code you would need to replace the
> string 'DGS3MO' by the string 'DTWEXM' to get what (he thought) you want.
>
> The FRED series 'DTWEXM' refers to the "Trade Weighted U.S. Dollar Index:
> Major Currencies".
> As far as I can tell, this is not the same as the series you asked about,
> namely the "U.S. Dollar Index" which is apparently computed by ICE US.
> Per Bloomberg, the index you want has ticker DXY and involves "rates
> supplied by some 500 banks."
>
> HTH,
> Eric
>
>
> On Mon, Oct 8, 2018 at 5:32 PM, Christofer Bogaso <
> [hidden email]> wrote:
>
>> I could not relate DGS3MO to Dollar Index Spot values - any explanation?
>>
>> On Mon, Oct 8, 2018 at 5:17 PM Frank <[hidden email]> wrote:
>>
>> > Use DTWEXM instead of DGS3MO:
>> >
>> > library(quantmod)
>> > library(chron)
>> >
>> >
>> > ##
>> > ## Get DGS3MO Treasury yield from FRED
>> > ##
>> >
>> > getSymbols('DGS3MO',src='FRED')
>> > DGS3MO<-na.locf(DGS3MO/100.0,na.rm = TRUE)
>> > tail(DGS3MO)
>> > file_name <- "DGS3MO.csv"
>> > write.zoo(DGS3MO, file = file_name, append = FALSE, quote = TRUE, sep =
>> > ",")
>> > quit()
>> >
>> >
>> > -----Original Message-----
>> > From: R-SIG-Finance <[hidden email]> On Behalf Of
>> > Christofer Bogaso
>> > Sent: Monday, October 08, 2018 4:57 AM
>> > To: [hidden email]
>> > Subject: [R-SIG-Finance] Free download for USD Spot Index
>> >
>> > Hi,
>> >
>> > I was looking for some way to download daily historical quotes of USD
>> Spot
>> > Index (as in https://www.fxstreet.com/rates-charts/dollarindexspot) to
>> be
>> > downloaded using R.
>> >
>> > Any pointer will be highly appreciated.
>> >
>> > Thanks,
>> >
>> >         [[alternative HTML version deleted]]
>> >
>> > _______________________________________________
>> > [hidden email] 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]]
>>
>> _______________________________________________
>> [hidden email] 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]]

_______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: Free download for USD Spot Index

Frank-2
As Eric pointed out, the FRED data is not what you want, all the US$ Index data is trade weighted. I’ve asked for the historical cash index values from ICE. It may take a day or two.

Since the weights are constant, I think you can come close by downloading the components from FRED. I’ve modified the script to collect first 'DTWEXM' from FRED and then ‘DEXUSEU’ the Euro dollar exchange rate. I’m lost as to how to combine the other currencies into one getSymbols call.

library(quantmod)
library(chron)


##
## Get DTWEXM Trade Weighted U.S. Dollar Index: Major Currencies from FRED
##
getSymbols('DTWEXM',src='FRED')
DTWEXM<-na.locf(DTWEXM,na.rm = TRUE)
tail(DTWEXM)
file_name <- "DTWEXM.csv"
write.zoo(DTWEXM, file = file_name, append = FALSE, quote = TRUE, sep = ",")

##
## Get DEXUSEU U.S. / Euro Foreign Exchange Rate
##
getSymbols('DEXUSEU',src='FRED')
DEXUSEU<-na.locf(DEXUSEU,na.rm = TRUE)
tail(DEXUSEU)
file_name <- "DEXUSEU.csv"
write.zoo(DEXUSEU, file = file_name, append = FALSE, quote = TRUE, sep = ",")
quit()

From: Christofer Bogaso <[hidden email]>
Sent: Monday, October 08, 2018 11:42 AM
To: Eric Berger <[hidden email]>
Cc: [hidden email]; [hidden email]
Subject: Re: [R-SIG-Finance] Free download for USD Spot Index

Thank you Eric and Frank for such details. Regards,

On Mon, Oct 8, 2018 at 8:17 PM Eric Berger <mailto:[hidden email]> wrote:
Frank was suggesting to get the data from the Federal Reserve (FRED) and he supplied code that showed how to do it for the series DGS3MO.
However, he pointed out that in that code you would need to replace the string 'DGS3MO' by the string 'DTWEXM' to get what (he thought) you want.

The FRED series 'DTWEXM' refers to the "Trade Weighted U.S. Dollar Index: Major Currencies".
As far as I can tell, this is not the same as the series you asked about, namely the "U.S. Dollar Index" which is apparently computed by ICE US.
Per Bloomberg, the index you want has ticker DXY and involves "rates supplied by some 500 banks."

HTH,
Eric


On Mon, Oct 8, 2018 at 5:32 PM, Christofer Bogaso <mailto:[hidden email]> wrote:
I could not relate DGS3MO to Dollar Index Spot values - any explanation?

On Mon, Oct 8, 2018 at 5:17 PM Frank <mailto:[hidden email]> wrote:

> Use DTWEXM instead of DGS3MO:
>
> library(quantmod)
> library(chron)
>
>
> ##
> ## Get DGS3MO Treasury yield from FRED
> ##
>
> getSymbols('DGS3MO',src='FRED')
> DGS3MO<-na.locf(DGS3MO/100.0,na.rm = TRUE)
> tail(DGS3MO)
> file_name <- "DGS3MO.csv"
> write.zoo(DGS3MO, file = file_name, append = FALSE, quote = TRUE, sep =
> ",")
> quit()
>
>
> -----Original Message-----
> From: R-SIG-Finance <mailto:[hidden email]> On Behalf Of
> Christofer Bogaso
> Sent: Monday, October 08, 2018 4:57 AM
> To: mailto:[hidden email]
> Subject: [R-SIG-Finance] Free download for USD Spot Index
>
> Hi,
>
> I was looking for some way to download daily historical quotes of USD Spot
> Index (as in https://www.fxstreet.com/rates-charts/dollarindexspot) to be
> downloaded using R.
>
> Any pointer will be highly appreciated.
>
> Thanks,
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> mailto:[hidden email] 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]]

_______________________________________________
mailto:[hidden email] 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.

_______________________________________________
[hidden email] 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.