Robert,
Just by following the variation between the exchange EUR/USD rates
during the day at Bloomberg, or other site, you can see that the
variation or EUR/USD volatility is really high, so the *high* and *low*
values are very different every day and so are they for the market
*open* and *close* values due to the transactions made in different
markets (Asia and Europe) before New York opens. The data is referenced
to the NewYork market according to the WRI documentation.
The WRI values for the properties *High*, *Low*, *Opening* and *Closing*
seems to be the same (equal) every day, or, maybe I am wrongly
extracting the data. See the routine below and perform you own check if
you wish.
I have performed several checks and tis is what I got.
Look at this example: between 2009-12-30 and 2009,12,1
{{" Date ", "Open", "Close", "Low", "High"},
{"{2009, 12, 1 }", "1.51", "1.51", "1.51", "1.51"},
"{2009, 12, 2 }", "1.51", "1.51", "1.51", "1.51"},
"{2009, 12, 4 }", "1.51", "1.51", "1.51", "1.51"},
"{2009, 12, 7 }", "1.48", "1.48", "1.48", "1.48"},
"{2009, 12, 8 }", "1.48", "1.48", "1.48", "1.48"},
"{2009, 12, 9 }", "1.48", "1.48", "1.48", "1.48"},
"{2009, 12, 10}", "1.47", "1.47", "1.47", "1.47"},
"{2009, 12, 11}", "1.48", "1.48", "1.48", "1.48"},
"{2009, 12, 14}", "1.46", "1.46", "1.46", "1.46"},
"{2009, 12, 15}", "1.45", "1.45", "1.45", "1.46"},
"{2009, 12, 16}", "1.46", "1.46", "1.46", "1.46"},
"{2009, 12, 17}", "1.44", "1.44", "1.44", "1.44"},
"{2009, 12, 18}", "1.44", "1.44", "1.44", "1.44"},
"{2009, 12, 21}", "1.43", "1.43", "1.43", "1.43"},
"{2009, 12, 22}", "1.43", "1.43", "1.43", "1.43"},
"{2009, 12, 23}", "1.42", "1.42", "1.42", "1.42"},
"{2009, 12, 24}", "1.44", "1.44", "1.44", "1.44"},
"{2009, 12, 28}", "1.44", "1.44", "1.44", "1.44"},
"{2009, 12, 29}", "1.44", "1.44", "1.44", "1.44"},
"{2009, 12, 30}", "1.43", "1.43", "1.43", "1.43"}}
I have performed several checks with the same results. Maybe I am
missing something in the WRI ocumentantion.
Emilio.
-----Original Message-----
From: E. Martin-Serrano [mailto:eMartin...@telefonica.net]
Sent: Saturday, January 02, 2010 10:21 AM
To: 'math...@smc.vnet.net'
Subject: RE: Re: Financial Data - Currencies
Thank you Bob,
Here, one can get every exchange rate for the Euro against most of the currencies (up to 32) from 1999/4/1 to the present date. It comes in Excel CSV and other formats from the ECB website.
http://www.ecb.eu/stats/exchange/eurofxref/html/index.en.html
The problem is that one needs the *High*, *Low*, *Opening* and *Closing* trading values for the EURO/USD rate serie and not just the closing value as given by the ECB. The data available from WRI does not seem to be accurate (only two decimal positions, the gap you have showed, and *High*, *Low*, *Opening* and *Closing* "confusing" values, since for most days the four values are equal, which is imposible for at least the *High*, *Low* and pretty rare for the *Opening* and *Closing*. The candlestick charts for trade analysis are just based in the intra-day differences in value of all those magnitudes.
Thanks again
E. Martin-Serrano
-----Original Message-----
From: DrMajorBob [mailto:btr...@austin.rr.com]
Sent: Saturday, January 02, 2010 12:30 AM
To: E. Martin-Serrano; math...@smc.vnet.net
Subject: Re: Re: Financial Data - Currencies
> (* It works for several years span. See a good example from the David
> Park's "Presentation" package *)
Yes, it works... if you don't mind most of the data being missing,
including a gap of 297 days:
data = FinancialData["EUR/USD", {2000, 1, 1}];
dates = data[[All, 1]];
differences = DateDifference @@@ Partition[dates, 2, 1];
Length@dates
DateDifference @@ dates[[{1, -1}]]
{Median@#, Length@#} & /@ Split[differences, Max[##] < 6 &]
339
789
{{1, 102}, {297, 1}, {1, 235}}
DateListPlot@data
First@data
{{2007, 9, 27}, 1.42}
Your code attempts to get data beginning Dec 1 2006, but there isn't any
until Sept 27 2007... this for a currency about which Wiki says:
"The name euro was officially adopted on 16 December 1995. The euro was
introduced to world financial markets as an accounting currency on 1
January 1999..."
and
"As of November 2008, with more than =E2=82=AC751 billion in circulation, the euro
is the currency with the highest combined value of cash in circulation in
the world, having surpassed the U.S. dollar."
Bobby
On Fri, 01 Jan 2010 04:37:07 -0600, E. Martin-Serrano
<eMartin...@telefonica.net> wrote:
> Hi,
>
> Three years span
>
> (* It works for several years span. See a good example from the David
> Park's
> "Presentation" package *)
> ClearAll[GetFinancialData];
> GetFinancialData::usage =
> "GetFinancialData[name, {property1,property2...},iterator] will
> generate a data set where each record will contain {datelist,
> propertyvalues..}. The iterator is the standard {start,end, period}
> used in FinancialData. This is basically a method of retrieving a
> number of property values at once.";
> SyntaxInformation[
> GetFinancialData] = {"ArgumentsPattern" -> {_, {_, __}, _}};
> GetFinancialData[name_String, {first_String, rest__String},
> iterator_List] :=
> Module[{work, other},
> work = Transpose@FinancialData[name, first, iterator];
> other = FinancialData[name, #, iterator, "Value"] & /@ {rest};
> Transpose[Join[work, other]]
> ]
>
> (* Test *)
>
> GetFinancialData["EUR/USD", {"Open", "Close", "Low",
> "High"}, {"Dec 1 2006", "Dec 30 2009", "Day"}]
>
>
> (* Remark *)
>
>
> Works perfect. Anyway, the data so obtained does not seem to be
> reliable, I
> mean the source does not seem to be reliable. It does not coincide with
> other series that I got fromm other sources. Does anyone know how these
> series are being generated?
>
>
> E. Martin-SErrano
> _________________________________________
>
> -----Original Message-----
> From: robert prince-wright [mailto:robertpri...@yahoo.com]
> Sent: Thursday, December 31, 2009 9:19 AM
> To: math...@smc.vnet.net
> Subject: Financial Data - Currencies
>
> 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
>
>
>
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",
"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",
"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}]}]];
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 <deg...@cwgsy.net>
Sent: Sun, January 3, 2010 2:43:06 AM
Subject: Re: Financial Data - Currencies
On 31 Dec, 08:18, robert prince-wright <robertprincewri...@yahoo.com>
wrote: