MarketData Folder

MarketData Folder

The MarketData folder contains a ready-to-use solution for

  • Loading key statistics, quotes, industries, historical prices, dividends, and options.
  • Importing data into a Microsoft SQL Server database.

The solution is configured for US exchanges.

You may adapt it to load data from exchanges in other countries like UK, Canada, Europe, or Australia.

Quick Start

  1. Copy the MarketData folder from the downloaded package to the root of drive C:
  2. Run C:\MarketData\RegisterProduct.exe and activate the 15-day trial.
  3. Place your tickers to C:\MarketData\symbols.txt.
  4. Run the C:\MarketData\0-run-all.cmd batch file.
  5. Open CSV files in the C:\MarketData\csv folder, for example, in Microsoft Excel.

You may edit symbols in symbols.txt and run the batch file again.
The application will load data for new symbols and reload data for others if the market is open.

Next Quick Steps

You may test the following steps if you have Microsoft SQL Server installed.

  1. Create database tables using SQL codes from the files:
    C:\MarketData\bin\mssql-create-database-google.sql
    C:\MarketData\bin\mssql-create-database-msn.sql
    C:\MarketData\bin\mssql-create-database-yahoo.sql
  2. Edit the connection credentials and uncomment commands in the C:\MarketData\3-import-data.cmd file.
  3. Run the C:\MarketData\0-run-all.cmd batch file.
  4. Select data from database tables like yahoo.QuoteSummary or yahoo.AssetProfiles.

That's all. You may add your tickers to symbol files and add batch files to Windows Scheduler to load data automatically.

Do not hesitate to contact us, if you need a solution for your database platform.

Subfolders

FolderDescription
csvThe folder contains output CSV files to load into a database.
The files are deleted after a successful import.
cacheThe folder contains outputs of the YahooFinanceHistoricalPrices provider (not actual since version 2.2).
downloadsThe folder contains archives of downloaded data.
Archives contain data for a single provider and trade date.
Keep these files to have the possibility to reparse the loaded data.
zipThe folder contains archives of output CSV data.
You may use these files to import data into a database once again.
If you successfully import data and make a backup of your database, you may delete these files.
logsThe folder contains log files.
You may delete these files at any time.
binThe folder contains SQL codes and format files used to import CSV files into SQL Server.
Also, the folder contains SQL codes to create and remove MarketData Database.

Project Files

FileDescription
symbols.txtThe file contains symbols for download.
You may place your tickers into the file using any text editor, or export symbols from your database.
You may create multiple files for different modes.
For example, you may load quotes for 2000 weekly monitored stocks
and daily option data for 200 most actively traded stocks.
0-run-all.cmdThe batch file executes download and import operations.
Use this file in Windows Schedule for automatic data download.
1-export-symbols.cmdThis is a dummy file where you may add commands to export tickers from your database to symbol files.
2-download-data.cmdThe batch file executes download operations.
The file contains commands for loading key statistics, quotes, industries, historical prices, dividends, and options.
3-import-data.cmdThis file executes import operations.
It contains calls of the sqlcmd utility to execute SQL scripts from the bin folder.
Edit the sqlcmd command if you have another SQL Server instance or other database credentials.
market.csv.exeThe application executable file.
market.csv.exe.configThe default application configuration file.
This file is used if the /config option is not specified.
You may change settings to your primary market.
RegisterProduct.exeThe product registration wizard.
bin\clean-data.cmdThis file cleans the loaded data and related files.
Use it if you want to reset the loaded data completely.
bin\YahooQuotes.fmt
bin\YahooOptions.fmt, etc.
The format files are used by SQL Server to import CSV files.
You may edit these files if you need to change column names.
Reflect such changes to SQL scripts in the bin folder.
bin\mssql-import-YahooQuotes.sql
bin\mssql-import-YahooOptions.sql, etc.
SQL scripts used to import CSV files into SQL Server.
The files contain direct paths to CSV and format files like
C:\MarketData\csv\YahooQuotes.csv
C:\MarketData\bin\YahooQuotes.fmt
Edit such paths if you place the MarketData folder in another location.
bin\mssql-create-database-google.sql
bin\mssql-create-database-msn.sql
bin\mssql-create-database-yahoo.sql
bin\mssql-remove-database.sql
SQL scripts to create and remove MarketData Database.