Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #5249 > unrolled thread
| Started by | DrMajorBob <btreat1@austin.rr.com> |
|---|---|
| First post | 2011-09-27 22:51 +0000 |
| Last post | 2011-09-29 06:11 +0000 |
| Articles | 3 — 2 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: More FinancialData glitches DrMajorBob <btreat1@austin.rr.com> - 2011-09-27 22:51 +0000
Re: More FinancialData glitches Tyler <hayes.tyler@gmail.com> - 2011-09-28 06:48 +0000
Re: More FinancialData glitches DrMajorBob <btreat1@austin.rr.com> - 2011-09-29 06:11 +0000
| From | DrMajorBob <btreat1@austin.rr.com> |
|---|---|
| Date | 2011-09-27 22:51 +0000 |
| Subject | Re: More FinancialData glitches |
| Message-ID | <j5tk1n$3b6$1@smc.vnet.net> |
As things stand, I'll have to cache FinancialData results MYSELF, to protect against these frequent glitches. Bobby On Mon, 26 Sep 2011 17:02:59 -0500, DrMajorBob <btreat1@austin.rr.com> wrote: >> This suggests that the problem may lie with Mathematica, >> does it not? > > It seems that way to me, and besides, if this is "curated" data, Wolfram > should cache data to cover for temporary glitches at Yahoo. Old data > should be there, even if new data is not. > > Bobby > > On Mon, 26 Sep 2011 13:41:37 -0500, James Stein <mathgroup@stein.org> > wrote: > >> This IS curious. >> Mathematica gets it data from Yahoo (I think); >> and if you go to the Yahoo Finance site, >> it DOES recognize JNSGX. >> >> This suggests that the problem may lie with Mathematica, >> does it not? >> >> >> On Mon, Sep 26, 2011 at 1:13 AM, DrMajorBob <btreat1@austin.rr.com> >> wrote: >> >>> This is no longer amusing: >>> >>> FinancialData["JNSGX"] >>> >>> FinancialData::notent: JNSGX is not a known entity, class, or tag for >>> FinancialData. Use FinancialData[] for a list of entities. >> >>> >>> Bobby >>> >>> -- >>> DrMajorBob@yahoo.com >>> >>> > > -- DrMajorBob@yahoo.com
[toc] | [next] | [standalone]
| From | Tyler <hayes.tyler@gmail.com> |
|---|---|
| Date | 2011-09-28 06:48 +0000 |
| Message-ID | <j5ufvd$7qh$1@smc.vnet.net> |
| In reply to | #5249 |
I found this, looks like they have a deal with another vendor (Xignite) for some information http://reference.wolfram.com/mathematica/note/FinancialDataSourceInformation.html For the record, the Financial data functionality is one of my most loved (and hated) features. It's one of the best things going compared to other environments to have a common interface natural to the language to get the data for analysis. Perhaps a wrapper function to allow you to specify a secondary source would help alleviate these issues? Basically, same function, but with a try/catch in the middle. If both bomb, well, a bad day I guess. Nonetheless, this should come out of the box in my mind. Cheers, t.
[toc] | [prev] | [next] | [standalone]
| From | DrMajorBob <btreat1@austin.rr.com> |
|---|---|
| Date | 2011-09-29 06:11 +0000 |
| Message-ID | <j6125k$m3d$1@smc.vnet.net> |
| In reply to | #5249 |
Tyler,
Thanks for the info.
I have thought of two ways to guard against times when data disappears.
It would be nice if Yahoo, Xignite, Wolfram, or SOMEBODY would do this at
their end, so that I (and thousands of others) didn't have to deal with it
at ours.
1) I can save a spreadsheet (CSV) from the Yahoo website and import it
when FinancialData fails (for a specific stock symbol). Here is part of
the code for doing that. It could be applied to all symbols, but I've only
applied it to "JNSGX".
(This comes AFTER going to Yahoo and saving the CSV file, but it won't do
anything when FinancialData starts working again for that symbol.)
ClearAll[manual, financialData, price, adjustedData, volatility]
manual[s_] = False;
p = Quiet@FinancialData["JNSGX"];
s = "JNSGX";
manual[s] = List =!= Head@p;
If[manual@s,
import =
Reverse@Rest@Import[s <> ".csv"] /. {dt_String,
other__} :> {DateList[dt][[;; 3]], other};
p = (financialData@s = import[[All, {1, 5}]]);
priceDate[s] = DateString[p[[-1, 1]], {"Month", "/", "Day"}];
volatility@s = 1.;
Scan[(price[s, First@#] = n[2]@Last@#) &, p];
price[s] = price[s, today] = p[[-1, -1]];
adjustedData[s] = import[[All, {1, 7}]];
]
"adjustedData" corresponds to "Close", while "financialData" stores
"RawClose" data. I've found a use for the first, but the second is far
more important. I show "volatility" in one one of my reports, but it's not
a big deal for it to be wrong.
In later code, I use "manual" to see if I need to retrieve data from
FinancialData -- and to report which symbols may not have recent data. I
had recently closed my position in "JNSGX", but some reports need the old
data.
2) I can Put data for a symbol when FinancialData DOES work, and Get it
later when it does not, with similar logic. I may eventually do both --
belt AND suspenders -- but I haven't instituted that level of protection,
as yet.
Bobby
On Wed, 28 Sep 2011 01:45:55 -0500, Tyler <hayes.tyler@gmail.com> wrote:
> I found this, looks like they have a deal with another vendor
> (Xignite) for some information
>
> http://reference.wolfram.com/mathematica/note/FinancialDataSourceInformation.html
>
> For the record, the Financial data functionality is one of my most
> loved (and hated) features. It's one of the best things going compared
> to other environments to have a common interface natural to the
> language to get the data for analysis. Perhaps a wrapper function to
> allow you to specify a secondary source would help alleviate these
> issues? Basically, same function, but with a try/catch in the middle.
> If both bomb, well, a bad day I guess. Nonetheless, this should come
> out of the box in my mind.
>
> Cheers,
>
> t.
>
>
--
DrMajorBob@yahoo.com
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web