<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: How to Import Stock Statistics into Matlab</title>
	<atom:link href="http://luminouslogic.com/how-to-import-stock-statistics-into-matlab.htm/feed" rel="self" type="application/rss+xml" />
	<link>http://luminouslogic.com/how-to-import-stock-statistics-into-matlab.htm</link>
	<description>Stock-picking is an art.  I have sympathy for all who attempt it.</description>
	<lastBuildDate>Sat, 04 Feb 2012 09:22:49 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>By: How to Get a Stock Quote Using Matlab?luminouslogic? &#171; Whool!</title>
		<link>http://luminouslogic.com/how-to-import-stock-statistics-into-matlab.htm/comment-page-1#comment-2590</link>
		<dc:creator>How to Get a Stock Quote Using Matlab?luminouslogic? &#171; Whool!</dc:creator>
		<pubDate>Tue, 28 Dec 2010 04:07:32 +0000</pubDate>
		<guid isPermaLink="false">http://luminouslogic.com/how-to-import-stock-statistics-into-matlab.htm#comment-2590</guid>
		<description>[...] Posted by Crews on 24th July 2009    ????: http://www.whool.net/archives/11919 While a  previous article covered how to use Matlab to retrieve certain stock statistics from Yahoo! Finance, I thought I [...]</description>
		<content:encoded><![CDATA[<p>[...] Posted by Crews on 24th July 2009    ????: <a href="http://www.whool.net/archives/11919" rel="nofollow">http://www.whool.net/archives/11919</a> While a  previous article covered how to use Matlab to retrieve certain stock statistics from Yahoo! Finance, I thought I [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ggeeek</title>
		<link>http://luminouslogic.com/how-to-import-stock-statistics-into-matlab.htm/comment-page-1#comment-2245</link>
		<dc:creator>ggeeek</dc:creator>
		<pubDate>Wed, 29 Jul 2009 19:34:17 +0000</pubDate>
		<guid isPermaLink="false">http://luminouslogic.com/how-to-import-stock-statistics-into-matlab.htm#comment-2245</guid>
		<description>@lumilog
Hey thanks for helping out earlier. I need some help again. 
I have modified your code to get various statistical values from yahoo finance. But, the problem is when I  try to write that value in excel(for further equity report update).

for eg: to get avg_vol
function avg_vol = get_avg_vol(stock_symbol)

stock_symbol = upper(stock_symbol);
% Open connection to Yahoo! Finance statistics page
fprintf(1,&#039;Retrieving Average Volume(3 month) for %s...&#039;, stock_symbol);
url_name = strcat(&#039;http://finance.yahoo.com/q/ks?s=&#039;,  stock_symbol);
url     = java.net.URL(url_name);        % Construct a URL object
is      = openStream(url);              % Open a connection to the URL
isr     = java.io.InputStreamReader(is);
br      = java.io.BufferedReader(isr);

% Cycle through the source code until we find Average Volume...
while 1
    line_buff = char(readLine(br));
    ptr       = strfind(line_buff, &#039;Average Volume&#039;);
    
    % ...And break when we find it
    if length(ptr) &gt; 0,break; end
    
    % Handle the case where either data not available or no Average Volume
    no_data   = strfind(line_buff, &#039;There is no&#039;);
    if length(no_data) &gt; 0, 
        fprintf(1,&#039;Yahoo! Finance does not currently have Average Volume for %s.\n&#039;,stock_symbol);
        avg_vol = NaN;
        return; 
    end
end

% Just to make it easier, strip off all the preceeding stuff we don&#039;t want
line_buff   = line_buff(ptr:end);

% Extract the Average Volume(3 month)
ptr_gt      = strfind(line_buff,&#039;&gt;&#039;);
ptr_lt      = strfind(line_buff,&#039;&lt;&#039;);
avg_vol = (line_buff(ptr_gt(6)+1:ptr_lt(7)-1));

if length(avg_vol) == 0
    fprintf(1,&#039;N/A\n&#039;);
else
    fprintf(1,&#039; = %s\n&#039;, avg_vol); 
end

--------------------------------
by doing this, avg_vol is stored as a character with commas. How can I get the vol amount directly so that I can write it directly to excel in matlab. 
This holds true even for market cap which is represented in &#039;M&#039; 

thanks for helping out earlier.</description>
		<content:encoded><![CDATA[<p>@lumilog<br />
Hey thanks for helping out earlier. I need some help again.<br />
I have modified your code to get various statistical values from yahoo finance. But, the problem is when I  try to write that value in excel(for further equity report update).</p>
<p>for eg: to get avg_vol<br />
function avg_vol = get_avg_vol(stock_symbol)</p>
<p>stock_symbol = upper(stock_symbol);<br />
% Open connection to Yahoo! Finance statistics page<br />
fprintf(1,&#8217;Retrieving Average Volume(3 month) for %s&#8230;&#8217;, stock_symbol);<br />
url_name = strcat(&#8216;<a href="http://finance.yahoo.com/q/ks?s=&#039;" rel="nofollow">http://finance.yahoo.com/q/ks?s=&#039;</a>,  stock_symbol);<br />
url     = java.net.URL(url_name);        % Construct a URL object<br />
is      = openStream(url);              % Open a connection to the URL<br />
isr     = java.io.InputStreamReader(is);<br />
br      = java.io.BufferedReader(isr);</p>
<p>% Cycle through the source code until we find Average Volume&#8230;<br />
while 1<br />
    line_buff = char(readLine(br));<br />
    ptr       = strfind(line_buff, &#8216;Average Volume&#8217;);</p>
<p>    % &#8230;And break when we find it<br />
    if length(ptr) &gt; 0,break; end</p>
<p>    % Handle the case where either data not available or no Average Volume<br />
    no_data   = strfind(line_buff, &#8216;There is no&#8217;);<br />
    if length(no_data) &gt; 0,<br />
        fprintf(1,&#8217;Yahoo! Finance does not currently have Average Volume for %s.\n&#8217;,stock_symbol);<br />
        avg_vol = NaN;<br />
        return;<br />
    end<br />
end</p>
<p>% Just to make it easier, strip off all the preceeding stuff we don&#8217;t want<br />
line_buff   = line_buff(ptr:end);</p>
<p>% Extract the Average Volume(3 month)<br />
ptr_gt      = strfind(line_buff,&#8217;&gt;&#8217;);<br />
ptr_lt      = strfind(line_buff,&#8217;&lt;&#8217;);<br />
avg_vol = (line_buff(ptr_gt(6)+1:ptr_lt(7)-1));</p>
<p>if length(avg_vol) == 0<br />
    fprintf(1,&#8217;N/A\n&#8217;);<br />
else<br />
    fprintf(1,&#8217; = %s\n&#8217;, avg_vol);<br />
end</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
by doing this, avg_vol is stored as a character with commas. How can I get the vol amount directly so that I can write it directly to excel in matlab.<br />
This holds true even for market cap which is represented in &#8216;M&#8217; </p>
<p>thanks for helping out earlier.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ggeeek</title>
		<link>http://luminouslogic.com/how-to-import-stock-statistics-into-matlab.htm/comment-page-1#comment-2244</link>
		<dc:creator>ggeeek</dc:creator>
		<pubDate>Wed, 29 Jul 2009 14:22:49 +0000</pubDate>
		<guid isPermaLink="false">http://luminouslogic.com/how-to-import-stock-statistics-into-matlab.htm#comment-2244</guid>
		<description>@lumilog. 
Thanks a ton for  your reply.</description>
		<content:encoded><![CDATA[<p>@lumilog.<br />
Thanks a ton for  your reply.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: How to Get a Stock Quote Using Matlab?luminouslogic? &#124; WhooL !</title>
		<link>http://luminouslogic.com/how-to-import-stock-statistics-into-matlab.htm/comment-page-1#comment-2234</link>
		<dc:creator>How to Get a Stock Quote Using Matlab?luminouslogic? &#124; WhooL !</dc:creator>
		<pubDate>Fri, 24 Jul 2009 02:28:18 +0000</pubDate>
		<guid isPermaLink="false">http://luminouslogic.com/how-to-import-stock-statistics-into-matlab.htm#comment-2234</guid>
		<description>[...] covered how to use Matlab to retrieve certain stock statistics from Yahoo! Finance, I &quot;; While a previous article covered how to use Matlab to retrieve certain stock statistics from Yahoo! Finance, I thought I [...]</description>
		<content:encoded><![CDATA[<p>[...] covered how to use Matlab to retrieve certain stock statistics from Yahoo! Finance, I &#8220;; While a previous article covered how to use Matlab to retrieve certain stock statistics from Yahoo! Finance, I thought I [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lumilog</title>
		<link>http://luminouslogic.com/how-to-import-stock-statistics-into-matlab.htm/comment-page-1#comment-2219</link>
		<dc:creator>Lumilog</dc:creator>
		<pubDate>Fri, 10 Jul 2009 11:44:26 +0000</pubDate>
		<guid isPermaLink="false">http://luminouslogic.com/how-to-import-stock-statistics-into-matlab.htm#comment-2219</guid>
		<description>To get Forward P/E I had to make 3 changes to the file (if you&#039;re interested search the code for comments &quot;Change #1&quot;, &quot;Change #2&quot;, and &quot;Change #3&quot;).

Here&#039;s a link to it.
&lt;a href=&quot;http://www.luminouslogic.com/matlab_stock_scripts/get_fwd_pe.m&quot; rel=&quot;nofollow&quot;&gt;get_fwd_pe.m&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>To get Forward P/E I had to make 3 changes to the file (if you&#8217;re interested search the code for comments &#8220;Change #1&#8243;, &#8220;Change #2&#8243;, and &#8220;Change #3&#8243;).</p>
<p>Here&#8217;s a link to it.<br />
<a href="http://www.luminouslogic.com/matlab_stock_scripts/get_fwd_pe.m" rel="nofollow">get_fwd_pe.m</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ggeeek</title>
		<link>http://luminouslogic.com/how-to-import-stock-statistics-into-matlab.htm/comment-page-1#comment-2216</link>
		<dc:creator>ggeeek</dc:creator>
		<pubDate>Thu, 09 Jul 2009 20:01:26 +0000</pubDate>
		<guid isPermaLink="false">http://luminouslogic.com/how-to-import-stock-statistics-into-matlab.htm#comment-2216</guid>
		<description>Hi, I am trying to use the code to extract &quot;forward pe&#039; data. But the thing is, on the source code the forward pe value is located on the next line. please help</description>
		<content:encoded><![CDATA[<p>Hi, I am trying to use the code to extract &#8220;forward pe&#8217; data. But the thing is, on the source code the forward pe value is located on the next line. please help</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AVINASH.V</title>
		<link>http://luminouslogic.com/how-to-import-stock-statistics-into-matlab.htm/comment-page-1#comment-659</link>
		<dc:creator>AVINASH.V</dc:creator>
		<pubDate>Sun, 30 Dec 2007 17:56:01 +0000</pubDate>
		<guid isPermaLink="false">http://luminouslogic.com/how-to-import-stock-statistics-into-matlab.htm#comment-659</guid>
		<description>Hey man, I have been reading all the posts in your blog.please help me, i have few queries.
This matlab thing is interesting to me since, i am an engineer myself.
So can you tell me how to make use of these codes with matlab?
should i enter the same code in matlab?
where and how should i use this code?
your response will be greatly valuable to me, and enhance my learning.

Thanking you in advance...............</description>
		<content:encoded><![CDATA[<p>Hey man, I have been reading all the posts in your blog.please help me, i have few queries.<br />
This matlab thing is interesting to me since, i am an engineer myself.<br />
So can you tell me how to make use of these codes with matlab?<br />
should i enter the same code in matlab?<br />
where and how should i use this code?<br />
your response will be greatly valuable to me, and enhance my learning.</p>
<p>Thanking you in advance&#8230;&#8230;&#8230;&#8230;&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

