Quant Mashup - Financial Hacker
Quantocracy is now on Bluesky and Threads. See the links in the header. - Mike
Ehlers’ Precision Trend Analysis [Financial Hacker]
In TASC 8/24, John Ehlers presented a new algorithm for separating the trend line from a price curve, using spectral analysis functions. Trend lines are only useful for trading when they have little lag, so that trend changes can immediately trigger trade signals. The usual suspects like SMA, WMA,
- 3 months ago, 20 Aug 2024, 10:09pm -
Ehlers’ Ultimate Smoother [Financial Hacker]
In TASC 3/24, John Ehlers presented several functions for smoothing a price curve without lag, smoothing it even more, and applying a highpass and bandpass filter. No-lag smoothing, highpass, and bandpass filters are already available in the indicator library of the Zorro platform, but not Ehlers’
- 6 months ago, 17 May 2024, 06:21pm -
The Gap Momentum System [Financial Hacker]
Jerry Kaufman, known for his technical indicators bible, presented in TASC 1/24 a trading strategy based on upwards and downwards gaps. For his system, he invented the Gap Momentum Indicator (GAPM). Here I’m publishing the C version of his indicator, and a simple trading system based on it. The
- 8 months ago, 17 Mar 2024, 10:14pm -
Undersampling [Financial Hacker]
All the popular ‘smoothing’ indicators, like SMA or lowpass filters, exchange more lag for more smoothing. In TASC 4/2023, John Ehlers suggested the undersampling of price curves for achieving a better compromise between smoothness and lag. We will check that by applying a Hann filter to the
- 1 year ago, 8 Apr 2023, 05:14pm -
Open or Close? Why Not Both? [Financial Hacker]
In his TASC February 2023 article, John Ehlers proposed to use the average of open and close, rather than the close price, for technical indicators. The advantage is a certain amount of noise reduction. On intraday bars the open-close average is similar to an SMA(2). It makes the data a bit
- 1 year ago, 13 Feb 2023, 09:04pm -
Crypto-Trading with REST, part 1 [Financial Hacker]
Many brokers and exchanges can nowadays be accessed online with a REST API. The days of awkward proprietary broker APIs are coming to an end. This article is a step by step instruction of implementating a REST API interface in plain C for connecting a trading system to the Bittrex cryptocurrency
- 2 years ago, 17 Oct 2022, 11:00am -
The Linear Regression-Adjusted Exponential Moving Average [Financial Hacker]
There are already uncounted variants of moving averages. Vitali Apirine invented another one in his article in the Stocks&Commodities September issue. The LREMA is an EMA with a variable period derived from the distance of the current price and a linear regression line. This ensures an optimal
- 2 years ago, 19 Sep 2022, 11:15am -
Ehlers Loops [Financial Hacker]
Price charts normally display price over time. Or in some special cases price over ranges or momentum. In his TASC articles in June and July 2022, John Ehlers proposed a different way of charting. The ratio of two parameters, like price over momentum, or price A over price B, is displayed as a 2D
- 2 years ago, 13 Jun 2022, 10:52am -
Never Sell in May! [Financial Hacker]
“Sell in May and go away” is an old stock trader’s wisdom. But in his TASC May 2022 article, Markos Katsanos examined that rule in detail and found that it should rather be “Sell in August and buy back in October”. Can trading be really this easy? Let’s have a look at the simple seasonal
- 2 years ago, 14 Apr 2022, 10:25am -
Why 90% of Backtests Fail [Financial Hacker]
About 9 out of 10 backtests produce wrong or misleading results. This is the number one reason why carefully developed algorithmic trading systems often fail in live trading. Even with out-of-sample data and even with cross-validation or walk-forward analysis, backtest results are often way off to
- 2 years ago, 4 Apr 2022, 11:49pm -
The Inverse Fisher Transform [Financial Hacker]
The Fisher Transform converts data to or from a Gaussian distribution. It was first used in algorithmic trading by John Ehlers (1) , and became a common part of indicators since then. In a TASC January 2022 article, Ehlers described a new indicator, the Elegant Oscillator, based on the Inverse
- 2 years ago, 13 Feb 2022, 10:37am -
Yet Another Improved RSI [Financial Hacker]
John Ehlers strikes again. The TASC January 2022 issue features another indicator supposedly improved with Hann windowing – the RSIH, a RSI with Hann flavour. Can it beat the standard RSI? The RSI is basically the normalized difference of price up/down movements. And its here presented Hann
- 2 years ago, 15 Dec 2021, 10:10am -
The MAD indicator [Financial Hacker]
As an application to the windowing technique described the the previous article, John Ehlers proposed a new trend indicator that he claimed is robust and yet simple. The latter is certainly true, as the MAD (Moving Average Difference) oscillator is, as the name says, just the difference of two
- 3 years ago, 13 Oct 2021, 10:48am -
Better Indicators with Windowing [Financial Hacker]
If indicators didn’t help your trading so far, just pimp them by preprocessing their input data. John Ehlers proposed in his TASC September article the windowing technique: multiply the input data with an array of factors. Let’s see how triangle, Hamming, and Hann factor arrays can improve the
- 3 years ago, 16 Aug 2021, 10:43am -
Moving Average Bands [Financial Hacker]
Compared to plain indicators, bands have the advantage that they look more colorful on charts. And they offer more lines to trigger trade signals. In this way, bands beat any old single-line indicator hands down. This was also noticed by Vitali Apirine, who invented in the Stocks&Commodities
- 3 years ago, 14 Jul 2021, 10:15am -
Buy&Hold? No, Buy&Sell! [Financial Hacker]
There’s no doubt that buying and holding index ETFs is a long-term profitable strategy. But it has two problems. It does not reinvest profits, so the capital grows only linearly, not exponentially. And it exposes the capital to the full rollercoaster market risk. A sure way to go out of the market
- 3 years ago, 19 Jun 2021, 10:23am -
More Robust Strategies [Financial Hacker]
The previous article dealt with John Ehlers’ AM and FM demodulating technology for separating signal and noise in price curves. In the S&C June issue he described a practical example. Applying his FM demodulator makes a strategy noticeably more robust – at least with parameter optimization.
- 3 years ago, 18 May 2021, 12:51pm -
The Price Wave Radio [Financial Hacker]
Price curves consist of much noise and little signal. For separating the latter from the former, John Ehlers proposed in the Stocks&Commodities May 2021 issue an unusual approach: Treat the price curve like a radio wave. Apply AM and FM demodulating technology for separating trade signals from
- 3 years ago, 18 Apr 2021, 11:33am -
Detecting Volume Breakouts [Financial Hacker]
It is estimated that about 6000 different technical indicators have been meanwhile published, but few of them are based on volume. In his article in Stocks & Commodities April 2021, Markos Katsanos proposed a new indicator for detecting high-volume breakouts. And he tested it with a trading
- 3 years ago, 8 Mar 2021, 07:41pm -
The Trend Persistence Indicator [Financial Hacker]
Financial markets are not stationary: price curves can swing all the time between trending, mean reverting, or entire randomness. Without a filter for detecting trend regime, any trend following strategy will bite the dust sooner or later. In Stocks & Commodities February 2021, Richard Poster
- 3 years ago, 30 Jan 2021, 10:42am -
Petra on Programming: Short-Term Candle Patterns [Financial Hacker]
Japanese traders invented candle patterns in the 17th century. Some traders believe that those patterns are still valid. But alas, no one yet got rich with them. Still, trading book authors are all the time inventing new patterns, in hope to find one that is really superior to randomly entering
- 3 years ago, 23 Dec 2020, 10:20am -
Petra on Programming: Get Rid of Noise [Financial Hacker]
A major problem of indicator-based strategies is that most indicators produce more or less noisy output, resulting in false signals. The faster the indicator reacts on market situations, the noisier is it usually. In the S&C December issue, John Ehlers proposed a de-noising technology based on
- 3 years ago, 28 Nov 2020, 10:23am -
"Please Send Me a Trading System!" [Financial Hacker]
“It should produce 150 pips per week. With the best indicators that you know. How much does it cost? Please also send live histories of your top systems.” Although we often get such requests, we still don’t know the best indicators and can’t send live histories. We do not invent systems, but
- 4 years ago, 8 Oct 2020, 10:35am -
Petra on Programming: The Gann Hi-Lo Activator [Financial Hacker]
Fortunately I could write this article without putting my witch hat on. Despite its name, the ‘Gann Hi-Lo Activator’ was not invented by the famous esotericist, but by a Robert Krausz in a 1998 article in the Stocks&Commodities magazine. In a recent article, Barbara Star combined it with
- 4 years ago, 25 Sep 2020, 11:42am -
Petra on Programming: Four Dimensions of Strength [Financial Hacker]
In the S&C September 2020 article “Tracking Relative Strength In Four Dimensions”, James Garofallou presents a metric for evaluating a security’s strength relative to 11 major market sectors and over several time periods. All this information is squeezed into a single value. Maybe at cost
- 4 years ago, 21 Aug 2020, 10:32am -
Petra on Programming: The Compare Price Momentum Oscillator [Financial Hacker]
Vitali Apirine, inventor of the OBVM indicator, presented another new tool for the believing technical analyst in the Stocks & Commodities August 2020 issue. His new Compare Price Momentum Oscillator (CPMO) is based on the Price Momentum Oscillator (PMO) by a Carl Swenlin. So we got another
- 4 years ago, 24 Jul 2020, 11:49pm -
Petra on Programming: Truncated Indicators [Financial Hacker]
Cumulative indicators, such as the EMA or MACD, are affected not only by previous candles, but by a theoretically infinite history of candles. This makes them return slightly different results depending on the tested period. Although this effect is often assumed negligible, John Ehlers demonstrated
- 4 years ago, 21 Jun 2020, 10:01am -
Petra on Programming: The Correlation Cycle Indicator [Financial Hacker]
The previous article dealt with indicators based on correlation with a trend line. This time we’ll look into another correlation-based indicator by John Ehlers. The new Correlation Cycle indicator (CCY) measures the price curve correlation with a sine wave. This works surprisingly well – not for
- 4 years ago, 2 Jun 2020, 10:40pm -
Petra on Programming: A Unique Trend Indicator [Financial Hacker]
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. Let’s see if this new indicator can rule them all. The basic
- 4 years ago, 17 Apr 2020, 09:56pm -
Petra on Programming: The Smoothed OBV [Financial Hacker]
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. The original OBV indicator was
- 4 years ago, 15 Mar 2020, 11:44pm -
The Scholz Brake: Fixing Germany’s New 1000% Trader Tax [Financial Hacker]
Would you like to read a 18-page pounderous law draft titled “Law for introducing a duty to report cross-border tax structuring”? The members of the German Bundestag apparently didn’t. Nothing can be said against reporting cum-ex or similar constructs, so the new law, proposed by finance
- 4 years ago, 20 Jan 2020, 12:55pm -
Petra on Programming: A New Zero-Lag Indicator [Financial Hacker]
I have been 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.
- 4 years ago, 15 Jan 2020, 01:15pm -
The Mechanical Turk [Financial Hacker]
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
- 5 years ago, 11 Dec 2018, 11:57am -
Deep Learning Systems for Bitcoins – Part 1 [Financial Hacker]
Since December, bitcoins can not only be traded at more or less dubious exchanges, but also as futures at the CME and CBOE. And already several trading systems popped up for bitcoins and other cryptocurrencies. None of them can claim big success, with one exception. There is a strategy that easily
- 6 years ago, 27 Dec 2017, 12:27pm -
Algorithmic Options Trading, Part 3 [Financial Hacker]
In this article we’ll look into a real options trading strategy, like the strategies that we code for clients. This one however is based on a system from a trading book. As mentioned before, options trading books often contain systems that really work – which can not be said about stock or forex
- 6 years ago, 27 Nov 2017, 09:34pm -
Hacking a HFT system [Financial Hacker]
Compared with machine learning or signal processing algorithms of conventional trading strategies, High Frequency Trading systems can be surprisingly simple. They need not attempt to predict future prices. They know the future prices already. Or rather, they know the prices that lie in the future
- 7 years ago, 9 Jul 2017, 10:50pm -
Algorithmic Options Trading, Part 2 [Financial Hacker]
In this second part of the Algorithmic Options trading series we’ll look more closely into option returns. Especially into the methods of combining different option types for getting user-tailored profit and risk curves, which gives options an interesting advantage over other financial
- 7 years ago, 18 Jun 2017, 08:47am -
Bye Yahoo, and thanks for all the fish [Financial Hacker]
Just a quick post in the light of a very recent event. Users of financial functions of R, MatLab, Python, or Zorro got a bad surprise in the last days. Many scripts and programs based on historical price data suddenly don’t work anymore. And our favorite free historical price data provider, Yahoo,
- 7 years ago, 19 May 2017, 08:06am -
Algorithmic Options Trading, Part 1 [Financial Hacker]
Despite the many interesting features of options, private traders rarely take advantage of them (I’m talking here of serious options, not binary options). Maybe options are unpopular due to their reputation of being complex. Or due to their lack of support by most trading software tools. Or due to
- 7 years ago, 26 Jan 2017, 01:01pm -
Better Strategies 5: Developing a Machine Learning System [Financial Hacker]
It's time for the 5th and final part of the Build Better Strategies series. In part 3 we've discussed the development process of a model-based system, and consequently we'll conclude the series with developing a data-mining system. The principles of data mining and machine learning
- 8 years ago, 12 Aug 2016, 01:56pm -
Binary Options: Scam or Opportunity? [Financial Hacker]
We’re recently getting more and more contracts of developing systems for trading binary options. This calls for a closer look. Binary options resemble financial instruments, but are widely understood as a scheme to separate naive traders from their money. And indeed, binary options brokers make no
- 8 years ago, 18 Jun 2016, 09:32pm -
Get Rich Slowly [Financial Hacker]
Most trading systems are of the get-rich-quick type. They exploit temporary market inefficiencies and aim for annual returns in the 100% area. They require maintenance, supervision, and regular adaption to market conditions. Their expiration is often accompanied by large losses. But what if you’ve
- 8 years ago, 3 May 2016, 06:35pm -
Build Better Strategies! Part 4: Machine Learning [Financial Hacker]
Deep Blue was the first computer that won a chess championship, in 1996. It took 20 more years until another computer program, AlphaGo, could defeat the best human Go player. Deep Blue was a model based system with a fixed chess library and hardwired chess rules. AlphaGo is a data-mining system, a
- 8 years ago, 31 Mar 2016, 03:12pm -
Build Better Strategies! Part 3: The Development Process [Financial Hacker]
This is the third part of the Build Better Strategies series. In the previous part we’ve discussed the 10 most-exploited market inefficiencies and gave some example algorithms for trading strategies. In this part we’ll analyze the general process of developing a model-based trading system. As
- 8 years ago, 23 Feb 2016, 10:12am -
Dear Brokers... [Financial Hacker]
Whatever software we’re using for automated trading: We all need some broker connection for the algorithm to receive price quotes and place trades. Seemingly a simple task. And almost any broker supports it through a protocol such as FIX or REST, through an automated platform such as MT4™, or
- 8 years ago, 4 Jan 2016, 11:08am -
Build Better Strategies! Part 2: Model-Based Systems [Financial Hacker]
Trading systems come in two flavors: model-based and data-mining. This article deals with model based strategies. The algorithms are often astoundingly simple, but properly developing them has its difficulties and pitfalls (otherwise anyone would be doing it). Even a significant market inefficiency
- 8 years ago, 25 Dec 2015, 11:31am -
Better Tests with Oversampling [Financial Hacker]
The more data you use for testing or training your strategy, the less bias will affect the test result and the more accurate will be the training. The problem: price data is always in short supply. Even shorter when you must put aside some part for out-of-sample tests. Extending the test or training
- 8 years ago, 23 Nov 2015, 12:34pm -
Build Better Strategies! [Financial Hacker]
Enough blog posts, papers, and books deal with how to properly optimize and test trading systems. But there is little information about how to get to such a system in the first place. The described strategies often seem to have appeared out of thin air. Does a trading system require some sort of
- 9 years ago, 9 Nov 2015, 12:59pm -
The Cold Blood Index [Financial Hacker]
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. What now? Carry on in cold blood, or pull the brakes in panic? This is a situation all too familiar to any algo trader. There can be several reasons why a
- 9 years ago, 26 Oct 2015, 11:07am -
I Hired a Contract Coder [Financial Hacker]
You’re a trader with serious ambitions to use algorithmic methods. You already have an idea to be converted to an algorithm. Only problem: You do not know to read or write code. So you hire a contract coder. A guy who’s paid for delivering a script that you can drop in your MT4, Ninja,
- 9 years ago, 15 Oct 2015, 12:36pm -