Message Boards Message Boards

0
|
11964 Views
|
9 Replies
|
5 Total Likes
View groups...
Share
Share this post:

No Currency Exchange Rates Time Series Data?

Posted 11 years ago
Dear All

Am I correct in thinking that FinancialData[] doesn't support anything other than current currency exchange rates? To put the question another way, it is not possible to get a time series of currency exchange rates?

For example, this works...

FinancialData["USD/GBP"]

...but this does not...

FinancialData["USD/GBP", {"1/1/2014", "02/28/2014"}]

Even a definitive "NO!" would be useful: it would stop me hitting my head against the wall.

Thanks in advance

Brad
POSTED BY: Brad Varey
9 Replies
You can obtain the FX rates from the Federal Reserve with this code:

 lastpricedate = "04/10/2014";
 
 fxdownload = Import@StringJoin[
     "http://www.federalreserve.gov/datadownload/Output.aspx?rel=H10&series=3777001afbcc5b173e81a2055241b679&lastObs=&from=04/04/1983&to=",
      lastpricedate,
     "&filetype=csv&label=include&layout=seriescolumn"];
 fxdata = Drop[fxdownload, 6];
 datelistfx = Cases[fxdata, {_, _?NumberQ}];
 datelistfx[[All, 1]] =
  Join[ToExpression@StringSplit[#, "-"], {0, 0, 0.}] & /@
   datelistfx[[All, 1]];

DateListPlot[datelistfx]
POSTED BY: Chris Degnen
The limitations of the FinancialData function for the Dow-Jones data come from the use of the
Yahoo financial web site for downloading the data.  Yahoo.com is no longer licensed to provide
Dow-Jones data for download in the ways it used to.

   https://help.yahoo.com/kb/finance/SLN2332.html  says,
      "Yahoo Finance doesn't provide downloads of Dow Jones Industrial Average index data (^DJI).
      However, you can browse the Dow's daily and historical numbers, see its components, or analyze it with charts."

The recommended workaround is to use the WolframAlpha function.
See  http://support.wolfram.com/kb/7357 and suggestions earlier in this thread.

Alternative sources for FinancialData are being investigated.
POSTED BY: Bruce Miller
Posted 11 years ago
Hi, Vitaliy

That's not really what I am after.

To give you a clearer example, certain of the Indices covered by FinancialData[] can return date series values. 

For example, this works:

FinancialData["^FTSE", {{2014, 1, 1}, {2014, 3, 31}}]

...but this doesn't...

FinancialData["^DJI", {{2014, 1, 1}, {2014, 3, 31}}]

...despite the fact that THIS DOES return a spot price:

FinancialData["^DJI"]

So there is what I call "coverage" for "^DJI", but that coverage is not as complete as that for "^FTSE".

Another useful thing to know, when there was date series coverage, what the first valid date is (or, indeed, last valid date). If you are mapping a function across a list of multiple stock/index identifiers for a certain period (perhaps producing an array of plots), it would be useful to know in advance which ones will return incomplete date series.

Sorry to have been unclear in my first question.

Regards

Brad
POSTED BY: Brad Varey
Posted 11 years ago
Hi, Marco

I'm talking currency exchange, so GBP is Pound Sterling, not GDP.

I suppose there is a broader question here: how does one discover what is and isn't available? Of course you can probe about with short queries. But unless I am missing something, there is no way to get a "coverage report".

Apologies if it already exists, but here would be a nifty feature:

FinancialData["^DJI", "DataCoverage"]

... the results of which might be something like...

{{"SpotValue", True}, {"HistoricalData", False}, {"DateOfFirstValue", {1957, 6, 14}}, <and so on>}

Then you could probe the data systematically, making one call per symbol, and getting back everything you need to know to decide whether you can work with the entity or not.

Regards

Brad
POSTED BY: Brad Varey
Find everything that is available:
fdata[x_] :=
Grid[Select[{#, FinancialData[x, #]} & /@
    FinancialData["Properties"],
   Head[#[[2]]] =!= Missing && Head[#[[2]]] =!= FinancialData &],
  Alignment -> Left, Frame -> All]

fdata["^DJI"]

POSTED BY: Vitaliy Kaurov
Are we talking GDP (Gross Domestic Product) or GBP (Great British Pounds)?

FinancialData["USD/GBP", {"1/1/2014", "02/28/2014"}]
does not seem to work. 
FinancialData["USD", {"1/1/2014", "02/28/2014"}]
does work.
FinancialData["GBP", {"1/1/2014", "02/28/2014"}]

FinancialData["EUR", {"1/1/2014", "02/28/2014"}]
do not work.
Some indices are not provided anymore such as
FinancialData["^DJI", All]
which is still in the documentation.

M.
POSTED BY: Marco Thiel
Posted 11 years ago
I guess that one would need also the GDP in French currency during this period in order to get the exchange rates..

And.. it seems that WolframAlpha[] interprets 2014 as the GBP amount which to convert in USD over time.

The desired result can be obtained by simply asking for "USD/GBP" data, but the graph now isn't so "optimistic" as the first one:

POSTED BY: Sandu Ursu
I belive that this information is contained in CountryData.  From the examples for CountryData:
DateListPlot[CountryData["France", {{"GDP"}, {1970, 2005}}]]

The units are in US dollars
POSTED BY: David Reiss
While you still should get an answer about FinancialData, - a workaround. I always resort to Wolfram|Alpha sources because they are different from FinancialData sources. See this discussion for more details.
data = WolframAlpha["USD/GBP in 2014", {{"History", 1}, "ComputableData"}]
DateListPlot[data // First, Joined -> True, Filling -> Bottom]




POSTED BY: Sam Carrettie
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract