STOCK QUOTE QUERY

版本 1.0.0.0 (10.3 KB) 作者: Michael Boldin
Pulls stock prices for a given ticker symbol from the YAHOO web server.
12.1K 次下载
更新时间 2007/2/20

无许可证

SQQ & STOCKQUOTEQUERY pull stock prices for a given ticker symbol
from the YAHOO web server using the MATLAB Java URL interface.

STOCKQUOTEQUERY has the main code. SQQ calls STOCKQUOTEQUERY and allows for either interactive (keyboard) inputs or as a function call with numerous options for setting dates.

Outputs
DATE: Date for the quote
CLOSE: Closing market price
OPEN: Opening price
HIGH: High price (during trading day or frequency period)
LOW: Low price (during trading day or frequency period)
VOLUME: Volume (during trading day or frequency period)
CLOSEADJ: Close adjusted for splits

Use HELP SQQ for the full set of input and output options.

STOCKQUOTEQUERY is based on GETSTOCKDATA by Peter Webb of Mathworks, as explained in the October 2002 MATLAB News and Notes article "Internet Enabled Data Analysis and Visualization with MATLAB"

How to use SQQ & STOCKQUOTEQUERY
--Enter 'sqq' at the comand line for an interactive run.
--For a simple example that pulls recent data (over the past 7 days) for IBM,
try sqq('ibm',today,today-7).
--SQQEXAMPLE.M has more examples, including a demonstration of two different types
of stock quote queries and also produces three charts.

How SQQ differs from GETSTOCKDATA
--verifies YAHOO server tables have 7 elements on a line before parsing the line.
The server tables sometimes show extra lines for dividend payments and splits.
--close(breader); close(ireader); close(stream); commented out-- caused problems.
--adjusts query parameters to refer to January as month '0', not '1', and February
as '1', and so on. (This is a feature of the YAHOO system. STOCKQUOTEQUERY uses
1 to 12 numbering for months in the input-output parameter translation.)
--flips data vectors to normal date order (increasing, oldest to most recent).
--does not require month(), day() or year() functions, uses datevec.
--keeps VOLUME and CLOSEADJ data.
--SQQ has flexible input options, especially for dates.
--R12 compatible.

引用格式

Michael Boldin (2024). STOCK QUOTE QUERY (https://www.mathworks.com/matlabcentral/fileexchange/4069-stock-quote-query), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R13
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Financial Toolbox 的更多信息
致谢

参考作品: Display Stock Data

启发作品: GUI Technical Analysis Tool

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.0.0

Fixed problem caused by YAHOO changing their date format.