Neural Networks and Candlestick Patterns

I just posted a new article at devx on the topic of using Encog Neural networks with candle stick charts. This is just the beginning of where I want to go with this, but it shows some slightly more advanced application of neural network prediction than just looking at the price fluctuation over a a period. More to come!

http://www.devx.com/opensource/Article/44014

Not sure why DevX did not release the code. But you can download that here:

http://www.heatonresearch.com/encog/articles

It is LGPL. It is a C# WPF app.

Neural Networks and Candlestick Patterns code link broken

bfraik's picture

Any chance in getting the DevX code link? The one you provided is broken (page not found).

Thanks

fixed

jeffheaton's picture

Fixed the link above. Sorry about that.

Thanks!

bfraik's picture

Thanks for the quick reply and fix!

Great article, i'm also

maciek's picture

Great article, i'm also interested in applying NN to stock market.

Cool idea that you're giving candle type on input not the actual price or something like that. I'm trying to use NN with this and so far no interesting results. I'm giving on inputs actual prices, and from 3 last days. But i'm thinking that it's something like "Garbage in, garbage out" :) Need to test if difference between prices is any better.

The above chart shows a time slice of Apple Computer being predicted with a neural network trained on GE. What is GE?

Any chance of sharing source code or compiled binary? That would be really amazing.

thanks

jeffheaton's picture

Glad you liked the article. This is a really simple application, that more shows how to actually hook up Encog and produce candle charts. I will be doing much more complex examples soon. I edited the above to include a link to the code, not sure why devx did not publish that.

And GE is General Electric. I created the neural network training with GE then applied it to predicting Apple.

Just read the DevX article;

Kalori's picture

Just read the DevX article; nice intro to encog, thanks Jeff.

From the article:
The program presented in this example uses a simple object I created to classify them. However, it picks arbitrary sizes for the body and shadows to classify them. One area that I want to experiment with, in the future, is using another neural network to figure out which of these micro patterns each candlestick falls into.

This comment reminded me of an old series of futures magazine articles by Murray Ruggiero that delve into indentifying candlesticks using Fuzzy logic. I will paste some links to them below if your interested.
I have also come accross a much more elegant and recent solution using RBF networks that were "grown" using Reinforcement learning techniques (using an algorithm called Neat-SharpNeat) to automatically figure out what candlestick patterns are important without human intervention. Seemed to me to be a much better solution than a human guessing at hand crafted Fuzzy logic rules. For the life of me I can't find the article again though, will keep looking.

Thanks again for the devx article.

Cheers,
Keith

Artificial trader jumps candlesticks
http://www.allbusiness.com/personal-finance/investing-trading-futures/48...
Fuzzy logic makes it clear
http://www.allbusiness.com/technology/computer-software-programming/4883...
Lighting candlesticks with fuzzy logic
http://www.allbusiness.com/technology/computer-software-programming/5653...
How to build an artificial trader
http://www.allbusiness.com/specialty-businesses/464352-1.html

thanks for the links

jeffheaton's picture

I will take a look at those. The article I did is a simple "first step", and I am right now working on step two. Will get more into that once I have my two Encog books out.

Jeff

are you

mancer's picture

Are you going to post those to DevX, or here? Why would you write an article on a site, other than Heaton Research, it seems you would want to keep people coming here.

probably not devx

jeffheaton's picture

But probably codeproject, or maybe here at Heaton Research.

Why other sites? It gives Encog more exposure. I will post most of the info on ENcog here, but an article on other development sites, from time-to-time, does seem to help incoming traffic levels here.

Jeff

I am also working on a market

rthiago's picture

I am also working on a market prediction system. I don't have too much at the moment, most gathering data and planning stuff, but I think we could work together to get better results. I have basic market knowledge and a lot experience in commercial programing.

Hit me rthiago at gmail dot com or here at the forums if you have interest.


Copyright 2005 - 2010 by Heaton Research, Inc.. Heaton Research™ and Encog™ are trademarks of Heaton Research. Click here for copyright and trademark information.