How To Use Fuzzy Logic in Trading?

Have you ever heard of Fuzzy Logic? We humans most of the time are never sure about anything. When you tell some it is very hot today. He may reply not very hot.  There is always subjectiveness involved in our thinking. I think that I am a tall person. Another person may think that I am not that tall. So you see there are never crisp yes and no answers in our daily life. The same think happens in trading. This is one of the main causes of getting false signals. Boolean Logic always talks about only True or False.  There are no crisp answers most of the time.

In real life decision making is always grey. We are always dealing with shades of grey. This applies in trading as well. Technical indicators are never 100% accurate. We can reduce false signals in our trading using fuzzy logic by learning how to deal with grey decision making. The important question is how we are going to deal with uncertainty in our decision making. This important question was solved by Dr. Lotfi Zadeh in 1960s when he proposed the Fuzzy Logic System. In Fuzzy Logic there are always shades. Things don’t become black and white there are ranges in which you can think of both yes and no answers. Did you download you copy of Top Shelf Traders for this month FREE?

What Is Fuzzy Logic?

In classical logic or what we call Boolean Logic, there is always True or False. However, in fuzzy logic we can say it is 0.6 true and 0.4 false. So there is no clear cut answer. This is much closer to our real life decision making when we are most of the time not sure about a thing. We can only guess it is 0.6 true but there is 0.4 chance of it being false. As a trader you know how this situation happens every time we are ready to pull the trigger. MACD is giving a buy signal, but the other indicators are not sure so how to deal with that.

In fuzzy logic first we map the input set onto the range [0,1] using a membership function. After that we use if then inference rules to make the decision. Once the decision has been made we use defuzzification to calculate the crisp value. Sounds complicated? First watch the videos below that explain in simple terms how we use fuzzy logic. Watch the video below that explains what is fuzzy logic!

Fuzzy logic has major applications in industrial controllers. Air conditioning controllers use fuzzy logic a lot. One of the most famous applications of fuzzy logic is that of the Sendai Subway system in Sendai, Japan. This control of the Nanboku line, developed by Hitachi, used a fuzzy controller to run the train all day long. This made the line one of the smoothest running subway systems in the world and increased efficiency as well as stopping time. So you can see fuzzy logic is being used in major ways in real world applications. Below is another good introductory video on fuzzy logic.

Watch this third video that explains what is fuzzy logic. In this video you can see how we can apply the fuzzy logic by first using a membership to map the input set onto the range [0,1]. Then how to use the inference rules and finally how to defuzzify the results. There are 2 main inference systems that you can use. These inference systems are known as Type 1 system and Type 2 system.

Now these were a few introductory videos on fuzzy logic. In trading there are some traders who have tried to apply fuzzy logic. The major application of fuzzy logic lies in candlestick pattern trading. We can use fuzzy logic to better identify candlestick patterns. In the same manner we can use fuzzy logic in technical analysis.

How to Use Fuzzy Logic In Candlestick Pattern Identification?

Candlestick patterns are often used by traders in making buy/sell decisions. Did you read the post on how to trade our favorite candlestick pattern? There are a number of candlestick patterns like the engulfing, harami, hammer, shooting star, evening star etc that are considered high probability trend reversal signals. But identifying these patterns can be a real headache. There are always shades and it requires a lot of experience to identify the true pattern from the false pattern. Fuzzy logic can help us in this regard. We can use fuzzy logic to define a membership function on range [0,1]. This membership function defines a very big candlestick pattern, a big pattern, a medium pattern, a small pattern and a very small pattern and then uses if then inference to make the buy/sell decision.

There are a number of ways to model candlestick patterns using fuzzy logic. We will be discussing how to model candlestick patterns using fuzzy logic more in the future posts. You can read the post on how to increase your winrate with 3 simple candlestick pattern tricks. This is one of the best areas where we can use fuzzy logic to improve our trading results. We can also develop a neurofuzzy system that first fuzzifies the candlestick pattern then using a neural network to make predictions.

How To Use Fuzzy Logic In Technical Analysis?

In technical analysis we can also use fuzzy logic when it comes to making decisions using technical indicators like RSI, MACD, Stochastic etc. Below 30 RSI is a sell. Above 70, RSI is a buy. However between 30-70 RSI is considered to be indeterminate. We can use fuzzy logic to fuzzify RSI. In the same manner, MACD is a good indicator. But it gives false signals. When MACD signal line is below the histogram it is a buy and when MACD signal line is above the histogram it is a sell. Sometimes, MACD signal line is below histogram and it is decreasing. This is the time we can use fuzzy logic to develop a  decision making system. So we can use fuzzy logic in improving technical analysis. We will be writing posts in the future on how to do it. Did you watch the video on how to make 417 pips in a single trading day?

How To Use Fuzzy Logic In OHLC Time Series Forecasting?

Financial time series like the GBPUSD H4 OHLC or EURUSD M30 OHLC are notoriously difficult to model. We can use fuzzy logic to model these OHLC time series  and make predictions about the future values. In the future post we are going to show you how to do it. Do you know you can predict market direction using Quadratic Discriminant Analysis Algorithm? Fuzzy logic is something that we can use in our automated trading systems as well as manual systems i reduce false signals and make better trading decisions.