Skip to content
All library documents

Fuzzy Sets and Mamdani and Sugeno Inference for Trading Models

Article MQL5 articles

Summary

The document introduces fuzzy sets as a way to represent degrees of membership between fully excluded and fully included. It defines membership functions, linguistic variables, terms, and defuzzification, using age categories to illustrate how a value can partly match several terms. It then describes fuzzy models for situations where a system is difficult to formalize precisely.

A fuzzy model is built by choosing inputs and outputs, creating a weighted rule base, and selecting an inference method. The article outlines Mamdani inference, which combines fuzzy input conditions and output sets before converting the result to a numeric value, and Sugeno inference, whose rules produce output functions of the inputs. It also discusses implementing examples in MQL5, including a cruise-control model. The discussion is conceptual and implementation-oriented rather than a trading performance study: it provides no evidence that fuzzy rules improve trading outcomes. Results depend on expert-defined membership functions and rules, so subjective choices can introduce errors; the article recommends validation and adjustment.

Key ideas

  • Fuzzy sets assign membership degrees from zero to one instead of using only binary inclusion.
  • Membership functions encode how strongly an input matches a linguistic term.
  • Fuzzy models use expert-defined rules to connect input conditions with outputs.
  • Mamdani inference aggregates fuzzy output sets, while Sugeno rules use functions of the inputs.
  • Defuzzification converts a fuzzy result into a specific numeric output.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.