I am having same issue. Yahoo connectivity is fine. Have saved code athttps://code.kx.com/svn/cookbook_code/yahoo_compact.q to a file, andloaded using the \l command. Then tried yahoo[7;GOOG
AAPL], output isbelowq)\l c:/yahoo.qq)yahoo[7;GOOG
AAPL]{[offset;stocks] tbl:();i:0;zs:(ze:.z.d)-offset; parms:“&d=”,(string -1+mm$ze),"&e=",(string
dd$ze),“&f=”,(stringyear$ze),"&g=d&a=",(string -1+
mm$zs),“&b=”,(stringdd$zs),"&c=",(string
year$zs),“&ignore=.csv”; do[count stocks:distinct stocks,(); txt::http://ichart.finance.yahoo.com "GET /table.csv?s=",(string stock:stocks[i]),parms," http/1.1\r\nhost:ichart.finance.yahoo.com\r\n\r\n"; tbl,:update Sym:stock from select from ("DEEEEI ";enlist",")0:(txt ss"Date,Open")_ txt;i+:1]; (lower cols tbl)xcol
DateSym xasc select from tbl where not nullVolume}'length0:("DEEEEI ";,",")()q))Suggestions?On Aug 4, 7:56?pm, Swee Heng <thesweeh...> wrote:> Make sure you do not have connectivity problems to Yahoo. Try this> link: <http:>. You should> get a CSV file. If you do, then this should work:>> q)yahoo[7;
GOOGAAPL]> date ? ? ? open ? high ? low ? ?close ?volume ? sym> ----------------------------------------------------> 2008.07.28 162.34 162.47 154.02 154.4 ?27882600 AAPL> 2008.07.28 492.09 492.09 475.13 477.12 3160000 ?GOOG> 2008.07.29 155.41 159.45 153.65 157.08 24431100 AAPL> 2008.07.29 479.3 ?487.26 478 ? ?483.11 2802800 ?GOOG> 2008.07.30 157.78 160.49 156.08 159.88 25899400 AAPL> 2008.07.30 485.5 ?486.02 472.81 482.7 ?3490700 ?GOOG> 2008.07.31 157.54 162.2 ?156.98 158.95 22744600 AAPL> 2008.07.31 474.56 480.89 471.44 473.75 2865100 ?GOOG> 2008.08.01 159.9 ?159.99 155.75 156.66 19451400 AAPL> 2008.08.01 472.51 473.22 462.5 ?467.86 3007900 ?GOOG> 2008.08.04 156.6 ?157.9 ?152.91 153.23 21161700 AAPL> 2008.08.04 468.12 473.01 461.9 ?463 ? ?2487000 ?GOOG>> Swee Heng>> On Aug 4, 1:48 pm, DuoCentillion <duocentill...> wrote:>> > I am trying to get this q code to work>> > yahoo: {[offset;stocks]> > ? ? ? ? tbl:();i:0;zs:(ze:.z.d)-offset;> > ? ? parms:"&d=",(string -1+
mm$ze),“&e=”,(stringdd$ze),"&f=",> > (string
year$ze),“&g=d&a=”,(string -1+mm$zs),"&b=",(string
dd> > $zs),“&c=”,(stringyear$zs),"&ignore=.csv";> > ? ? do[count stocks:distinct stocks,();> > ? ? ? ? txt:
:http://ichart.finance.yahoo.com"GET /table.csv?s=“,> > (string stock:stocks[i]),parms,” http/1.1\r> > \nhost:ichart.finance.yahoo.com\r\n\r\n";> > ? ? ? ? ? ? ? ? tbl,:update Sym:stock from select from (“DEEEEI “;enlist”,”)0:(txt> > ss"Date,Open")_ txt;i+:1];> > ? ? (lower cols tbl)xcolDate
Sym xasc select from tbl where not null> > Volume}>> > from>> >https://code.kx.com/svn/cookbook_code/yahoo_compact.q>> > I cannot seem to get it to work. ?Any suggestions?</duocentill…></http:></thesweeh…>