Re: Re: newbie q-n about FinancialData
- To: mathgroup at smc.vnet.net
- Subject: [mg105284] Re: [mg105235] Re: newbie q-n about FinancialData
- From: DrMajorBob <btreat1 at austin.rr.com>
- Date: Wed, 25 Nov 2009 23:03:45 -0500 (EST)
- References: <hegeut$1fd$1@smc.vnet.net> <200911250732.CAA05469@smc.vnet.net>
- Reply-to: drmajorbob at yahoo.com
Every time I get interested in FinancialData (or any of M's on-line data), I encounter something like the following, where data is available for only 339 of (only) the last 789 days, with a HUGE gap of 297 days in the middle. 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} That's not impressive coverage, considering that (according to Wiki): "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 ¤751 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 Wed, 25 Nov 2009 01:32:30 -0600, Sjoerd C. de Vries <sjoerd.c.devries at gmail.com> wrote: > Hi Max, > > I'd suggest you read the help docs available from within Mathematica > instead of Googling. FinancialData has an extensive page there. > Something along the following lines should work for you: > > Export["C:\\Financialdata.xls", {#, > FinancialData[#, "PERatio"]} & /@ {"MSFT", "GE", "XOM", "XRX", > "UPS"}]. > > This is a compund statement which does all the work at once. /@ is the > shorthand for the infix form of the function Apply, which applies the > FinancialData function (using a "pure function" construction, # &, -- > look it up in the help docs) on a whole list of financial ticker > symbols. Export does the rest. > > Cheers -- Sjoerd > > > On Nov 24, 1:10 pm, xamdam <maxkhe... at gmail.com> wrote: >> Hi, >> I would appreciate some pointer on how to use FinancialData API to >> retrieve fundamentals (e.g. PERatio ) on a list of tickers (all US) >> and export it to a file. One hour of googling did not help! >> Thanks a lot, >> max. > > -- DrMajorBob at yahoo.com
- References:
- Re: newbie q-n about FinancialData
- From: "Sjoerd C. de Vries" <sjoerd.c.devries@gmail.com>
- Re: newbie q-n about FinancialData