Search Comments and Ratings

go

   
Date File Comment by Comment Rating
23 Sep 2014 Get Stock Information from Yahoo This function allows you to pull stock information from Yahoo with Yahoo! Query Language in Matlab. Author: ted p teng kim

Thank you!

20 Sep 2014 Retinal Vessel Detection by Gabor Transform and Machine Learning, a Tutorial A tutorial on detection of retinal vessels by Gabor transform and machine learning Author: ted p teng Shahab Aslani

19 Aug 2014 Get stock option chains Get stock option chains. Author: ted p teng Beaver

https://github.com/yql/yql-tables/blob/master/yahoo/finance/yahoo.finance.stocks.xml

15 Aug 2014 Get stock option chains Get stock option chains. Author: ted p teng Beaver

FYI:

https://developer.yahoo.com/forum/YQL/finance-option-contract-s-and-yahoo-finance-options-are-down/1408037460974-afc35177-6813-417d-be5d-b551a3bf9ab0

14 Aug 2014 Get stock option chains Get stock option chains. Author: ted p teng Beaver

Running in to an error. Seen it before and it seems to go away on its own eventually.

input={'aapl'}
data = getOptionChainYQL(input)

~~~

Attempt to reference field of non-structure array.

Error in getOptionChainYQL>getOptionChainYQLCore (line 107)
symbol = char(nodeList.item(0).getAttribute('symbol'));

Error in getOptionChainYQL (line 23)
optionChain = getOptionChainYQLCore(tickers{i});

~~~

Haven't been able to pull data since yesterday evening. Any idea if the YQL is dysfunctional presently or has something in the query changed?

05 Aug 2014 Retinal Vessel Detection by Gabor Transform and Machine Learning, a Tutorial A tutorial on detection of retinal vessels by Gabor transform and machine learning Author: ted p teng Toan

Do you use the second paper in your code? The second paper looks like leve-set using gabor filter? BTW, Do you implement the scheme in the second paper?

03 Aug 2014 get Intraday Stock Price function getHistoricalIntraDayStockPrice obtains intraday stock price from Google. Author: ted p teng ted p teng

That is a great idea/question Taylor. I have been searching for free intraday forex data too, but I have not found one yet. Please share your implementation with the community if you do figure out how to get those data!

02 Aug 2014 get Intraday Stock Price function getHistoricalIntraDayStockPrice obtains intraday stock price from Google. Author: ted p teng Taylor Xie

Hi,Teng,I want to know how to download the intraday data of Forex exchange data, for example EURUSD. I want to edit your function, but I don't know the url link to get the Forex exchange rate.

10 Jul 2014 Get stock option chains Get stock option chains. Author: ted p teng Tom

Thanks for the quick implementation!

One more problem I noticed is that numbers with commas in it are converted into a vector, e.g. 1,001.5 becomes [1,1.5].
A quick solution is to remove all commas in strings before converting them to numbers. Following code should be placed on line 214 (just before converting strings to numbers):

%Remove commas from strings that contain numbers
data(i,:)= strrep(data(i,:), ',', '');

This problem occurs e.g. when looking at S&P 500 options.

09 Jul 2014 Get stock option chains Get stock option chains. Author: ted p teng ted p teng

Thank you for your contributions Tom and G. Your suggestions are now implemented!

09 Jul 2014 Get stock option chains Get stock option chains. Author: ted p teng Tom

The problem with index options is that there is the ^ symbol in the ticker.

I updated the code to also handle this symbol. The code should be placed before the for-loop in the getOptionChainYQL(tickers) function:

%Replace ^ by hexadecimal ASCII value with % in front
%Note that %25 is % and %5E is ^
tickers2=strrep(tickers, '^', '%255E');

%Add ^ (in hexadecimal ASCII format) for VIX, DJX and S&P 500
ind=find(ismember(tickers,{'VIX','DJX','SPXPM'})==1);
if ~isempty(ind)
for j = 1:length(ind)
tickers2{ind(j)}=['%255E',tickers{ind(j)}];
end
end

The first part replaces the ^ symbol by its hexadecimal ASCII value which is used in URLs.
The second-part adds the ^ symbol in correct format to tickers (without the ^ symbol) for some indices and one can of course add more index tickers if wanted.

In the for-loop, use tickers2 instead of tickers when calling getOptionChainYQLCore to have tickers with correct handling of the ^ symbol.
The original names in tickers are still used in the output structure.

Adding the piece of code gives problems when extracting the expiry from the option symbol because "%5E" is present in the symbol variable but not in the optionSymbol variable, so we should remove it again:

if strcmpi(symbol(1:3),'%5E')
symbol=symbol(4:length(symbol));
end

which should be placed after initialising the symbol variable in the getOptionChainYQLCore function.

Hope this helps and thanks for the excellent function!

09 Jul 2014 Get stock option chains Get stock option chains. Author: ted p teng Tom

20 Jun 2014 Extract Slice from Volume ExtractSlice extracts an arbitrary slice, both intensities and indices, from a given volume. Author: ted p teng Daniel Markel

I found an error when using this in 2013a occasionally when rotating the plane it would give me coordinates outside of the volume and thus return NaNs. I found changing line 95 to

rotate(hsp,hspVecXvec(:)',180*acosineVal/pi,[0,0,0]);

fixes the problem by specifying the origin when rotating.

Cheers,

-Daniel

19 May 2014 Get stock option chains Get stock option chains. Author: ted p teng Muhammad Hasnat

works for most of stocks but I get this error for options like BMW and few others:
Attempt to reference field of non-structure array.
Error in getOptionChainYQL>getOptionChainYQLCore (line 107)
symbol = char(nodeList.item(0).getAttribute('symbol'));

Error in getOptionChainYQL (line 23)
optionChain = getOptionChainYQLCore(tickers{i});

20 Apr 2014 Retinal Vessel Detection by Gabor Transform and Machine Learning, a Tutorial A tutorial on detection of retinal vessels by Gabor transform and machine learning Author: ted p teng ted p teng

Elad, Thanks for the 5 stars rating!
Ashkan, you are welcome. Glad to see someone is benefiting from this.

An updated and more readable version of the same tutorial can be found at
http://imageprocessingblog.com/retinal-vessel-detection-by-gabor-transform-and-machine-learning-a-tutorial/

16 Apr 2014 Retinal Vessel Detection by Gabor Transform and Machine Learning, a Tutorial A tutorial on detection of retinal vessels by Gabor transform and machine learning Author: ted p teng ashkan abbasi

thanks for sharing

01 Apr 2014 Retinal Vessel Detection by Gabor Transform and Machine Learning, a Tutorial A tutorial on detection of retinal vessels by Gabor transform and machine learning Author: ted p teng Elad

06 Mar 2014 get Intraday Stock Price function getHistoricalIntraDayStockPrice obtains intraday stock price from Google. Author: ted p teng ted p teng

I have wondered that myself and could not find any documentation for Finviz. Stackoverflow might be a good place to ask this, I did a quick search there, there is not much on Finviz (
http://stackoverflow.com/search?q=finviz )

I'm not sure what kind of data you need, but if it is available on yahoo, you can refer to my other function "get-stock-information-from-yahoo" as a template for downloading data with YQL. Best of luck.

04 Mar 2014 get Intraday Stock Price function getHistoricalIntraDayStockPrice obtains intraday stock price from Google. Author: ted p teng Ryan

Another question Ted...Have you been able to find any actual documentation for finviz.com? I have been looking all over for it but can't find anything anywhere. All I have found is a few random posts where people have used queries similar to the one you have used.

04 Mar 2014 View and add transaction to portfolios on Google Finance View and add transactions to portfolios on Google Finance. A Google account will be required. Author: ted p teng ted p teng

Hi Emad. Unfortunately, Google no longer offers this service.* See the following link for alternative methods. Please do share your solutions on the FEX! :)
http://stackoverflow.com/questions/16509443/way-to-access-users-google-finance-portfolio

*https://developers.google.com/finance/

03 Mar 2014 View and add transaction to portfolios on Google Finance View and add transactions to portfolios on Google Finance. A Google account will be required. Author: ted p teng Emad Hasan

Hi, Does this code still work? I just tried it on a 32-bit 2013b but did not work. Got the following error.

Java exception occurred:
java.io.IOException: Server returned HTTP response code: 403 for URL: http://finance.google.com/finance/feeds/default/portfolios/10/positions/NASDAQ:GOOG/transactions/

at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)

from line: 73

28 Feb 2014 get Intraday Stock Price function getHistoricalIntraDayStockPrice obtains intraday stock price from Google. Author: ted p teng ted p teng

Thanks Ryan. To my knowledge, there are no publicly accessible historical option data, intraday or daily. But if you do find it, it would be great if you can share it on this file exchange. :)

28 Feb 2014 get Intraday Stock Price function getHistoricalIntraDayStockPrice obtains intraday stock price from Google. Author: ted p teng Ryan

Great Work! By chance, do you know if it's possible to download historical intraday option data from google or yahoo?

05 Feb 2014 Get stock option chains Get stock option chains. Author: ted p teng Sam Da

It does not work for index options like ^VIX. I am not familiar with Java so it will be nice if someone can update the code to pull index options as well.

17 Nov 2013 Get U.S. Stock Symbols getStockSymbols obtains symbols in U.S. stock markets or symbols of U.S. index components. Author: ted p teng ted p teng

@David, For basic fundamentals, see:
http://www.mathworks.com/matlabcentral/fileexchange/34075-get-stock-information-from-yahoo

17 Nov 2013 Get stock option chains Get stock option chains. Author: ted p teng ted p teng

@G, thanks for the excellent suggestion!

17 Nov 2013 Get U.S. Stock Symbols getStockSymbols obtains symbols in U.S. stock markets or symbols of U.S. index components. Author: ted p teng ted p teng

For daily open-high-low-close, see the below
http://www.mathworks.com/matlabcentral/fileexchange/18458-historical-stock-data-downloader
http://www.mathworks.com/matlabcentral/fileexchange/25433-google-finance-historical-stock-data-downloader
For intraday open-high-low-close, see:
http://www.mathworks.com/matlabcentral/fileexchange/32745-get-intraday-stock-price
While for options, see:
http://www.mathworks.com/matlabcentral/fileexchange/37981-get-stock-option-chains
Have fun!

17 Nov 2013 Get U.S. Stock Symbols getStockSymbols obtains symbols in U.S. stock markets or symbols of U.S. index components. Author: ted p teng David Gerhard D

Thank you for your fast answer. I dont have this error anymore. Can i get historical data with this tool ? what command do i have to type ?

17 Nov 2013 Get U.S. Stock Symbols getStockSymbols obtains symbols in U.S. stock markets or symbols of U.S. index components. Author: ted p teng ted p teng

@David, what would you like to do?

15 Nov 2013 Get U.S. Stock Symbols getStockSymbols obtains symbols in U.S. stock markets or symbols of U.S. index components. Author: ted p teng David Gerhard D

what am i doing wrong ?

>> getStockSymbols
need at least 1 parameter (getTickers.m)
Error using getStockSymbols (line 23)
Not enough input arguments.

function [tickers,tickersInfo] = getStockSymbols(index)
|
Error: Function definitions are not permitted in this
context.

24 Aug 2013 Get stock option chains Get stock option chains. Author: ted p teng G

Consider updating to handle the miniOptions that are now available for a few stocks such as AAPL.

I modified to the following:
%get expiration from symbol
miniOption = ~cellfun(@isempty, regexp(optionSymbol, ['^',symbol,'7']));
expiration = zeros(numel(miniOption),1);
expiration(~miniOption) = datenum(cellfun(@(x) x(numel(symbol)+1:numel(symbol)+6),optionSymbol(~miniOption),'UniformOutput',false),'yymmdd');
if sum(miniOption) > 0
expiration(miniOption) = datenum(cellfun(@(x) x(numel(symbol)+2:numel(symbol)+7),optionSymbol(miniOption),'UniformOutput',false),'yymmdd');
end
expirationStr = datestr(expiration);

22 Aug 2013 Get stock option chains Get stock option chains. Author: ted p teng Beaver

Any idea about the following error? it was working one minute and not working the next... Yhoo didn't change their query paths I hope?

Attempt to reference field of non-structure array.

Error in getOptionChainYQL>getOptionChainYQLCore (line 107)
symbol = char(nodeList.item(0).getAttribute('symbol'));

Error in getOptionChainYQL (line 23)
optionChain = getOptionChainYQLCore(tickers{i});

22 Jul 2013 View and add transaction to portfolios on Google Finance View and add transactions to portfolios on Google Finance. A Google account will be required. Author: ted p teng DMITRI

I am trying googlePortfolioHoldingsExample and getting Java exception:

Java exception occurred:
java.io.IOException: Server returned HTTP response code: 403 for URL: http://finance.google.com/finance/feeds/default/portfolios/42/positions/NASDAQ:GOOG/transactions/

at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)

from line: 73

Is this API still working?

22 Apr 2013 View and add transaction to portfolios on Google Finance View and add transactions to portfolios on Google Finance. A Google account will be required. Author: ted p teng ted p teng

glad you liked it! thanks for the 5 star rating. :)

21 Apr 2013 View and add transaction to portfolios on Google Finance View and add transactions to portfolios on Google Finance. A Google account will be required. Author: ted p teng Mirko

Ted, again a smart idea.

21 Apr 2013 Get stock option chains Get stock option chains. Author: ted p teng Mirko

Super tool. This is what I was looking for.

05 Oct 2012 Multi-order State-transition Matrix Construct a multi-order state-transition matrix. Author: ted p teng Fatemeh Razavi

16 Aug 2012 Get Stock Information from Yahoo This function allows you to pull stock information from Yahoo with Yahoo! Query Language in Matlab. Author: ted p teng ted p teng

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);

16 Aug 2012 Get Stock Information from Yahoo This function allows you to pull stock information from Yahoo with Yahoo! Query Language in Matlab. Author: ted p teng ted p teng

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

31 Jul 2012 Get Stock Information from Yahoo This function allows you to pull stock information from Yahoo with Yahoo! Query Language in Matlab. Author: ted p teng 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!

25 May 2012 Get Stock Information from Yahoo This function allows you to pull stock information from Yahoo with Yahoo! Query Language in Matlab. Author: ted p teng Charles

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

06 Sep 2011 View and add transaction to portfolios on Google Finance View and add transactions to portfolios on Google Finance. A Google account will be required. Author: ted p teng ted p teng

Please note that this function will not work on the 64-bit version of Matlab.

15 Aug 2011 Get U.S. Stock Symbols getStockSymbols obtains symbols in U.S. stock markets or symbols of U.S. index components. Author: ted p teng ted p teng

Thank you Dan, you can head to the website's screener feature to see what they have to offer. Click on help (top right corner of website) for the calculation of each parameter.

15 Aug 2011 Extract Slice from Volume ExtractSlice extracts an arbitrary slice, both intensities and indices, from a given volume. Author: ted p teng Jian Lin

Thank you very much! I really appreciate your work.
I downloaded the updated function and tested it. Yes, it gave me the unrounded xd (subX), yd (subY) and zd (subZ) which I needed. Great! Thanks!
Since I also need the values of the extracted plane from subX, subY and subZ (sorry for not metioning it in my previous email), I added the line to extractSlice before "for" loop,
h = slice(volume, subX, subY, subZ);
plane= get(h,'CData');
For a point on the plane, plane(i,j), I can get its coordinate [subX(i,j), subY(i,j) subZ(i,j)].
Hope what I did makes sense to you. I am happy to hear your comments.

15 Aug 2011 Get U.S. Stock Symbols getStockSymbols obtains symbols in U.S. stock markets or symbols of U.S. index components. Author: ted p teng Dan

Good job!!
Great financial Web site. Do they have fundamental info to be retrieved (e.g. sales, net income, etc.) from their quarterly reports?

13 Aug 2011 Extract Slice from Volume ExtractSlice extracts an arbitrary slice, both intensities and indices, from a given volume. Author: ted p teng ted p teng

Hi Jian, Please give the updated function a try!

09 Aug 2011 Extract Slice from Volume ExtractSlice extracts an arbitrary slice, both intensities and indices, from a given volume. Author: ted p teng Jian Lin

Thanks.
Do you have any idea how to extract the slice with unrounded xd, yd and zd in ExtractSlice?

08 Aug 2011 Extract Slice from Volume ExtractSlice extracts an arbitrary slice, both intensities and indices, from a given volume. Author: ted p teng ted p teng

Hi Jian, Feel free to change the code in any way you like, as long as it works for you!

08 Aug 2011 Extract Slice from Volume ExtractSlice extracts an arbitrary slice, both intensities and indices, from a given volume. Author: ted p teng Jian Lin

I checked again and was wrong with what I mentioned in my previous email. The shift is right!
After rotation, xd, yd and zd are rounded before "for" loop of ExtractSlice. I am wondering if it is possible for ExtractSlice to extract slice with xd,yd and zd without rounding.

Thanks for your help in advance.

Jian

02 Aug 2011 Extract Slice from Volume ExtractSlice extracts an arbitrary slice, both intensities and indices, from a given volume. Author: ted p teng ted p teng

Can you try to duplicate the same error with the example data as provided in the extractSlice function and paste the code here?

Contact us