Thanks Scott - I've poked around quandl for economic data a few years ago
and completely forgot about it. Looks like a good resource to explore data
and having a J interface to it makes it even more accessible

On Wed, Sep 2, 2015 at 10:32 PM, Scott Locklin <sc...@lugos.name> wrote:

> I don't follow the J list as much as I should, but noticed Joe's
> examination of his portfolio holdings. I've been fooling around with
> futures data, and had need for some interest rates and have the beginnings
> of a useful verb for querying quandl. The only thing you need to set is the
> apitoken. You can get one by registering here:
> https://www.quandl.com/users/login
>
> If I start using this more, I'll build it out into something more useful,
> but for now, I find it useful anyway.
>
>
> coclass jquandl
> load'task'
>
> NB. exposed piece
> quandl=:  quandlq_jquandl_
>
> NB. the freq feature is something you can add later
> NB. freq=.'collapse=none|daily|weekly|monthly|quarterly|annual'
>
> NB. globals
> apitoken=: 'GETYOUROWNAPITOKEN'
> qroot=: 'http://www.quandl.com/api/v1/datasets/'
> spawn=: [: 2!:0 '(' , ' || true)' ,~ ] NB.
> sampleyCotton=: 'USDAERS/COTTONSUPUP'
> sampleySP=:'YAHOO/INDEX_GSPC'
> sampley3m=: 'FRED/USD3MTD156N'
>
> NB. assumes the y input is like 'DBNAME/DBOBJ'
> quandlq=: 3 : 0
>  rest=. '.csv?auth_token=',apitoken
>  wget=. 'wget -o -s -S "'
>  query=. wget,qroot,y,rest,'" -O - -q'
>  spawn query
> )
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to