Omicron Research Institute

QuanTek Econometric & Technical Analysis Software

Accessing Database Data

At present, QuanTek supports data download from two different databases, Alpha Vantage (a free data source), and EOD Historical Data (not to be confused with eoddata) (an inexpensive data source). The characteristics of these two databases are described below, along with links to their websites. (This information can also be found in the QuanTek Help file.) Note that the QuanTek installation package contains a separate *.exe file for each database. You can use either one or both together, as you wish. (Also described is Yahoo data, which we do not recommend -- see below.)

QuanTek Data Download: In order to display price graphs and compute the Price Projection, QuanTek requires daily data consisting of open, high, low, close, price data and volume data, as well as the corrected close (corrected for splits and dividends). This data can be downloaded via internet from the database and displayed as a *.csv file (comma-separated-values), then automatically parsed. QuanTek can also parse ASCII data directly from a *.csv file in several different formats as well. From the corrected close, QuanTek computes a daily Adjustment Factor, which adjusts the past prices for splits and dividends. This gives a better indication of the “true” value of the security, without artificial discontinuities, for the purpose of the Price Projection and other calculations. The past prices are divided by the cumulative product of all the daily Adjustment Factors starting with the most recent day, to give back the corrected prices. The quantities that are saved are the actual prices and the Adjustment Factor for each day, which are fixed quantities. QuanTek can also make use of the splits and dividends data directly, to compute the Adjustment Factor and corrected prices.

Under the Database menu of the QuanTek program and on the toolbar you will find a list of four database commands. Use these commands to download Intra-Day Data, Daily Data, Historical Data, and Fundamental Data, and set the time for automatic daily data download.

Intra-Day Data Update: If you want to update the current day’s intra-day price data manually, click the Intra-Day Update button during market hours. This automatically downloads the current day’s intra-day prices (15-minute delayed), for all the securities in the Portfolio, then parses the data and saves it to the data files. This data may not be complete and may not include all securities, so do not use this as a substitute for the Daily Data Update. Also if you use this, don’t forget to finally update the data after hours for the correct end-of-day prices.

Daily Data Update: This download has been set to be a historical data download going back approximately 100 days, so it does not need to be done every day. This download is also done automatically by the automatic daily data download, at a set time each evening. A separate API call is made for each security in the portfolio folder, at 1-minute intervals, and then the data are parsed automatically and inserted into the data files. This is the best way to ensure that the correct end-of-day data are downloaded for all securities so that they are all current, which is necessary for the Optimal Portfolio calculation.

Historical Data: This download is for the full historical data set for a single security symbol, which you specify. This data file is downloaded, then parsed automatically into the correct data file, and may then be saved. (Note that if this data download file is used on another computer, it may be in violation of copyright laws.) This is the download to use when first populating a new data file with data. First create a new *.sed data file in the portfolio folder, with the correct symbol, and then do a Historical Data download for that symbol. When the download and automatic parse are complete, you may open the Data Graph and check to make sure the data file is populated with data. The raw data is then visible in the Stock Data scroll view and may be saved to a *.csv data file using Create ASCII File (in QuanTek format).

The QuanTek program makes use of 8 years (2048 days) of historical data, so if this amount of data is available it should be downloaded.

Fundamental Data: The current version of QuanTek does not directly make use of Fundamental Data. However, if the database and your subscription support it, you may download the data and view it in the download ASCII file. If the data are downloaded in JSON format, then it is parsed a little bit to make it easy to read in the ASCII file and re-displayed. The file may then be saved in a file with *.csv extension.

Automatic Daily Data Download: In addition to manually updating the data, there is also a method for updating the daily price data automatically for all securities in the portfolio folder. Clicking the Auto-Download Data button enables you to set a time for automatic daily data download of end-of-day data. Just set the Download Time in 24-hour format (local time, sometime before 5am), and the data will be downloaded automatically each weekday night excluding holidays. The data can also be downloaded manually by clicking the Daily Data Update toolbar button (after-hours), which updates the end-of-day prices. A separate API call is made for each security, at 1-minute intervals, to download historical data going back about 100 days. The data are saved to a separate *.csv file for each security which is then parsed automatically and inserted into each data file.

The Auto-Download routine makes use of a wait-timer. This has the capability of starting the download routine every market day at the set time. (I define the market day as going from 5:00 am to 4:59 am the next day.) The rather cool thing about this wait-timer is that it has the capability of waking up the computer even if it is asleep. All you have to do is set the time (in the future between the current time and 5am) and minimize the QuanTek program so it is running in the taskbar, then put the computer to sleep. At the set time, the computer will wake and download the data. I have also inserted a little “beep” just before the data download, as an alert. The wait timer will then update the daily data every trading day from then on, at the set time, automatically. (Since the download takes 1 minute for each security, it is convenient to do this at night.)

Alpha Vantage

Alpha Vantage is a free data source, which may be viewed at their website:

https://www.alphavantage.co/

They have a variety of end-of-day and real-time data. The data cover stocks, foreign exchange, and crypto-currencies, and a variety of technical indicators. The stock data includes indexes, but there is no mention of mutual funds or commodity futures or options. Of course, you can try any symbol and see what you get.

Alpha Vantage wants you to claim their free API Key in order to download their data. You can do this on their website. In QuanTek you then simply enter this API Key into the User Code dialog box, available under the Database menu under Change User Code, and then start downloading data! The Alpha Vantage version of QuanTek already has the correct API calls to the database programmed in, and the data download is performed automatically.

Historical Data: The historical data are downloaded and displayed in a *.csv file. The format for the Alpha Vantage historical data has the form:

timestamp,open,high,low,close,adjusted_close,volume,dividend_amount,split_coefficient

The timestamp field is the Date in the form YYYY-MM-DD. It appears that in most cases the data goes back at most to the year 2000. Since the split and dividend information is included, QuanTek uses these to compute the Adjustment Factor, rather than the Adjusted Close.

Fundamental Data: Alpha Vantage does not provide Fundamental data.

EOD Historical Data

EOD Historical Data (not to be confused with eoddata) is an inexpensive data source that appears well suited to QuanTek, which may be viewed at their website:

https://eodhistoricaldata.com/

They have a variety of end-of-day, real-time, and fundamental data. The data cover stocks, indexes, mutual funds, and currencies. There are five data plans, ranging from $9.99/month to $34.99/month. The EOD Historical Data – US ONLY is $9.99/month and covers US stocks, 25,000+ mutual funds, live stock prices, and adjusted close prices. The EOD Historical Data – ALL WORLD  is $19.99/month and covers 40+ stock exchanges, 100+ indexes, 25,000+ mutual funds, 150+ currency pairs, 120+ CRYPTO currencies, live stock prices, and adjusted closes. Either one of these subscriptions will work fine with QuanTek. There is also a Fundamental Data subscription for $29.99/month, Splits and Dividends Data for $4.99/month, and finally the ALL-IN-ONE Package for $34.99/month.

You can subscribe to EOD Historical Data on their website and get an API Key. Probably the best subscription is the one that is recommended by them, the EOD Historical Data – ALL WORLD, unless you are willing to do without indexes and foreign stock exchanges. In QuanTek you then simply enter this API Key into the User Code dialog box, available under the Database menu under Change User Code, and then start downloading data! The EOD Historical Data version of QuanTek already has the correct API calls to the database programmed in, and the data download is performed automatically.

Historical Data: The historical data are downloaded and displayed in a *.csv file. The format for the EOD Historical Data historical data has the form:

Date,Open,High,Low,Close,Adjusted_close,Volume

The Date field is in the form YYYY-MM-DD. QuanTek uses the Adjusted Close field to compute the Adjustment Factor. It appears that the volume numbers from EOD Historical Data are actually split-adjusted. QuanTek applies the Adjusted Close/Close ratio to this volume data to arrive at the un-adjusted volume, which is then saved in the data file.

Fundamental Data: EOD Historical Data provides Fundamental data in a separate subscription, or in the ALL-IN-ONE Package. But the current version of QuanTek does not make direct use of Fundamental data. However, if your data subscription covers it, you can download the Fundamental data in JSON format into a *.csv file. QuanTek then does some parsing on this data so that it is in readable form. You can then save the *.csv file for later reference. (A future version of QuanTek will probably display this data directly.)

Yahoo

The Yahoo version of QuanTek downloads free daily stock data from the Yahoo website. The historical data are available on the Yahoo website:

https://finance.yahoo.com/

Previously, there was a method for downloading historical data from Yahoo via internet, but this was discontinued by Yahoo. However, it is just about as easy to download historical data from the Yahoo website directly in the form of a *.csv file (comma-separated-values), and then parse this file for each security. The daily open, high, low, close, price data and volume data are available for download, as well as the corrected close (corrected for splits and dividends). Also available are data on splits and dividends separately (not needed as long as the corrected close is available). There is also a lot of additional valuable information on stocks, indexes, and other securities on the Yahoo website, which you can use in the initial selection process.

The Yahoo *.csv file can actually be parsed using the EOD Historical Data setting with the Reverse Direction of Data check box checked. However, we do not recommend the use of Yahoo data, now that their data feeds have been recently discontinued. The problem is that the Open, High, Low, and Close prices seem to be already split-adjusted. Then the Adjusted Close field is adjusted for dividends as well. This means that there is no way to determine what the actual, pre-split-adjusted prices were from the data alone. This is a problem because QuanTek saves the actual, unadjusted prices, and displays them in the Data Scroll View, as well as the *.csv file in QuanTek format. If you use Yahoo data along with other sources, the data will not be compatible, due to the split-adjustment of the Yahoo prices, which cannot be undone.

Go back to Download QuanTek