Rank: 400539 based on 0 downloads (last 30 days) and 0 file submitted
photo

G

E-mail

Personal Profile:

 

Watch this Author's files

 

Comments and Ratings by G
Updated File Comments Rating
24 Aug 2013 Get stock option chains Get stock option chains. Author: ted p teng

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

Contact us