Petra on Programming: A Unique Trend Indicator

This months project is a new indicator by John Ehlers, first published in the S&C May 2020 issue. Ehlers had a unique idea for early detecting trend in a price curve. No smoothing, no moving average, but something entirely different. Lets see if this new indicator can rule them all.

Continue reading “Petra on Programming: A Unique Trend Indicator”

Petra on Programming: The Smoothed OBV

In his article in the S&C April 2020 issue, Vitali Apirine proposed a modified On Balance Volume indicator (OBVM). The hope was that OBVM crossovers and divergences make great trade signals, especially for stock indices. I got the job to put that to the test.

Continue reading “Petra on Programming: The Smoothed OBV”

Petra on Programming: A New Zero-Lag Indicator

I was recently hired to code a series of indicators based on monthly articles in the Stocks & Commodities magazine, and to write here about the details of indicator programming. Looking through the magazine, I found many articles useful, some a bit weird, some a bit on the esoteric side. So I hope I won’t have to code Elliott waves or harmonic figures one day. But this first one is a very rational indicator invented by a famous algo trader.

Continue reading “Petra on Programming: A New Zero-Lag Indicator”

The Mechanical Turk

We can see thinking machines taking over more and more human tasks, such as car driving, Go playing, or financial trading. But sometimes it’s the other way around: humans take over jobs supposedly assigned to thinking machines. Such a job is commonly referred to as a Mechanical Turk in reminiscence to Kempelen’s famous chess machine from 1768. In our case, a Mechanical Turk is an automated trading algorithm based on human intelligence. Continue reading “The Mechanical Turk”

Build Better Strategies! Part 2: Model-Based Systems

Trading systems come in two flavors: model-based and data-mining. This article deals with model based strategies. Even when the basic algorithms are not complex, properly developing them has its difficulties and pitfalls (otherwise anyone would be doing it). A significant market inefficiency gives a system only a relatively small edge. Any little mistake can turn a winning strategy into a losing one. And you will not necessarily notice this in the backtest.  Continue reading “Build Better Strategies! Part 2: Model-Based Systems”

The Cold Blood Index

You’ve developed a new trading system. All tests produced impressive results. So you started it live. And are down by $2000 after 2 months. Or you have a strategy that worked for 2 years, but revently went into a seemingly endless drawdown. Situations are all too familiar to any algo trader. What now? Carry on in cold blood, or pull the brakes in panic? 
    Several reasons can cause a strategy to lose money right from the start. It can be already expired since the market inefficiency disappeared. Or the system is worthless and the test falsified by some bias that survived all reality checks. Or it’s a normal drawdown that you just have to sit out. In this article I propose an algorithm for deciding very early whether or not to abandon a system in such a situation. Continue reading “The Cold Blood Index”

Is “Scalping” Irrational?

Clients often ask for strategies that trade on very short time frames. Some are possibly inspired by “I just made $2000 in 5 minutes” stories on trader forums. Others have heard of High Frequency Trading: the higher the frequency, the better must be the trading! The Zorro developers had been pestered for years until they finally implemented tick histories and millisecond time frames. Totally useless features? Or has short term algo trading indeed some quantifiable advantages? An experiment for looking into that matter produced a surprising result. Continue reading “Is “Scalping” Irrational?”

Boosting Strategies with MMI

We will now repeat our experiment with the 900 trend trading strategies, but this time with trades filtered by the Market Meanness Index. In our first experiment we found many profitable strategies, some even with high profit factors, but none of them passed White’s Reality Check. So they all would probably fail in real trading in spite of their great results in the backtest. This time we hope that the MMI improves most systems by filtering out trades in non-trending market situations. Continue reading “Boosting Strategies with MMI”

The Market Meanness Index

This indicator can improve – sometimes even double – the profit expectancy of trend following systems. The Market Meanness Index tells whether the market is currently moving in or out of a “trending” regime. It can this way prevent losses by false signals of trend indicators. It is a purely statistical algorithm and not based on volatility, trends, or cycles of the price curve. Continue reading “The Market Meanness Index”

Seventeen Trade Methods That I Don’t Really Understand

When I started with technical trading, I felt like entering the medieval alchemist scene. A multitude of bizarre trade methods and hundreds of technical indicators and lucky candle patterns promised glimpses into the future, if only of financial assets. I wondered – if a single one of them would really work, why would you need all the rest? And how can you foretell tomorrow’s price by drawing circles, angles, bats or butterflies on a chart? Continue reading “Seventeen Trade Methods That I Don’t Really Understand”