Code covered by the BSD License
-
builduniverse(y,s,d1,d2,p)
BUILDUNIVERSE Portfolio matrix with total return price data from Yahoo.
-
close(c)
CLOSE Close connection to Yahoo.
-
display(c)
DISPLAY Yahoo connection object display method.
-
get(c,p)
GET Get YahooRT connection properties.
-
isconnection(c)
ISCONNECTION True if valid YahooRT connection.
-
subsref(a,s)
SUBSREF Subscripted reference for Datafeed Toolbox object.
-
trpdata(y,s,d1,d2,p)
TRPDATA Data needed to generate total return price series.
-
yahooRT(varargin)
YAHOORT Extends the YAHOO datafeed to allow real-time access for Yahoo Premium
-
Contents.m
-
yahooRTdemo.m
-
View all files
from
Real-Time Datafeed from Yahoo!
by Eric Johnson
Extension of Datafeed Toolbox's Yahoo object, allowing real-time data to be fetched
|
| yahooRTdemo.m |
%YAHOORTDEMO verifies that YAHOORT is returning real-time data by comparing the
%timestamp on data returned by YAHOO vs. YAHOORT.
%
% NOTE: There's only a difference during active trading hours! (9:30am-4pm ET)
%
% For instructions on YAHOORT, type
% help yahooRT
% at the MATLAB command prompt.
% Must set to a valid Yahoo account subscribed to Yahoo Premium Finance.
username = '';
password = '';
y = yahoo;
r = yahooRT(username,password);
% FETCH delayed Yahoo data
dataY = fetch(y,'GM')
timeY = dataY.Date+dataY.Time;
datestr(timeY)
fprintf('\n');
% FETCH real-time Yahoo data
dataR = fetch(r,'GM')
timeR = dataR.Date+dataR.Time;
datestr(timeR)
fprintf('\n');
% Show the difference between the timestamps
fprintf('Difference between times: %s\n', datestr(timeR-timeY,'HH:MM:SS'));
|
|
Contact us at files@mathworks.com