Code covered by the BSD License  

Highlights from
Get Trading Data, from Yahoo, in your Matlab Workpace (or Excel)

5.0

5.0 | 2 ratings Rate this file 50 Downloads (last 30 days) File Size: 2.63 MB File ID: #23569
image thumbnail

Get Trading Data, from Yahoo, in your Matlab Workpace (or Excel)

by Marcelo Perlin

 

06 Apr 2009 (Updated 10 May 2009)

This package provides scripts and functions for downloading trading data from Yahoo server.

| Watch this File

File Information
Description

This is a simple algorithm that downloads trading data from yahoo database. It is basically a large scale application of sqq.m which was originally submitted by Michael Boldin, link at acknowledgements.

Some of the functionalities of the package:
- User defined ticker list.
- Choice for benchmark ticker in dates comparison
- Function for downloading most recent SP500 composition in ticker list.
- Control for bad data (e.g. a certain percentage of prices missing).
- Choice of frequency of data (e.g. weekly prices).
- Choice of starting and ending data.
- Function for saving the whole data in a pre-formatted excel file together with a full reports on missing data.

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
STOCK QUOTE QUERY
This submission has inspired the following:
Candlestick Quantification

Required Products Data Acquisition Toolbox
MATLAB release MATLAB 7.6 (R2008a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (8)
23 Sep 2009 Ted Teng

Great stuff, worked like a charm! thank you!!

03 Nov 2009 mklcst mklcst

Great Work!
Sorry for my question but where do you place the benchmark in the data?

09 Nov 2009 Marcelo Perlin

Hi Michele, the benchmark asset is not downloaded. If you want it, just include the ticker in example_ticker.txt.

Marcelo.

22 Apr 2010 mklcst mklcst

Thank you Marcelo for your reply.
In my opinion this is the best script for trading data but you should also include the other data (Volume, open, close..)

23 Apr 2010 Marcelo Perlin

Michele, the other data is also included in the output. Perhaps you're using an old version ?

27 May 2010 Aris David

This is very good, this will save me time backtesting program. Thanks Marcelo. I

10 Jun 2010 mklcst mklcst

Sorry that I disappeared by I had a lot of Phd Courses. I want to restart with my project, I downloaded again the function but now I get this error:

??? Cell contents reference from a non-cell array object.

Error in ==> SP500_to_txt at 57
    fprintf(fid,[token{1},'\n']);

Error in ==> Example_Script_2 at 26
SP500_to_txt(500,ticker_fileName); % function that saves the most updated SP 500 compositions in a txt file

I am using Example2.m

12 Jun 2010 Marcelo Perlin

Replied by email.

Please login to add a comment or rating.
Updates
10 May 2009

Added the possibility of changing the benchmark ticker. Fix a bug in the xls conversion.

Tag Activity for this File
Tag Applied By Date/Time
yahoo Marcelo Perlin 06 Apr 2009 11:37:35
finance Marcelo Perlin 06 Apr 2009 11:37:35
stocks Marcelo Perlin 06 Apr 2009 11:37:35
trading data Marcelo Perlin 06 Apr 2009 11:37:35
equity Marcelo Perlin 06 Apr 2009 11:37:35
statistics Marcelo Perlin 06 Apr 2009 11:37:35
database Marcelo Perlin 06 Apr 2009 11:37:35
data import Marcelo Perlin 06 Apr 2009 11:37:35
trading data Michael Salemi 29 Oct 2010 16:42:33
yahoo Michael Salemi 29 Oct 2010 16:42:35
database Michael Salemi 29 Oct 2010 16:42:37
database Davide Guarnieri 01 May 2011 07:16:04
hsbal John 24 Jan 2012 07:28:53
sdrl John 24 Jan 2012 07:28:53
gbsl John 24 Jan 2012 07:28:53
stanl John 24 Jan 2012 07:28:53
data import John 24 Jan 2012 07:30:44

Contact us at files@mathworks.com