Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
0002 m-pdr-db-20111108-v0 r0m0-en [(2011-11-08) hs-quote to excel donloading (en)]
1. HSQuote: Download data into EXCEL
Organize your time series
www.finlab-it.org / informazioni@finlab-it.org
Organize your data is a critical success factor for any scientific work based on
their analysis.
Working on data well organized will free up the valuable and scarce time resource
making it available for core activities like data analysis, research and so on.
A sub-optimal or non-existent data organization is often cause of failure of many
projects, also of considerable size. It is so a must-to-do organize and automate as
much as possible this operational step.
It's absolutely false that focusing on data is vital only for large (enterprise)
projects. The time of a trader that is looking to become personally engaged
throughout all phases of the trading is not less valuable than that of a company
that does this job institutionally: the time is equally scarce and valuable in both
cases.
Organize your data requires an initial investment whose cost is measurable in
terms of time taken for the design of the database and to carry out data
maintenance activities and quality control. This initial investment will be re-paied
in terms of time returned to the trader that he/she can spend on valuable core
activities like data analysis/mining, study about portfolio optimization, stock-
picking methods, money-management and build, update, test his/her trading
systems.
Due to the importance of this subject, one of the Training section of Finlab-IT
initiative will be dedicated to Data.
Of course you can address the Data issue at different levels of complexity and
with different objectives. We will try to address all of them with a logical sequence
that starts from the download of time-series to the use of a full function DBMS
(Data Base Management System) to store and manage stock time series.
The aim of this paper is to show how HSQuote™ allows you to quickly build the
first embryo of a structured database and made it available in a spreadsheet,
organized by Ticker.
You will also learn how an embryonic degree of data organization (time series
stored into separate worksheets by Ticker) can be necessary to a trader.
FinLab_IT
HSQuote™ will be initially used to download data from public sources into
Metastock™ files. This format allows to speed up the download, update and
search operations on data.
As soon as download phase ends, HSQuote™ lets you to transform every single
0002-M-PDR-DB-20111108-V0R0M0-EN 1-9
2. HSQuote: Download data into EXCEL
Metastock™ data directory (containing multiple time series) into multiple sheets
of a worksheet on which the trader can operate through the classic MS Excel™
computational and/or statistical features.
A complete procedure to build a portfolio in seven logical steps will be illustrated.
All steps from portfolio creation, to the download of time series into an MS
Excel™ spreadsheet will be explained.
As last (very simple) step, the import in an Open Source OpenOffice™ Calc
spreadsheet will be showed.
0002-M-PDR-DB-20111108-V0R0M0-EN 2-9
3. HSQuote: Download data into EXCEL
Database into a spreadsheet building
Suppose you want to build an electronic industry securities portfolio composed
by a specific companies subset involved in microprocessors production.
Proceeding through seven logical steps you will able to generate a coherent time
series database directly stored into MS Excel and/or OpenOffice™ Calc
spreadsheet. Let we carry on with these steps.
Step 1: Portfolio Building
Started HSQuote™, type the portfolio name (Microprocessors) in the first
dropdown at the top left of the form. The .tic suffix will be automatically added by
HSQuote™.
Leave "As in Preference Setting" option in the Server dropdown.
Select (top right) ASCII File for Metastock™ and Convert to MS Files options.
The form now appear as follows:
Step 2: Entering and creating Tickers portfolio
A new portfolio named Microprocessors has been created. Now you have to
populate it with securities time series of our interest.
Just enter the first ticker in the input box under the Tickers section.
0002-M-PDR-DB-20111108-V0R0M0-EN 3-9
4. HSQuote: Download data into EXCEL
Type MSI:
Now press the Add button on the right and the ticker will be added in the list box
below the input area :
The ticker MSI belongs now to your portfolio. Now proceed in the same way with
the other tickers.
0002-M-PDR-DB-20111108-V0R0M0-EN 4-9
5. HSQuote: Download data into EXCEL
Inserting in sequence AMD, INTC, ARMH, ATML and STM will complete our first
portfolio that will looks like:
Step 3: Specify dates
Defined and populated our portfolio, you will specify the dates range (From, To) in
the Download Period dropdowns intuitively setting both Fr and To date fields:
0002-M-PDR-DB-20111108-V0R0M0-EN 5-9
6. HSQuote: Download data into EXCEL
Step 4: Download data
Make sure you are connected to the Internet and that the antivirus (if installed)
let pass the program HSQuote.exe
Now everything is properly set. Press the Start button to run the download
process.
After the download the following message appears:
it informs you that the download is complete. Press the OK button to complete
the download phase.
Step 5: Data Conversion
Now the powerful data conversion tool of HSQuote™ (the DataConverter) will be
illustrated.
Downloaded data files are stored in Metastock™ format, it is time to convert them
into a more flexible format that allows a better data manipulation: the ASCII
format (Plain Text).
DataConverter perform this functionality. It is accessible from the product menu
(Menu Open button at the bottom left).
You will use the following form to specify the input format of the data
0002-M-PDR-DB-20111108-V0R0M0-EN 6-9
7. HSQuote: Download data into EXCEL
(Metastock™ in our case), the output format, the folder where Metastock™ files
has been downloaded, dates range, destination folder, the name of the output file,
and the fields and separator that will be generated in the ASCII output files.
Finally pay attention to the DataConverter flags setting: the light green is for ON
and dark green is for OFF. Be sure the flags is set as in the following figure:
Translating the flags into words, the meaning is : the conversion of all files
specified, all dates, in a spreadsheet with a work-sheet for each ticker. The
destination file will (be careful) replaced if it already exists.
Press the Start Conversion button.
0002-M-PDR-DB-20111108-V0R0M0-EN 7-9
8. HSQuote: Download data into EXCEL
Step 6: Check the spreadsheet product
After data conversion completion, open the generated spreadsheet:
As you can see, the data is organized in different worksheets by ticker, ready to
be used to produce reports, charts, other calculated fields or, more in general, to
apply on your algorithms.
0002-M-PDR-DB-20111108-V0R0M0-EN 8-9
9. HSQuote: Download data into EXCEL
Step 7: Upload Data in OpenOffice™ Calc
To create an OpenOffice™ Calc spreadsheet, you need simply to open the .XLS
file that contains our portfolio with OpenOffice™, then save the worksheet in
OpenOffice™ format.
Now open the new worksheet, it will appear as follow:
Conclusions
HSQuote™ allows you to download quickly and easily the stock time series from
Internet free providers directly into a spreadsheet minimizing the time needed to
organize your data.
You can now invest your freed time more profitably in data analysis.
0002-M-PDR-DB-20111108-V0R0M0-EN 9-9