File Exchange

image thumbnail

Get Stock Information from Yahoo

version 1.2 (3.26 KB) by

This function allows you to pull stock information from Yahoo with Yahoo! Query Language in Matlab.

14 Downloads

Updated

View License

This function allows you to pull stock information from Yahoo with "Yahoo Query Language" in Matlab. Below list contains the information being pulled from Yahoo.
--
    'Ask'
    'AverageDailyVolume'
    'Bid'
    'AskRealtime'
    'BidRealtime'
    'BookValue'
    'Change_PercentChange'
    'Change'
    'Commission'
    'ChangeRealtime'
    'AfterHoursChangeRealtime'
    'DividendShare'
    'LastTradeDate'
    'TradeDate'
    'EarningsShare'
    'ErrorIndicationreturnedforsymbolchangedinvalid'
    'EPSEstimateCurrentYear'
    'EPSEstimateNextYear'
    'EPSEstimateNextQuarter'
    'DaysLow'
    'DaysHigh'
    'YearLow'
    'YearHigh'
    'HoldingsGainPercent'
    'AnnualizedGain'
    'HoldingsGain'
    'HoldingsGainPercentRealtime'
    'HoldingsGainRealtime'
    'MoreInfo'
    'OrderBookRealtime'
    'MarketCapitalization'
    'MarketCapRealtime'
    'EBITDA'
    'ChangeFromYearLow'
    'PercentChangeFromYearLow'
    'LastTradeRealtimeWithTime'
    'ChangePercentRealtime'
    'ChangeFromYearHigh'
    'PercebtChangeFromYearHigh'
    'LastTradeWithTime'
    'LastTradePriceOnly'
    'HighLimit'
    'LowLimit'
    'DaysRange'
    'DaysRangeRealtime'
    'FiftydayMovingAverage'
    'TwoHundreddayMovingAverage'
    'ChangeFromTwoHundreddayMovingAverage'
    'PercentChangeFromTwoHundreddayMovingAverage'
    'ChangeFromFiftydayMovingAverage'
    'PercentChangeFromFiftydayMovingAverage'
    'Name'
    'Notes'
    'Open'
    'PreviousClose'
    'PricePaid'
    'ChangeinPercent'
    'PriceSales'
    'PriceBook'
    'ExDividendDate'
    'PERatio'
    'DividendPayDate'
    'PERatioRealtime'
    'PEGRatio'
    'PriceEPSEstimateCurrentYear'
    'PriceEPSEstimateNextYear'
    'Symbol'
    'SharesOwned'
    'ShortRatio'
    'LastTradeTime'
    'TickerTrend'
    'OneyrTargetPrice'
    'Volume'
    'HoldingsValue'
    'HoldingsValueRealtime'
    'YearRange'
    'DaysValueChange'
    'DaysValueChangeRealtime'
    'StockExchange'
    'DividendYield'
    'PercentChange'
--

Comments and Ratings (10)

This software no longer works, Feb 14, 2017.

Martin

Martin (view profile)

Is it possible to use the function to extract the information historically? A reply is much appreciated!

Hi, I continuously get the following message:

"failed! http code: 400"

Do you know why I get it?

Thanks

Zhao Hang

kim

kim (view profile)

Thank you!

ted p teng

ted p teng (view profile)

You can use this in conjunction with my other function "Get U.S. Stock Symbol" as below.
%get tickers listed on nyse
[tickers,tickersInfo] = getStockSymbols('exch_nyse');
%get ticker information
data = getStockInformation(tickers);
%find stock with price/book < 2.
priceBook=[data.PriceBook];
stockPick=data(priceBook < 2);

ted p teng

ted p teng (view profile)

Hi Jacob, thank you for catching a bug. I have uploaded a corrected version, please re-download the file and try it again.

Jacob Bortnik

Dear Ted, thank you for sharing your work! When I ran this function, there seemed to be a function missing (getStockFundamentalsCore). Do you know where I can find it?

Also- have you ever tried to implement a matlab-based stock screener, i.e., return a list of ticker symbols based on certain filter criteria?

Thanks again!

Charles

I'm new to MATLAB and can't figure out how to use this. Were exactly do I put the ticker?

Updates

1.2

plucked a bug.

MATLAB Release
MATLAB 7.7 (R2008b)
Acknowledgements

Inspired by: Get U.S. Stock Symbols

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video