|
Written by Mikhail Kopytine
|
|
Friday, 26 February 2010 13:49 |
|
The "Kelly Criterion" in quant folklore is based on the exposition and development of Kelly's work done by Edward Thorp. Acknowledging Thorp's contribution, I find the original article by Kelly conceptually more relevant to the realities of algorithmic trading as developed by ForexAutomaton. Our forecasting algorithm, as any forecasting tool, can be very naturally considered a case of the hypothetic communication channel discussed by Kelly, and the related mathematical objects, such as joint and conditional probability density distributions for the communicated "symbols" (forecasts and real quotes), are being already monitored here, despite the fact that the Kelly Criterion for capital allocation to trades remains to be coded. |
|
LAST_UPDATED2 |
|
Read more...
|
|
Written by Mikhail Kopytine
|
|
Thursday, 18 February 2010 10:24 |
|
I am revisiting the issue of the intermarket analysis on the day scale. The conclusion from the previous report on the subject was that, the rest of the algorithm being the same, intermarket analysis gives no advantage on this time scale and simpler analysis of the isolated markets should be preferred. In this report, data on the predictability of high and low are added and a bug related to the estimation of statistical precision of the data is fixed. Nevertheless, the conclusions remain the same. |
|
Read more...
|
|
Written by Mikhail Kopytine
|
|
Friday, 12 February 2010 13:21 |
|
I continue developing ways of using Danica's output for profitable trading. The strategy of combining protective stop with a profit target, setting these at the extremes of the previous trading day and trading in the direction of the forecast (referred to as the Day Range strategy and reported in the previous post is modified to remove the profit target. Much better results are obtained. |
|
LAST_UPDATED2 |
|
Read more...
|
|
Written by Mikhail Kopytine
|
|
Tuesday, 09 February 2010 12:45 |
|
In the January performance review for the Danica trading system, an idea of a day-range trading strategy capitalizing on the high quality forecasts for the direction of daily high and low was expressed and a set of what-if charts for the forex pairs tracked was provided and discussed. This post is a deeper and more quantitative discussion of the strategy. Which forecasts should be acted upon? What is the expected profit per trade? How are profits/losses distributed statistically? -- these are the questions addressed. |
|
LAST_UPDATED2 |
|
Read more...
|
|
Written by Mikhail Kopytine
|
|
Friday, 29 January 2010 16:29 |
|
In the course of the trading system optimization, best returns have been seen to be obtained by ignoring forecast moves below a certain threshold, and acting on those above that threshold (that threshold was also called entry parameter). A small fraction of large returns has been seen to account for much of the positiveness of the Pearson correlation coefficient between actual logarithmic returns and their forecasts. Each Danica output contains forecasts for 14 forex rates, and a natural question is: how do I pick the ones to place trades? One might expect that the odds of success can be improved by selecting those markets where the next move is forecast to be large. I take version 0.5 of Danica forex system and study dependence of the correlation between the forecast and real logarithmic returns in day close on the relative strength of the forecast move. |
|
LAST_UPDATED2 |
|
Read more...
|
|
Written by Mikhail Kopytine
|
|
Wednesday, 20 January 2010 17:53 |
|
Some opportunities for analysis are offered by the fact that the forex trading system such as Danica gives not just a forecast for the next close, but a combination of next high, low and close. This report is the first attempt to develop a selective approach to the forecasts, a discrimination algorithm of sorts, such that a decision to give the forecast further consideration or ignore it would be based on the information contained in the forecast itself. |
|
LAST_UPDATED2 |
|
Read more...
|
|
Written by Mikhail Kopytine
|
|
Thursday, 14 January 2010 13:45 |
|
This report gives a more detailed discussion of the optimization trade-offs made for Danica, as compared to the initial announcement. At the same time, it establishes a reference point for future studies of past performance. |
|
LAST_UPDATED2 |
|
Read more...
|
|
Written by Mikhail Kopytine
|
|
Friday, 18 December 2009 11:57 |
|
In this week' update, I demonstrate an improvement in the prediction quality for day low and high in six major forex pairs -- EUR/USD, USD/JPY, GBP/USD, USD/CHF, AUD/USD, and USD/CAD -- by imposing the obvious constraints of low being below high and day's open (which is assumed in forex to coincide with previous day's close) being between the day's low and high. As before, I use Pearson correlation coefficient between the real and predicted logarithmic returns, as a figure of merit to gauge the prediction quality. Contrary to my expectation, no visible improvement for close is obtained by such technique. The results have to be compared with the previous report. |
|
LAST_UPDATED2 |
|
Read more...
|
|
Written by Mikhail Kopytine
|
|
Thursday, 10 December 2009 15:01 |
|
Just like logarithmic returns can be defined and analyzed for daily close, they can be defined for daily high and low. Japanese candlestick charting techniques, believed to have predictive power, study patterns formed by open, low, high and close as the time series progresses. In this report I extend application of my newly developed forecasting figure of merit, Pearson correlation coefficient between the real and predicted logarithmic returns, to the daily high and low, taking another look at the dependence of the prediction quality on the magnitude of a forecasting parameter nicknamed Fred. As the prediction quality is seen to be much better for the next high and low than it is for next close, I am contemplating ways of improving quality for close. |
|
LAST_UPDATED2 |
|
Read more...
|
|
Written by Mikhail Kopytine
|
|
Friday, 04 December 2009 16:50 |
|
As we are gearing up towards the launch of a real-time day scale forecasting service, I am using the newly developed forecasting figure of merit, Pearson correlation coefficient between the real and predicted logarithmic returns, to make a choice of the operating mode for the test mode of the service. I am taking another look at the dependence of the prediction quality on a day scale on the magnitude of a forecasting parameter nicknamed Fred for two distinct pattern recognition modes, namely that of completely independent analysis of the different exchange rates (so-called Step One), and the one in which the time series for the indvidivual exchange rates are considered jointly in order to utilize potential inter-market patterns (Step Three). |
|
LAST_UPDATED2 |
|
Read more...
|
|
Written by Mikhail Kopytine
|
|
Friday, 27 November 2009 10:27 |
|
Following up on the topic of our forex prediction quality measurements, I've decided to conduct the same analysis on the simulated data, unpredictable by construction. As before, I am tracing the dependence of the Pearson correlation coefficients between predicted and actual logarithmic returns in day close value on the magnitude of the forecasting parameter nicknamed Fred. |
|
LAST_UPDATED2 |
|
Read more...
|
|
Written by Mikhail Kopytine
|
|
Tuesday, 10 November 2009 16:20 |
|
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. |
|
LAST_UPDATED2 |
|
Read more...
|
|
Written by Mikhail Kopytine
|
|
Thursday, 29 October 2009 10:34 |
|
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. |
|
LAST_UPDATED2 |
|
Read more...
|
|
Written by Mikhail Kopytine
|
|
Friday, 23 October 2009 15:42 |
|
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. |
|
LAST_UPDATED2 |
|
Read more...
|
|
Written by Mikhail Kopytine
|
|
Tuesday, 20 October 2009 11:09 |
|
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. |
|
LAST_UPDATED2 |
|
Read more...
|
|
Written by Mikhail Kopytine
|
|
Monday, 12 October 2009 12:47 |
|
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. |
|
LAST_UPDATED2 |
|
Read more...
|
|
Written by Mikhail Kopytine
|
|
Monday, 05 October 2009 10:55 |
|
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. |
|
LAST_UPDATED2 |
|
Read more...
|
|
Written by Mikhail Kopytine
|
|
Thursday, 01 October 2009 12:38 |
|
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. |
|
LAST_UPDATED2 |
|
Read more...
|
|
Written by Mikhail Kopytine
|
|
Wednesday, 30 September 2009 10:32 |
|
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. |
|
LAST_UPDATED2 |
|
Read more...
|
|
Written by Mikhail Kopytine
|
|
Tuesday, 29 September 2009 08:21 |
|
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. |
|
LAST_UPDATED2 |
|
Read more...
|
|
|