xamdam wrote:
> Hi,
> Thanks a lot,
> max.
>
Hi,
here is an example how to retrive the data:
FinancialData[#, "PERatio"] & /@ {"GE", "AAPL"}
note that many data are missing.
To write it to a file you can e.g. use Export.
Daniel
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
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...@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...@gmail.com> wrote:
The code to call up the P/E ratios for your list of stocks would be
BBGetCurrent[{"MSFT Equity", "GE Equity", "XOM Equity", "XRX
Equity","UPS Equity"},"PE_Ratio"]
If you wanted to use next year's consensus estimated P/E, which most
people would probably find more useful, the call is
BBGetCurrent[{"MSFT Equity", "GE Equity", "XOM Equity", "XRX
Equity","UPS Equity"},"Est_PE_Nxt_Yr"]
You can combine this with he Export command if you like, as demonstrated
by others.
Cheers,
Michael
Sjoerd C. de Vries 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...@gmail.com> wrote:
>