The intention of this post is to tie together several topics which appeared on my radar screen in the course of the trading system optimization. First, it has been understandably hard to fully rid oneself of vestiges of the mainstream financial theory based on the postulate of market efficiency, while building a wealth-generating tool relying explicitly on demonstrable market inefficiencies. The realization that Sharpe ratio does not let one make an objective choice of a portfolio was there from the beginning, and I recall perceiving this fact as a "necessary evil". Then came the understanding of the fact that an artithmetic average of returns gives one a biased picture of long-term return, and consequently, Sharpe ratio is built around biased quantities.
-
Forex Automaton as a Shannon's communication channel. Introducing Kelly Criterion.
- Tags:
- frontpage
November 10 2009, 6:20pm | Comments »
-
Pairs trading and correlations
I approach pairs trading with the correlations tool-box and basic algebra. Let's consider two time series, a(t) and b(t). It will be understood that these are taken on a fixed time scale (second, minute, hour, and the like). Most explanations of pair trading fail to communicate the importance of non-zero correlations at non-zero time lags -- let alone the importance of their constructive interference (to be explained). Meanwhile, it is these subtleties that make a difference between just another roulette-like source of random outcomes and a reliable, little-risk source of arbitrage profits.
- Tags:
- frontpage
October 29 2009, 12:34pm | Comments »
-
Pairs trading and correlations
I approach pairs trading with the correlations tool-box and basic algebra. Let's consider two time series, a(t) and b(t). It will be understood that these are taken on a fixed time scale (second, minute, hour, and the like). Most explanations of pair trading fail to communicate the importance of non-zero correlations at non-zero time lags -- let alone the importance of their constructive interference (to be explained). Meanwhile, it is these subtleties that make a difference between just another roulette-like source of random outcomes and a reliable, little-risk source of arbitrage profits.
- Tags:
- frontpage
October 29 2009, 12:34pm | Comments »
-
More on how I know my forex forecasting works.
This is a brief follow-up to the previous post on how I know my forex forecasting works. In that post I disclosed a measurement of a figure of merit I use to monitor the forecasting quality and optimize the algorithm, the figure of merit being the covariance of predicted and actual logarithmic returns on a day scale. The measurements were carried out for 16 values of the control parameter nicknamed Fred, which is currently the only "make it or break it" parameter responsible for the forecasting, and the only one being currently optimized. (As an aside note, there are other quantities which control the process like for example how big a chunk of data you look at. Those are believed to be more mundane and are currently fixed as some "reasonable" values -- which is not to say that I won't decide to take a more quantitative look at how reasonable those values are sooner or later.) The covariance of predicted and actual logarithmic returns is not the best quantity to look at when aggregating data for the different forex exchange rates: because of the somewhat different volatilities of those markets (different even despite the fact that the logarithmic returns take the absolute value of the exchange rate out of the picture), the resulting numbers for the major forex were volatility-weighted averages. Moreover, a quantity like 10-6, even if it's more than 2 standard deviations above zero, does not communicate the result to the non-expert in the intuitive way the result deserves. These are the reasons why I went over from covariances to Pearson correlation coefficients, and today I am presenting the updated measurements. Fig.1. Pearson correlation of predicted and actual day-scale logarithmic returns as a function of the forecasting parameter nicknamed Fred. The vertical bars, so called error-bars are a measure of uncertainty, are calculated as discussed in the previous post and have the same meaning. Back-testing simulations give the forecasing engine no access to the future data, direct or indirect. Significantly positive (and ideally, large) values correspond to quality forecasting.
- Tags:
- frontpage
October 23 2009, 6:42pm | Comments »
-
More on how I know my forex forecasting works.
This is a brief follow-up to the previous post on how I know my forex forecasting works. In that post I disclosed a measurement of a figure of merit I use to monitor the forecasting quality and optimize the algorithm, the figure of merit being the covariance of predicted and actual logarithmic returns on a day scale. The measurements were carried out for 16 values of the control parameter nicknamed Fred, which is currently the only "make it or break it" parameter responsible for the forecasting, and the only one being currently optimized. (As an aside note, there are other quantities which control the process like for example how big a chunk of data you look at. Those are believed to be more mundane and are currently fixed as some "reasonable" values -- which is not to say that I won't decide to take a more quantitative look at how reasonable those values are sooner or later.) The covariance of predicted and actual logarithmic returns is not the best quantity to look at when aggregating data for the different forex exchange rates: because of the somewhat different volatilities of those markets (different even despite the fact that the logarithmic returns take the absolute value of the exchange rate out of the picture), the resulting numbers for the major forex were volatility-weighted averages. Moreover, a quantity like 10-6, even if it's more than 2 standard deviations above zero, does not communicate the result to the non-expert in the intuitive way the result deserves. These are the reasons why I went over from covariances to Pearson correlation coefficients, and today I am presenting the updated measurements. Fig.1. Pearson correlation of predicted and actual day-scale logarithmic returns as a function of the forecasting parameter nicknamed Fred. The vertical bars, so called error-bars are a measure of uncertainty, are calculated as discussed in the previous post and have the same meaning. Back-testing simulations give the forecasing engine no access to the future data, direct or indirect. Significantly positive (and ideally, large) values correspond to quality forecasting.
- Tags:
- frontpage
October 23 2009, 6:42pm | Comments »
-
Why I think my forex forecasting engine works
The key component of my forex trading system is the prediction engine. So far I have been trying to optimize the prediction engine in the overall context of simulated trading on the historical data where besides the parameter responsible for prediction, at least three other parameters were being optimized. With the large number of parameters, the CPU demands of optimization become prohibitive: as the dimensionalty of the parameter space grows, the number of parameter combination grows with it. As the pseudo-random time series are at the very heart of the problem, the randomness of changes in performance with respect to every parameter clouds the analyst's vision of any parameter in the course of the optimization. The adverse effect of that is possibly even more important than the combinatorial growth of the volume of the parameter space. It is therefore very helpful to factor the problem out into independent pieces which can then be optimized separately. The success depends, among other things, on the figures of merit used and on the degree of true independence between such pieces. Predictions for every market under analysis are obtained at every decision-making step (in this case, a day). As always, the system has no access to the future of the time series and only learns from the past. Every step during the simulation is therefore a direct test of the applicability of the past learning to the present context, just as it will be in real life. In real life however, the system chosen for operation will bear in itself the bias associated with its selection. In the Monte Carlo tests, we don't select and deal with an entire array of systems. The statements made for such an a priori array are free of selection bias. In order to conduct an unbiased test of the prediction quality and determine the best prediction parameter, I use the following procedure. At every prediction step, I record the prediction and one step later, when the future becomes reality as predicted or otherwise, I take the product of the real and predicted logarithmic returns for the day. The average of the product is the quantity plotted along the vertical axis in Fig.1 for the entire range of the prediction parameters. Fig.1. Covariance of predicted and actual day-scale logarithmic returns as a function of the forecasting parameter nicknamed Fred. Back-testing simulations with no access to the future.
- Tags:
- frontpage
October 20 2009, 2:09pm | Comments »
-
How I know my forex forecasting engine works
The key component of my forex trading system is the prediction engine. So far I have been trying to optimize the prediction engine in the overall context of simulated trading on the historical data where besides the parameter responsible for prediction, at least three other parameters were being optimized. With the large number of parameters, the CPU demands of optimization become prohibitive: as the dimensionalty of the parameter space grows, the number of parameter combination grows with it. As the pseudo-random time series are at the very heart of the problem, the randomness of changes in performance with respect to every parameter clouds the analyst's vision of any parameter in the course of the optimization. The adverse effect of that is possibly even more important than the combinatorial growth of the volume of the parameter space. It is therefore very helpful to factor the problem out into independent pieces which can then be optimized separately. The success depends, among other things, on the figures of merit used and on the degree of true independence between such pieces. Predictions for every market under analysis are obtained at every decision-making step (in this case, a day). As always, the system has no access to the future of the time series and only learns from the past. Every step during the simulation is therefore a direct test of the applicability of the past learning to the present context, just as it will be in real life. In real life however, the system chosen for operation will bear in itself the bias associated with its selection. In the Monte Carlo tests, we don't select and deal with an entire array of systems. The statements made for such an a priori array are free of selection bias. In order to conduct an unbiased test of the prediction quality and determine the best prediction parameter, I use the following procedure. At every prediction step, I record the prediction and one step later, when the future becomes reality as predicted or otherwise, I take the product of the real and predicted logarithmic returns for the day. The average of the product is the quantity plotted along the vertical axis in Fig.1 for the entire range of the prediction parameters. Fig.1. Covariance of predicted and actual day-scale logarithmic returns as a function of the forecasting parameter nicknamed Fred. Back-testing simulations with no access to the future.
- Tags:
- frontpage
October 20 2009, 2:09pm | Comments »
-
CAD and oil hour-scale correlation: it's safer to rely on CAD
In the recent forex/CFD data, USD/CAD is negatively correlated with light oil (WTI) CFD. This is the same as saying that CAD, one of the commodity currencies, is positively correlated with oil. This is old news. In this article I take a deeper look at the issue and analyze the shape of the correlation peak. Analyzed on the hour time scale, the correlation peak is broad and somewhat asymmetric, indicating that it is much safer to rely on the guidance of USD/CAD in predicting the oil price, rather than other way round. The necessary caveat is that this is a time-integrated picture, covering a period from late August 2008.
- Tags:
- frontpage
October 14 2009, 8:42pm | Comments »
-
CAD and oil hour-scale correlation: it's safer to rely on CAD
In the recent forex/CFD data, USD/CAD is negatively correlated with light oil (WTI) CFD. This is the same as saying that CAD, one of the commodity currencies, is positively correlated with oil. This is old news. In this article I take a deeper look at the issue and analyze the shape of the correlation peak. Analyzed on the hour time scale, the correlation peak is broad and somewhat asymmetric, indicating that it is much safer to rely on the guidance of USD/CAD in predicting the oil price, rather than other way round. The necessary caveat is that this is a time-integrated picture, covering a period from late August 2008.
- Tags:
- frontpage
October 14 2009, 8:42pm | Comments »
-
Volatility-neutral trading system
After inspecting the simulated track of the best selected algorithmic traders (see EUR/USD, USD/JPY, GBP/USD, USD/CHF, USD/CAD, AUD/USD, it becomes clear that a volatility-neutral approach is needed. The optimized robots trade only during the peak of financial panic so there is a risk that if such a system is launched and the volatility returns to normal, no trades will be placed.
- Tags:
- frontpage
October 12 2009, 3:47pm | Comments »
-
Volatility-neutral trading system
After inspecting the simulated track of the best selected algorithmic traders (see EUR/USD, USD/JPY, GBP/USD, USD/CHF, USD/CAD, AUD/USD, it becomes clear that a volatility-neutral approach is needed. The optimized robots trade only during the peak of financial panic so there is a risk that if such a system is launched and the volatility returns to normal, no trades will be placed.
- Tags:
- frontpage
October 12 2009, 3:47pm | Comments »
-
Graphical analysis of trading system's simulated track record. Step Two algorithm, AUD/USD.
This AUD/USD back-testing analysis concludes the series which began with EUR/USD. Simulated track records of six best Step Two algorithmic traders are studied graphically. For a more numbers-oriented approach to performance, see the article explaining the trading system optimization process which led to the selection of these six robots. This is the sixth, final report in the series and by now, the main area needing improvement is already clear: just as the system undertrades the less volatile currencies, it overtrades Aussie.
- Tags:
- frontpage
October 5 2009, 1:55pm | Comments »
-
Graphical analysis of trading system's simulated track record. Step Two algorithm, AUD/USD.
This AUD/USD back-testing analysis concludes the series which began with EUR/USD. Simulated track records of six best Step Two algorithmic traders are studied graphically. For a more numbers-oriented approach to performance, see the article explaining the trading system optimization process which led to the selection of these six robots. This is the sixth, final report in the series and by now, the main area needing improvement is already clear: just as the system undertrades the less volatile currencies, it overtrades Aussie.
- Tags:
- frontpage
October 5 2009, 1:55pm | Comments »
-
Graphical analysis of trading system's simulated track record. Step Two algorithm, USD/CAD.
This USD/CAD visual back-testing analysis continues the series which began with EUR/USD. Simulated track records of six best Step Two algorithmic traders are studied graphically. For a more numbers-oriented approach to performance, see the article explaining the trading system optimization process which led to the selection of these six robots.
- Tags:
- frontpage
October 1 2009, 3:38pm | Comments »
-
Graphical analysis of trading system's simulated track record. Step Two algorithm, USD/CAD.
This USD/CAD visual back-testing analysis continues the series which began with EUR/USD. Simulated track records of six best Step Two algorithmic traders are studied graphically. For a more numbers-oriented approach to performance, see the article explaining the trading system optimization process which led to the selection of these six robots.
- Tags:
- frontpage
October 1 2009, 3:38pm | Comments »
-
Graphical analysis of trading system's simulated track record. Step Two algorithm, USD/CHF.
This USD/CHF back-testing analysis continues the series which began with EUR/USD. Simulated track records of six best Step Two algorithmic traders are studied graphically. For a more numbers-oriented approach to performance, see the article explaining the trading system optimization process which led to the selection of these six robots.
- Tags:
- frontpage
September 30 2009, 1:32pm | Comments »
-
Graphical analysis of trading system's simulated track record. Step Two algorithm, USD/CHF.
This USD/CHF back-testing analysis continues the series which began with EUR/USD. Simulated track records of six best Step Two algorithmic traders are studied graphically. For a more numbers-oriented approach to performance, see the article explaining the trading system optimization process which led to the selection of these six robots.
- Tags:
- frontpage
September 30 2009, 1:32pm | Comments »
-
Graphical analysis of trading system's simulated track record. Step Two algorithm, GBP/USD.
This GBP/USD back-testing analysis continues the series which began with EUR/USD. Simulated track records of six best Step Two algorithmic traders are studied graphically. For a more numbers-oriented approach to performance, see the article explaining the trading system optimization process which led to the selection of these six robots.
- Tags:
- frontpage
September 29 2009, 11:21am | Comments »
-
Graphical analysis of trading system's simulated track record. Step Two algorithm, GBP/USD.
This GBP/USD back-testing analysis continues the series which began with EUR/USD. Simulated track records of six best Step Two algorithmic traders are studied graphically. For a more numbers-oriented approach to performance, see the article explaining the trading system optimization process which led to the selection of these six robots.
- Tags:
- frontpage
September 29 2009, 11:21am | Comments »
-
Graphical analysis of trading system's simulated track record. Step Two algorithm, USD/JPY.
This USD/JPY back-testing analysis continues the series which began with EUR/USD. Simulated track records of six best Step Two algorithmic traders are studied graphically. For a more numbers-oriented approach to performance, see the article explaining the trading system optimization process which led to the selection of these six robots.
- Tags:
- frontpage
September 28 2009, 11:00am | Comments »

