0002 m-pdr-db-20111108-v0 r0m0-en [(2011-11-08) hs-quote to excel donloading (en)]

9
HSQuote: Download data into EXCEL Organize your time series 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. 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 FinLab_IT www.finlab-it.org / [email protected]

Transcript of 0002 m-pdr-db-20111108-v0 r0m0-en [(2011-11-08) hs-quote to excel donloading (en)]

Page 1: 0002 m-pdr-db-20111108-v0 r0m0-en [(2011-11-08) hs-quote to excel donloading (en)]

HSQuote: Download data into EXCEL

Organize your time series

Organize your data is a critical success factor for any scientific work based ontheir analysis.Working on data well organized will free up the valuable and scarce time resourcemaking 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 manyprojects, also of considerable size. It is so a must-to-do organize and automate asmuch 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 engagedthroughout all phases of the trading is not less valuable than that of a companythat does this job institutionally: the time is equally scarce and valuable in bothcases.

Organize your data requires an initial investment whose cost is measurable interms of time taken for the design of the database and to carry out datamaintenance activities and quality control. This initial investment will be re-paiedin terms of time returned to the trader that he/she can spend on valuable coreactivities like data analysis/mining, study about portfolio optimization, stock-picking methods, money-management and build, update, test his/her tradingsystems.

Due to the importance of this subject, one of the Training section of Finlab-ITinitiative will be dedicated to Data.

Of course you can address the Data issue at different levels of complexity andwith different objectives. We will try to address all of them with a logical sequencethat 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 thefirst 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 seriesstored into separate worksheets by Ticker) can be necessary to a trader.

HSQuote™ will be initially used to download data from public sources intoMetastock™ files. This format allows to speed up the download, update andsearch operations on data.As soon as download phase ends, HSQuote™ lets you to transform every single

0002-M-PDR-DB-20111108-V0R0M0-EN 1 - 9Fin

Lab_IT

ww

w.fin

lab-i

t.org

/

in

form

azio

ni@

fin

lab-i

t.org

Page 2: 0002 m-pdr-db-20111108-v0 r0m0-en [(2011-11-08) hs-quote to excel donloading (en)]

HSQuote: Download data into EXCEL

Metastock™ data directory (containing multiple time series) into multiple sheetsof 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 MSExcel™ spreadsheet will be explained.As last (very simple) step, the import in an Open Source OpenOffice™ Calcspreadsheet will be showed.

0002-M-PDR-DB-20111108-V0R0M0-EN 2 - 9

Page 3: 0002 m-pdr-db-20111108-v0 r0m0-en [(2011-11-08) hs-quote to excel donloading (en)]

HSQuote: Download data into EXCEL

Database into a spreadsheet building

Suppose you want to build an electronic industry securities portfolio composedby a specific companies subset involved in microprocessors production.

Proceeding through seven logical steps you will able to generate a coherent timeseries database directly stored into MS Excel and/or OpenOffice™ Calcspreadsheet. Let we carry on with these steps.

Step 1: Portfolio Building

Started HSQuote™, type the portfolio name (Microprocessors) in the firstdropdown at the top left of the form. The .tic suffix will be automatically added byHSQuote™.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 topopulate 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

Page 4: 0002 m-pdr-db-20111108-v0 r0m0-en [(2011-11-08) hs-quote to excel donloading (en)]

HSQuote: Download data into EXCEL

Type MSI:

Now press the Add button on the right and the ticker will be added in the list boxbelow the input area :

The ticker MSI belongs now to your portfolio. Now proceed in the same way withthe other tickers.

0002-M-PDR-DB-20111108-V0R0M0-EN 4 - 9

Page 5: 0002 m-pdr-db-20111108-v0 r0m0-en [(2011-11-08) hs-quote to excel donloading (en)]

HSQuote: Download data into EXCEL

Inserting in sequence AMD, INTC, ARMH, ATML and STM will complete our firstportfolio that will looks like:

Step 3: Specify dates

Defined and populated our portfolio, you will specify the dates range (From, To) inthe Download Period dropdowns intuitively setting both Fr and To date fields:

0002-M-PDR-DB-20111108-V0R0M0-EN 5 - 9

Page 6: 0002 m-pdr-db-20111108-v0 r0m0-en [(2011-11-08) hs-quote to excel donloading (en)]

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 downloadprocess.

After the download the following message appears:

it informs you that the download is complete. Press the OK button to completethe download phase.

Step 5: Data Conversion

Now the powerful data conversion tool of HSQuote™ (the DataConverter) will beillustrated.

Downloaded data files are stored in Metastock™ format, it is time to convert theminto a more flexible format that allows a better data manipulation: the ASCIIformat (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

Page 7: 0002 m-pdr-db-20111108-v0 r0m0-en [(2011-11-08) hs-quote to excel donloading (en)]

HSQuote: Download data into EXCEL

(Metastock™ in our case), the output format, the folder where Metastock™ fileshas 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 ONand 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 filesspecified, all dates, in a spreadsheet with a work-sheet for each ticker. Thedestination file will (be careful) replaced if it already exists.

Press the Start Conversion button.

0002-M-PDR-DB-20111108-V0R0M0-EN 7 - 9

Page 8: 0002 m-pdr-db-20111108-v0 r0m0-en [(2011-11-08) hs-quote to excel donloading (en)]

HSQuote: Download data into EXCEL

Step 6: Check the spreadsheet productAfter data conversion completion, open the generated spreadsheet:

As you can see, the data is organized in different worksheets by ticker, ready tobe used to produce reports, charts, other calculated fields or, more in general, toapply on your algorithms.

0002-M-PDR-DB-20111108-V0R0M0-EN 8 - 9

Page 9: 0002 m-pdr-db-20111108-v0 r0m0-en [(2011-11-08) hs-quote to excel donloading (en)]

HSQuote: Download data into EXCEL

Step 7: Upload Data in OpenOffice™ Calc

To create an OpenOffice™ Calc spreadsheet, you need simply to open the .XLSfile that contains our portfolio with OpenOffice™, then save the worksheet inOpenOffice™ format.

Now open the new worksheet, it will appear as follow:

Conclusions

HSQuote™ allows you to download quickly and easily the stock time series fromInternet free providers directly into a spreadsheet minimizing the time needed toorganize your data.You can now invest your freed time more profitably in data analysis.

0002-M-PDR-DB-20111108-V0R0M0-EN 9 - 9