Menu

Wednesday, January 5, 2011

Yahoo quote downloader

Here is a simple function to get current yahoo data for a bunch of symbols : get_yahoo_quote.m
It downloads quotes from yahoo (take a look here at what is possible) and returns them in a struct.

example usage:
quote = get_yahoo_quote({'SPY','IWM'})     

result:
  

           symbol: 'SPY'
             desc: 'SPDR S&P 500'
        lastTrade: [127.5695]
    lastTradeTime: '3:30pm'
     dividendDate: 'Dec 17'
             open: [126.58]
        lastClose: [126.98]

           symbol: 'IWM'
             desc: 'iShares Russell 2'
        lastTrade: [79.26]
    lastTradeTime: '3:30pm'
     dividendDate: 'Dec 22'
             open: [78.4]
        lastClose: [78.422]

No comments:

Post a Comment