Levenberg-Marquardt algorithm - page 2

 

Silverpike been thinking about this a bit more

On a week by week basis what is the average accuracy of the prediction compared to the real price?

With that information would it not be possible to construct a trading model with some + or - parameters for the beginning of each week. Perhaps you could publish your results on this thread and then we could go away and using what we already know test the best way of utilising the info

Also will using a different data feed change the predictions?

I think this is really interesting and would welcome further comments

 
 
snowleopard:
Hi everybody, and thank you for interesting discussion. First, all that we have in the so called neural predictor is a kind of moving average, i.e. a lagging indicator. Take a look at the charts in the Jourder paper, and you'll see what I mean. So, in other words, a neural predictor could be called a nonlinear adaptive moving average - it's better than any linear type moving average but that's about it. The belief that least-squares optimisation over the past can predict far out in the future is simply unfounded, so to keep the prediction at one time-step is a good idea.

The least-squares method is only used to train a neural network, not produce the results themselves. Neural nets, in theory, have the ability to discover relationships between data that is subtle and conditional. In a sense, it is performing a job similar to a human when trading. I disagree with the notion that the predictor is an MA-derived idea. I don't know the weights of the neurons in the network, so ultimately I have no idea how it works (as is the case with neural nets). I am sure that the neural network does not behave like and MA, although the results may make it appear that way. I would agree that it could be used from a trader's point of view as if it were a lagging indicator.

Second, we have only talked about prediction so far, and we need to get from that to a trading strategy. As we have a lagging moving average type indicator, the strategy will have to be of the ma-crossover type, as Yao et al realised. Take a look in chapter 11 of "An Introduction to High-Frequency Finance" by Gencay et al for the details on how it's done in the big banks. The summary is that it can be done, it's good, but not the holy grail, and never will be. If you're interested and don't have access to the book, I could try to summarise here.

You are right, one thing I did not explore was a trading system based on this indicator, which gives me an idea. I could write another simulation, taking all the generated weekly predictions from the neural network and making trades from them (a backtest). I might just do that. Perhaps I could also make this neural data available here, so that others can backtest it, or generate their own trading rules for backtesting.

 
smotty:
Silverpike been thinking about this a bit more On a week by week basis what is the average accuracy of the prediction compared to the real price?

Since people are interested, I am going to post my data here for people to use. It is up to you to use them, I am not going to hold anyone's hand because I am also a busy grad student and day trader, and I don't have infinite time to devote to this. I will answer simple questions though if I can.

Also, one little detail that wasn't quite right. I actually obtained 511 weeks of data from Dukascopy. However, I needed to use the first 120 weeks just to generate the 120 week MA, so the first week I can use was week 121.

There are 3 files. Read this part carefully to understand each one.

(1) Weekly GBPUSD data downloaded from Dukascopy in .csv format. 511 weeks. Exactly what you get when you go do Dukascopy.

(2) A generated, preprocessed file. It contains 391 lines, and has 6 values per line. These are the 6 inputs I used to my neural net. The data is ordered as follows: CLOSE, MA5, MA10, MA20, MA60, MA120. These 391 lines should correspond to lines 121 to 511 in the original .csv history file (there are no dates in the data).

(3) The second is my neural predicted prices. There are no dates here either, but it is assumed that each line in the output file matches exactly the one in file #2. These also would correspond to lines 121 to 511 in the original history file. They represent the neural output given the 6 inputs used in file #2 (the next week prediction).

Note that this data can be loaded into Excel, and you can find out almost anything you need by playing with it there. You can graph the predictions (which should match my graph posted earlier) and do all other kinds of error assessment also. That should give anyone who wants to asses the validity of this something to play with.

 

to make this image, you have generated next week graph , and then waaited for the next week finish to get the real graph, and then compared the two graph?

 
dellan:
to make this image, you have generated next week graph , and then waaited for the next week finish to get the real graph, and then compared the two graph?

Yes, that is correct.

 

Hi, Silverpike. Even though neural networks can detect patterns and conditional relationships, for (financial) time series applications it's not uncommon in the literature to view them as Nonlinear Autoregressive Moving Averages even if they are fed exogenous data such as bond prices, or other relevant data. See for example the book by Simon Haykin. To believe that there's some secret pattern to discover in fx time series is as silly as astrological trading. Neural nets should be used to augment our own intelligence, not replace it.

The first step in devising a trading/prediction system would be to mine the data we want to trade to see what patterns there might be, and then trade those patterns. And one must take obvious steps such as filtering out intraday seasonalities. And neural networks can be helpful here when used properly.

 
snowleopard:
To believe that there's some secret pattern to discover in fx time series is as silly as astrological trading.

It's funny that you mention that. I have been using a primarily astrological method for the past 1 1/2 years, and I am doing quite well.

 

That's good! Yes, astrological trading 'works', but do you know why? Or is it like you say about neural nets, that "...ultimately I have no idea how it works"?

 

GBPUSD so close.......

Silvertrend,

Based upon your testing with the GBPUSD at a price of 1.84 for June 16th, that is indeed very close to what it is today [as of June 11th the price is 1.8403] since your test data showed last feed from May 29th. I am curious how far this system can actually project out to in the future. If time permits, can you perform other currency pair testing on the majors? It would be very interesting to see... From what I understand, simply using Technical Analysis, one can also predict the future price action to the week, month, etc.

Its interesting you use Astrological techniques to trade. Awhile back I had read something on it and gave up the idea of pursuing it since I read that such ideas are unfound to work. I would like to hear your ideas on it....

Reason: