Category Archives: technical-analysis

Time Dilation

Many measures work best in a homoscedastic volatility regime.   This is not a big secret.    Most regressors, the simplest of which are the ever popular moving averages, are especially biased in the context of a heteroscedastic series.

Probably the best way of normalizing a heteroscedastic series into one with near constant variance is to observe the following.   If we assume our process is roughly a SDE with normally distributed innovations (or alternatively a Hurst constant close to 1/2), we know that:

As a rough measure, we can remove much of the vol of vol by scaling our time axis in proportion to the variance.   I use a duration based local volatility measure with smoothing or alternatively for daily data an EWMA based evaluation of:

We can then change measure:

where ψ(t) is a smoothing / scaling function.   An example of such a scaling (with the red curve in the upper pane indicating the degree of scale from the baseline):

8 Comments

Filed under technical-analysis, volatility

Mode of the Signal Envelope

One thing that struck me as clever with the HHT was the use of projecting a spline across the minima and maxima for a given harmonic.   In effect this defines the envelope for the series for a given harmonic (level of decomposition).   A posteri, the mean or mode should be more or less equivalent to the average of the envelope splines.   Interesting!

This is a very appropriate way to model the mean within the context of mean-reversion (ie oscillations around the mode within an envelope).   Instead of trying to model the mean directly as a stochastic process, why not model the envelope — this is more appropriate as we can fit the envelope into our view of mean reversion.

Version 1
I used a regressor to estimate the mean and connected minima and maxima with a spline for the envelope.  The approach has issues (such as what sort of bias does the mean regressor have with respect to the data).   There are some issues below:

Picture 1

Version 2
I took a dfference approach, estimating the inflection points with a regressing “oscillator”  (in green) and determining the mid-points between minima and maxima to produce a spline representing the mode (blue).   So far looks good.   Edge cases, consolidation, and jumps need to be considered:

Picture 2

More on this later.

Leave a comment

Filed under mean, regression, signal-processing, statistics, technical-analysis

Trader Bots

I came across this site today. I’m not a huge believer in technical analysis as a basis for trading, however these guys are doing something interesting. They are generating / seeding strategies as a genetic program based on a combination of technical, momentum, and sentiment inputs into a neural net. These are then bred / cross-pollinated to refine further.

The next part is an extrapolation from the very little they have indicated. I suspect they are doing the following:

  1. Generate initial strategies using a random genetic program that selects inputs from a subset of available technical, sentiment, and momentum indicators.
  2. Calibrate to best possible trading signal (given inputs) using a ANN (neural net)
  3. Evaluate utility function across some years of historical data
  4. Based on results, refine by breeding the strategies with a GA
  5. Rinse and Repeat

It is an automated approach to strategy descovery, avoiding costly manual research. Though it does not appear to make use of more sophisticated inputs & models, the general approach is nice. It would not be a surprise to find that some of these strategies are successful.

The approach can be expanded to incorporate more sophisticated models as inputs (such as basis function based signal decomposition, stochastic state systems, etc).

1 Comment

Filed under genetic algorithms, neural networks, strategies, technical-analysis

Tracking the Order Book


As this article points out, trend following or using technical indicators in a vacuum can be doomed without analysis of the order book. When we want to buy into market movement, we want to make sure that the order book supports the direction indicated by technical signals and is not about to start a reversal.

Processing the order book from snapshot to shapshot, we can determine:

  • ratio of bid to ask interest
  • bid interest up/down
  • ask interest up/down
  • bid aggressed (using last traded price and reduction of bid size to determine)
  • ask aggressed (using last traded price and reduction of ask size to determine)

Going further one can look at the complexion of orders at each level, determining what sort of players are behind the orders. Knowing this can add further bias to the weighting of direction.

3 Comments

Filed under orderbook, technical-analysis