Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #1651
| From | Chris Degnen <degnen@cwgsy.net> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: FinancialData |
| Date | 2011-04-13 09:54 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <io3rsv$1qc$1@smc.vnet.net> (permalink) |
| References | <inunf2$2gb$1@smc.vnet.net> |
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}]]
Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Find similar | Unroll thread
FinancialData Leonardo <matematica65@gmail.com> - 2011-04-11 11:08 +0000 Re: FinancialData Chris Degnen <degnen@cwgsy.net> - 2011-04-13 09:54 +0000
csiph-web