Serving the Quantitative Finance Community

 
User avatar
yoshimura1
Topic Author
Posts: 0
Joined: July 5th, 2005, 1:25 am

copying data from websites

March 5th, 2009, 10:32 am

i am trying to get some end of day stock prices from the internet (reuters/yahoo finance) onto my excel automatically. neevr tried that before, could anyone pls point me to the relevant tools ? thanks a lot
 
User avatar
DominicConnor
Posts: 41
Joined: July 14th, 2002, 3:00 am

copying data from websites

March 5th, 2009, 11:50 am

You want to look at imacros from iopus, it can suck out stuff from sites, and put thme in CSVs, etc
Last edited by DominicConnor on March 4th, 2009, 11:00 pm, edited 1 time in total.
 
User avatar
quantmeh
Posts: 0
Joined: April 6th, 2007, 1:39 pm

copying data from websites

March 5th, 2009, 11:57 am

I think in google spreadsheet u can do it by simply calling a func on ticker
 
User avatar
yoshimura1
Topic Author
Posts: 0
Joined: July 5th, 2005, 1:25 am

copying data from websites

March 5th, 2009, 12:39 pm

my colleague has a excel sheet that goes to yahoo and copies stock prices from the site onto the excelsheet. how can it be done? he said WebQuery and something about HTML. any ideas? thanks.
 
User avatar
Traden4Alpha
Posts: 3300
Joined: September 20th, 2002, 8:30 pm

copying data from websites

March 5th, 2009, 1:32 pm

Can't you get a copy of your colleague's spreadsheet and modify it?
 
User avatar
dirtydroog
Posts: 0
Joined: July 12th, 2007, 6:32 pm

copying data from websites

March 5th, 2009, 2:08 pm

Data->Import External Data->New WebQueryFollow the GUI. It's simple. One problem with it is if the query fails you always get a message box, I don't know how to turn this off.
Last edited by dirtydroog on March 4th, 2009, 11:00 pm, edited 1 time in total.
 
User avatar
yoshimura1
Topic Author
Posts: 0
Joined: July 5th, 2005, 1:25 am

copying data from websites

March 6th, 2009, 2:40 am

QuoteOriginally posted by: Traden4AlphaCan't you get a copy of your colleague's spreadsheet and modify it?because the data that i try to copy from the internet are different, and from different websites as well.
 
User avatar
Yossarian22
Posts: 4
Joined: March 15th, 2007, 2:27 am

copying data from websites

March 6th, 2009, 3:09 am

try using a perl script to scrape the website. Here is a simple (and rough) script for getting data# yahoo_search.pl# Accepts a search term and shows the top results.# Usage: yahoo_search.pl <Query>## You can create an AppID, and read the full documentation# for Yahoo! Web Services at http://developer.yahoo.net/use strict;use LWP::Simple;use XML::Simple;# Set your unique Yahoo! Application IDmy $appID = "insert your app ID";# Grab the incoming search querymy $query = join(' ', @ARGV) or die "Usage: yahoo_search.pl <query>\n";# Construct a Yahoo! Search Query with only required optionsmy $language = "en";my $req_url = "http://api.search.yahoo.com/";$req_url .= "WebSearchService/V1/webSearch?";$req_url .= "appid=$appID";$req_url .= "&query=$query";$req_url .= "&language=$language";# Make the requestmy $yahoo_response = get($req_url);# Parse the XMLmy $xmlsimple = XML::Simple->new( );my $yahoo_xml = $xmlsimple->XMLin($yahoo_response);# Initialize results countermy $i;# Loop through the items returned, printing them outforeach my $result (@{$yahoo_xml->{Result}}) {$i++;my $title = $result->{Title};my $summary = $result->{Summary};my $url = $result->{Url};print "$i. $title\n$summary\n$url\n\n";}
 
User avatar
Paul
Posts: 7047
Joined: July 20th, 2001, 3:28 pm

copying data from websites

March 6th, 2009, 6:33 am

Do what dirtydroog says. That's what I do, and if I can do it anyone can!I found imacros from iopus to be a bit unstable.P
 
User avatar
yoshimura1
Topic Author
Posts: 0
Joined: July 5th, 2005, 1:25 am

copying data from websites

March 6th, 2009, 7:25 am

say i am just trying to grab 3 years end of day stock prices from reuters into matlab to calculate vol.i just wanna input the ticker into matlab and get the black scholes price.how do i get the stock prices from reuters (website not xtra) onto matlab ?? thanks.