Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #1599 > unrolled thread

FinancialData

Started byLeonardo <matematica65@gmail.com>
First post2011-04-11 11:08 +0000
Last post2011-04-13 09:54 +0000
Articles 2 — 2 participants

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  FinancialData Leonardo <matematica65@gmail.com> - 2011-04-11 11:08 +0000
    Re: FinancialData Chris Degnen <degnen@cwgsy.net> - 2011-04-13 09:54 +0000

#1599 — FinancialData

FromLeonardo <matematica65@gmail.com>
Date2011-04-11 11:08 +0000
SubjectFinancialData
Message-ID<inunf2$2gb$1@smc.vnet.net>
Is possible to have data for every n minutes of a stock index?

Example:

Column [FinancialData ["SP500", {{2011, 4, 1}, {2011, 4, 1}, "Day"}]]

for daily data.

Is there a way to get data every hour?

Or have data every n minutes?

Thanks.



E' possibile avere dati ogni n minuti di un indice azionario?

Esempio:

Column[FinancialData["SP500", {{2011, 4, 1}, {2011, 4, 1}, "Day"}]]

per avere dati giornalieri.

Esiste un modo per avere dati ogni ora?

Oppure avere dati ogni n minuti?

Grazie.

[toc] | [next] | [standalone]


#1651

FromChris Degnen <degnen@cwgsy.net>
Date2011-04-13 09:54 +0000
Message-ID<io3rsv$1qc$1@smc.vnet.net>
In reply to#1599
On Apr 11, 12:08 pm, Leonardo <matematic...@gmail.com> wrote:
> Is possible to have data for every n minutes of a stock index?
>
> Example:
>
> Column [FinancialData ["SP500", {{2011, 4, 1}, {2011, 4, 1}, "Day"}]]
>
> for daily data.
>
> Is there a way to get data every hour?
>
> Or have data every n minutes?
>
> Thanks.
>
> E' possibile avere dati ogni n minuti di un indice azionario?
>
> Esempio:
>
> Column[FinancialData["SP500", {{2011, 4, 1}, {2011, 4, 1}, "Day"}]]
>
> per avere dati giornalieri.
>
> Esiste un modo per avere dati ogni ora?
>
> Oppure avere dati ogni n minuti?
>
> Grazie.


If you are using Mathematica 8 you can use RunScheduledTask,
http://reference.wolfram.com/mathematica/ref/RunScheduledTask.html

But if you are on version 6 or 7 you can use something like this:

prices = {};
GetPrices :=
 AppendTo[prices,
  Flatten@{FinancialData[#] & /@ {"^FTSE", "^GSPC"},
    DateString[{"Time", " ", "Day", "/", "Month", "/", "Year"}]}]
Dynamic[ti60 = Refresh[DateString["Second"], UpdateInterval -> 3]]
doOnce = True; Dynamic[
 If[EvenQ[ToExpression[ti60]],
  If[doOnce == True, GetPrices; doOnce = False], doOnce = True]]
Dynamic[TableForm[If[Length[prices] > 4, Take[prices, -4], prices],
  TableHeadings -> {None, {"FTSE 100", "S&P 500", "Time & date"}},
  TableSpacing -> {1, 2}]]

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web