Omicron Research Institute

QuanTek Econometrics Software

QuanTek Features

QuanTek is a trading and portfolio management program based on the Science of Econometrics. It features a Price Projection that is derived from a Wavelet Adaptive Filter that we have developed. This filter is of the Least Mean Square (LMS) type and utilizes a wavelet decomposition of the prices and returns (over a 2048-day interval -- 8 years). This filter does a good job of finding the weak, time-dependent (non-stationary) correlations in the data, buried in the stochastic noise. The Price Projection from this filter provides an estimated return for each security, on a trading time scale from 1 to 128 days (10 days or greater recommended). The average absolute daily deviation of prices (volatility) is also measured, and these quantities are used to compute an Optimal Portfolio. Also, a set of Trading Rules is derived from a set of Technical Indicators that are obtained from the Wavelet Smoothing of the prices and returns (and also volatility).

QuanTek now works with either Alpha Vantage data (free) or EOD Historical Data (inexpensive), or directly with ASCII (CSV)files in a variety of formats. QuanTekcan download Historical data, Daily Update data (actually going back 100 days), Intra-Day Update data, and also Fundamental data (not utilized at present). The Daily Update download can be scheduled at a fixed time every night, even if the computer is asleep (one security per minute). QuanTek can also export price data as a CSV file in its own special format, and then import this data again if needed. (This provides an easy way to save the downloaded data, or to correct the data if it is ever necessary.)

For more information on all the features of QuanTek, please download the program and consult the Help file.

Main Graph

One of the best features of QuanTek is the Main Graph. This graph continuously displays all 2048 days of data by means of a unique scrolling graph window that always keeps the graph centered on the screen. The prices displayed are corrected prices, corrected for splits and dividends. These corrected prices are the ones used for the Adaptive Filter and represent the actual historical value of the security. This graph shows the data on the same logarithmic scale for all securities. Then it is easy to tell at a glance the historical return and volatility of each security compared to all the others. Thus it is easy to compare different securities at a glance with regard to their historical return and volatility. This gives a good estimate of the future expected return and risk of each security compared to all the others.

The Main Graph has four different scales, and enough ranges on each scale to cover the whole 2048-day data set. There are different Trend Lines, Moving Averages, Bollinger Bands, Buy-Sell Points, and Candle Sticks on the different scales. On each scale is the Price Projection from the Wavelet Adaptive Filter, showing the future expected return on the time scale of your choosing.

Price Projection

The Price Projection is computed from a Wavelet Adaptive Filter of our own design, which is a Least Mean Square (LMS) type using regressors or Technical Indicators obtained by means of Wavelet Smoothing. The use of the wavelet decomposition results in a dramatic simplification of the filter design, and aids in separating the weak "signal" present in the data from the "noise". Basically, the wavelet decomposition separates the signal with respect to both frequency and time, with the frequency separation in octaves and the time separation longer on the low octaves and shorter on the high octaves. This is a natural separation for many real-world signals, as the only part of the signal that is actually relevant to the present time is that which occured most recently, on the order of the most recent few cycles on each octave. Then the adaptive filter can utilize the most recent part of the signal on each octave level for regression. At present we use the wavelet decomposition of three different combinations of the price data, which we call the Relative Price (detrended prices), the Velocity (returns or 1st difference of prices) and Acceleration (2nd difference of prices). Actually, the Acceleration indicator is very similar to the Relative Price, so instead we also use the Volatility (absolute deviation of prices). Use of the most recent values of the Relative Price, Velocity, and Volatility indicators as the regressors for the Wavelet Adaptive Filter results in a vast simplification of the filtering problem, as these three indicators are automatically orthogonal (uncorrelated) on each wavelet level. In addition, using the Volatility as one of the regressors makes the filter an implementation of GARCH (Generalized Auto-Regressive Conditional Heteroskedasticity).

The Price Projection also displays Error Bars which represent the expected N-day future price range for N days in the future. This is based on the measured high-low range or Volatility of the past data, assumed to be scaled proportional to the square root of N. In addition, the actual N-day future price range for the past data is measured and may be displayed to compare with the estimated value. So this gives a direct indication of the expected future error bars of the Price Projection. The future projection may also be computed using several variants of the Wavelet Adaptive Filter, and the results of the different filters compared. In addition, the projections of these filters may be viewed at any point in the past, and then compared with the actual price action in the past.

The Price Projection from the Wavelet Adaptive Filter is optimized for a Trading Time Scale from 1 to 128 days (10 days or greater recommended using daily data), which you specify. This governs how rapidly the expected returns change, and as a consequence how rapidly the Optimal Portfolio changes. It also governs the rapidity of the Trading Rules.

Portfolio Optimization

The Optimal Portfolio in QuanTek is computed using a modified Markowitz Method. The Markowitz Method of portfolio optimization is familiar from Modern Portfolio Theory.  This method makes use of the estimated expected return for each security in the portfolio, and also the covariance matrix of the returns between all the securities in the portfolio.  Then the goal is to find the proportion of each security that maximizes returns for the overall portfolio, and which also minimizes risk.  The risk or volatility is defined as the standard deviation (square root of variance) for the portfolio returns, but for our purposes we use the average absolute deviation.  The portfolio covariance matrix is obtained by measuring the volatility of each security and the correlation of the returns between all the securities in the portfolio.  The Markowitz Method computation is a complex one in linear programming in general, but in QuanTek a modification to this procedure is made to make the calculation more suitable for the QuanTek program.  The Portfolio Optimzation method that we use is described in an article on this website and in the Help file. For the Portfolio Optimzation calculation you can set the percent margin invested, and the risk tolerance, the opposite of risk aversion, to adjust the optimization of the portfolio for different desired ratios of overall portfolio return to risk. On the low-risk tolerance setting, the optimal portfolio takes into account the volatility, while on the high-risk tolerance setting the proportions of the securities in the portfolio are roughly the same as the proportions of the expected returns alone. After computing the optimal portfolio, you can then see the result immediately in the Portfolio Report.

Portfolio Report

The Portfolio Report is an RTF file that you can display at any time (after computing the Optimal Portfolio). It shows the securities in the current Portfolio folder along with the past returns on several time scales, the future expected return on the chosen trading Time Scale, and the standard deviation (volatility). Next it displays the model portfolio which consists of the number of shares long or short of each security "owned", the market value of the shares, the actual price, and the basis price. Next some portfolio information is displayed such as the account equity and the total long and short market value. Finally the optimal portfolio is displayed with the number of shares of each security and percentage of equity, to compare with the corresponding numbers in the model portfolio. It also displays the Sharpe Ratio for each security, which is a measure of the ratio of expected return to risk. Finally the results of the Optimal Portfolio calculation for the overall portfolio as a whole are displayed, consisting of the Expected Return and Standard Deviation for the whole portfolio, along with the Margin Leverage. All this information is extremely useful for making trading decisions. The RTF file can be saved to disk and consulted later.

Most of this information can also be viewed in a dialog box called the Short-Term Trades dialog. This dialog also has a useful feature displaying the expected future price and range of prices N days in the future, where N is the Trading Time Scale. You can use this feature for setting N-day buy/sell limit orders at any given percentage of the expected price swing that you choose.

Statistical Tests

QuanTek has several Statistical Tests that are used mainly for checking that the Adaptive Filters and the Wavelet routines are working correctly. The most important of these is the Correlation -- LP Filter test, which actually consists of two dialogs, the Indicators -- Linear Prediction Filters dialog and the Correlation Test -- LP Filters & Indicators dialog. The Indicators dialog displays the Adaptive Filter output (which needs to be computed first) or five other indicators, in the present or past, with various degrees of Wavelet smoothing (either low-pass or band-pass). After this is selected, the Correlation Test dialog creates a display of the correlation between the indicator and future returns, as a function of lead time, time horizon, correlation scale, and date in the historical past. The purpose of this dialog is to ferret out whatever real correlation exists between the indicators and future returns, as a function of time, and try to distinguish the real correlations from spurious ones. As stated, this test is mainly used to determine if the Adaptive Filter is actually effective at predicting future returns.

Two other statistical tests are the Wavelet Analysis and Wavelet Variance dialogs. These are mainly used to test whether the Wavelet routines are functioning correctly, and to display their output graphically. The Wavelet Analysis dialog displays the output of the Wavelet filters in terms of the wavelet coefficients and the multi-resolution analysis (MRA). The Wavelet Variance dialog uses the actual price data to compute its wavelet variance and then display a covariance matrix based upon it.

Next there are two statistical tests that show a standard spectral decomposition of the price returns. The Periodogram Spectrum displays a standard Fourier spectrum of the returns. This is a standard computation in time-series analysis. The Wavelet Spectrum displays the corresponding Wavelet spectrum of the returns, averaged over time, so there is one average value per frequency octave. Theoretically, if the returns data are correlated (assumed stationary, so the correlation is time-independent), then the correlation would show up in a non-constant spectrum of the returns. On the other hand, if the spectrum is constant, then the returns are "white noise", in accordance with the Random Walk model. Actually, though, the theoretical variance of the spectrum is about 100%, so it is hard to tell from the spectral graph alone whether there are really any meaningful correlations in the data. (Also, the correlation is not expected to be stationary.) This is why the Correlation test described above is more relevant for non-stationary correlations.

Finally, there is the Correlation -- Returns dialog. This dialog measures the correlation directly between two securities, or the same security, in which you can vary the time lag between the two. The result is displayed in the form of a scatter graph, with a point on the graph for each point of the data. If there is correlation, it can be seen as a non-uniform distribution of the points on the graph. The actual degree of correlation is displayed, computed three different ways, along with the confidence level that the correlation is not spurious. There is also another dialog connected with this one, that displays the auto-correlation or cross-correlation sequence between the same two securities, as a function of time lag. This correlation uses the Fourier transform method. The Correlation -- Returns dialog could be useful for choosing securities in the portfolio to achieve maximum diversification, since to achieve this it is important to find pairs of securities that are anti-correlated.