Fuzzy Logic in Market Trader. The Neural Net technology and Fuzzy Logic are my favorite math methods. This article is devoted to Fuzzy Logic application in Market Trader software.
A genetic fuzzy expert system for stock market timing - IEEE Xplore Document
Actually, the Fuzzy Logic math is used only in Neural Net module Price Events , but this method has given me many other ideas like the idea of the Floating Angle Model to be precise, the FAM model does not use Fuzzy Logic as such, but it keeps the same style of thinking. To me, the most appealing feature of Fuzzy Logic FZ is that it makes formal math logic more close to a human state of mind.
Three countries contributed to the development of this idea - Russia where the inventor of FZ, Lotfi Zadeh, was born , USA where he worked and proposed FZ , and Japan where FZ was applied first. This math idea was not accepted by academic science for a long time, though it was accepted by the industry rather quickly. First of all, I should apologize to math lovers who might find this explanation a way too simple. Also, I should apologize to non-mathematicians who will face a necessity to deal with some math, at least.
Some definitions concerning FZ application to Neural Net technology are still discussed between the professionals, so I will use definitions according to "Foundations of Neural Networks, Fuzzy Systems, and Knowledge Engineering" by Nikola K. Kasabov The MIT Press, So, what is Fuzzy Logic?
Instead of answering this question, let's consider the idea that is absolutely understandable for any human being, but cannot be so easily understand by computers. We try to teach the computer to understand what "short, normal and tall person" means.
Everybody knows it, it is quite easy to understand what it means. Looking at the person, we can tell momentarily: What will the computer do? Nothing; it has not enough information to make its conclusions. With this algorithm, the computer can quickly make the conclusion regarding person's height. But the weakest part of this approach is fixed boundaries. According to the proposed algorithm, the person of The human common sense tells us that there is something wrong with this approach.
Our conclusions are more smooth: Now I will demonstrate how this problem can be solved using Fuzzy Logic math. Look at this diagram:. We can tell "medium height though a bit tall".
The brand new of this approach is that this person belongs to two sets simultaneously: This is the logic with "fuzzy boundaries". By the way, what we have just done is called "fuzzification", and the functions shown on the diagram are called "membership functions".
Fuzzy Logic in Action. The central point of Fuzzy Logic that makes it extremely useful is the possibility to create so called "Fuzzy Rules". In terms of fuzzy rules, we provide this program with a set of rules like this: We can enter different rules covering all possible situations, and the program will follow these rules very fast.
Compare it to the classical math methods application, where it is an extremely difficult task, especially when we have to consider many other conditions like the wind velocity, weather, etc. The classical math will apply differential equations which, I guess, have multiple solutions. Fuzzy Rules application makes this task more intuitively understandable. This is the reason why Fuzzy Logic was accepted by the industry. Instead of differential equations this might confuse anybody but mathematicians , we have a set of rules where each one of them is understandable for kids.
We only have to produce a proper way of the fuzzification procedure i. Sometimes, for complicated systems, it is not easy to specify fuzzy rules. It would be good to find the way to automatize the process of finding the best fitting fuzzy rules. This task is resolved by a special kind of Neural Net that is called "Fuzzy Neural Net". Let's go back to our example of two missiles chasing one another. Suppose somebody is working on the program for one of the missiles and tries to list different rules regarding to this situation.
There are many parameters involved; to cover them all, this person must be a specialist in many things.
It can take a lot of time and efforts But then he sees a kid playing one of the simulator computer games, and this kid does the chasing fantastically fast. This is not surprising as a human brain was formed with the ability to its orientation in the surrounding space several hundred million years ago. As modern biology knows, the part of the brain responsible for orientation ability is one of the biggest and the oldest.
During all this time, this ability was developed and improved. We do not use everything collected in it every minute of our lives, but it is still there.
Thus, to resolve the chasing task, we could try to imitate actions of this kid: This is a proper task for a neural net: Neural net searches for the correspondence between inputs and outputs. Learning these examples, we can teach the neural net to repeat steps made by the kid.
Genetic Fuzzy Expert Trading System for Nasdaq Stock Market Timing - Springer
We can compare the learned neural net to a memory that keeps the rules how to get the target. You might ask me: The answer is simple: If the price went up very strongly 2 days ago, and then the price went down a bit 1 day ago, there is a high probability that today's price will go down.
If the price went up strongly 2 days ago, and then the price went down a bit 1 day ago, there is a high probability that today's price will go up. The price 2 days ago has changed from up very strongly to up strongly and this can change the price movement today drastically. Time to Discuss Technical Issues. The general idea of using the Fuzzy Neural Net in Market Trader is the assumption that some rules exist for the market price movement.
It could be something like this:. If 2 days ago the price went up very strongly, and 1 day ago the price went down a bit, there is a high probability that today's price will go down. The most important thing is the assumption that the possibility exists for the stock market to follow these rules. Let's go back to our example of two missiles once again.
Imagine that we can really see them moving like two jet planes that leave a white track in the sky. Imagine that we look at them from a big distance. Does not it look like two lines on the diagram intertwined? One of them, a prey, can simbolize the market. The other one, a hunter, is our forecast. The Neural Net learns their movements and corrects the forecast in the direction getting as close to the market as possible.
It is how we do it in Market Trader's Neural Net. Now I would like to demonstrate two examples: If I am not mistaken, nobody has proposed the last one before; at least, I did not read about it anywhere though this issue needs more research. This model is based on the assumption that price today is a function of price yesterday, price two days ago, etc. The Astrological Language the main feature of Market Trader program allows to define events that can serve as fuzzy events.
Open "Neural Net Expert", choose there "Price Events" item, then select "Regression Model":. This list represents the results of price fuzzufication. Each line represents a possible price event. Thus, the first line "PRICE DOWN HIGHEST 1 TRADE BACK" means: In other words, the price can go up or down, and the change can be very significant "highest , significant "high" , reasonable "medium" , minor "low" or not significant at all "lowest". The program considers 10 types of possible price movements:.
We can define these price movements for one trade ago, two trades ago, three trades ago, etc. Also, you can define the maximum lag for the autoregression model. As for the price events, let's use the relative price oscillator. By the way, the program provides the ability to use the "Price Bar Structure" events, the fuzzification techniques are applied here as well:.
Real options valuation - Wikipedia
Theoretically, this way we can describe the Japanese Candlestick technique, but this issue needs additional research. This technique is more close to the classical fuzzy neural net. This model concerns mostly price events that we want to predict. You will get this window:.
On this diagram, you can see the distribution of the difference between Close and Open. Using these settings we produce the fuzzification of the difference between Close and Open values.
The program creates four types of events:. The screen is divided on 4 colored zones: For each trading day, we have four colored bars: The brighter is the color, the more active this bar is.
During the optimization process, the program finds the appropriate color for each bar. For example, if some day the price makes a very strong upward movement, we will have a very bright up red bar, all other bars will be almost white not active.
By the way, to create the fuzzy stamp we can use as input any type of events: What we should do is just look for the most bright bar for each day. The interesting feature is that sometimes all bars are bright. May be, this corresponds to unstable zones This is the "know how" of fuzzy stamp technology. A classical fuzzy neural net supports usually the process of getting the price from these colored bars it is called "defuzzification" , but I prefer this variant to see the possible ways.
While creating the fuzzy stamp, you can increase the grade a number of colored bars for better visualization:. If you use the autoregression or price bar structure model, it may be worth to vary the number of hidden neurons H1 parameter. Roughly, it means we increase the number of rules that can be specified by the neural net.
Financial Ratios - Encyclopedia - Business Terms | edegawiwajy.web.fc2.com
Also, you can use the neural net with 2 hidden neurons, but it calculates slowly. So, you can see yourself that application of Fuzzy Logic to Neural Net might be promising for the market forecast. I would like to discuss it with anybody interested and I would be happy to answer your questions if I know this answer