Thanks to all with help on my question about FinancialData. Bob hit the nail on the head by pointing out CountryData was the best source of information on country, currency name and currency code - at first sight this gives the information I was looking for, however as E. Martin-Serrano points out the exhange rate data available in FinancialData[] is virtually useless, i.e. no data or incomplete data! Hopefully this is something WRI will sort out if they can tear themselves away from WaLpHa. In the meantime Chris has shown how we can access the Federal Reserve data by importing the HTML as Data and then judiciously using Select, Cases etc.
The ability to Import 'Live' webpages is pretty neat and opens up a wide rage of non-curated data which can be used to fill the gaps in what WRi are providing. For example, I check oil and gold price movement by by importing data on London commodities exchange webpages. It seems to work as long the data formats don't change.
I was hoping to use Mathematica to keep track of the performance of my share portfolio, however, comments by E. Martin-Serrano made me question if FinancialData is accurate. I therefore used it to check the histories of a few shares and all were exactly the same as data reported using the history option in Yahoo Finance (it allows you to generate a csv file with open, close, high and low share price data but note you need to use RawOpen, RawClose etc in FinancialData).
If you look at the help page below you will see that FinancialData is supposedly pulling some of its information from Xignite.com. This site provides a mountain of data: however, it's not clear, which Mathematica properties are used to access it - so if someone knows I would be interested to hear!
http://reference.wolfram.com/mathematica/note/FinancialDataSourceInformation.html
Robert
________________________________
From: Chris Degnen <degnen at cwgsy.net>
To: mathgroup at smc.vnet.net
Sent: Sun, January 3, 2010 2:43:06 AM
Subject: [mg106239] [mg106165] Re: Financial Data - Currencies
"E. Martin-Serrano" <eMartinSerrano at telefonica.net> wrote in message news:hhn5tq$7d0$1 at smc.vnet.net...
> Hi,
>
> The Import/connection . . .
> fails to work in my computer and returns $Failed plus the following message:
>
Posting through a web-based emailer added line breaks to the URLs and a text string.
(* Extract EUR/USD exhange rate *)
euData1 =
Import["http://www.federalreserve.gov/releases/h10/hist/dat00_eu.txt&quot;,
"Data"];
euData2 = {StringReplace[#, " " <> " " .. -> ","]} & /@ euData1;
euData3 = Select[euData2, StringLength[#] == {16} &];
euData4 = First[StringSplit[#, ","]] & /@ euData3;
euData5 = {DateList[#[[1]]], ToExpression[#[[2]]]} & /@ euData4;
(* Extract GBP/USD exhange rate *)
ukData1 =
Import["http://www.federalreserve.gov/releases/h10/hist/dat00_uk.txt&quot;,
"Data"];
ukData2 = {StringReplace[#[[1]], " " <> " " .. -> ","]} & /@ ukData1;
ukData3 = Select[ukData2, StringLength[#] == {17} &];
ukData4 = First[StringSplit[#, ", "]] & /@ ukData3;
ukData5 = {DateList[#[[1]]], ToExpression[#[[2]]]} & /@ ukData4;
(* Plot exchange rates *)
Print[DateListPlot[{euData5, ukData5}, ImageSize -> 600,
PlotLabel -> Style["\nExchange Rate History", 20], Joined -> True,
Epilog -> {Inset[Style["GBP/USD", 12, Bold, Hue[106/117, 0.6, 0.6]],
Automatic, {6, -7}],
Inset[Style["EUR/USD", 12, Bold, Hue[0.67, 0.6, 0.6]],
Automatic, {-4, 1}]}]];
On 31 Dec, 08:18, robert prince-wright <robertprincewri... at yahoo.com>
wrote:
>
Does anyone know how to get the names corresponding to the currencies
available from FinancialData? If you use the command below you get a
list of 153 currencies - some of which are obscure so i was hoping to
generate the names!
>
> currencyTickers = FinancialData["Currencies"]
>
>
Also, why does FinancialData not give historical data for say GBP/USD?
EUR/USD works, albeit over a limited time span, so you would think the
data would be there for sterling. Several others don't work either....
perhaps this is a data server issue?
>
> R