
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Check out the new article: Category Theory in MQL5 (Part 15) : Functors with Graphs.
This article on Category Theory implementation in MQL5, continues the series by looking at Functors but this time as a bridge between Graphs and a set. We revisit calendar data, and despite its limitations in Strategy Tester use, make the case using functors in forecasting volatility with the help of correlation.
The MQL5 Economic Calendar was covered when we related category theory to database schemas so a re-introduction here of its relevance to traders is not pertinent. To represent it as a graph, a sequence of edges and nodes, firstly requires preselecting a subset of the news items we will include in our category. As is apparent from the economic calendar website there are a lot of items to choose from, however if we decide to select only say four based on a loose hypothesis that links them as shown in the diagram below:
Then our hypothesis would be arguing that retail sales numbers are a function of producer PMI numbers, which in turn is derived from CPI, which in turn results from how well treasury auctions performed, which performance is also based on retail sales numbers. So, it’s a simple cycle whose veracity is not the subject of the article, but rather is meant to illustrate a possible graph composition from economic calendar data.
Graphs provide the benefit of simplifying complex interconnected systems by creating two straight forward tables, one of vertices’ pairings, and the other serving as an index of the vertices. A graph can be viewed as a category because the vertices can be seen as objects (domains) meaning the edges serve as morphisms. As a side note how this would differ from a linear-order looked at in the previous article is as the name suggests, in linearity. Graphs tend to accommodate more complex connections where an object/ domain can be connected to more than one object.
So rather than pairing individual objects in this category to objects in the S&P volatility category as we did in the previous article on linear orders, we will pair the rows of the vertex pairs to the S&P category. This implies it cannot be isomorphic as multiple rows are bound to pair to a single object (data-point) in the S&P given that the S&P is time based. It also means our domain objects will constitute four elements (the latest values of each of the four items in the cycle).
Author: Stephen Njuki