Mechanical/Algorithmic Trading and Concepts in AI Theory

Towards developing a manner of a mathematical approach, even in developing a simple bread-and-butter kind of trading methodology, broadly as to apply any single Technical Analysis system in a systematic trading model, I believe it may be primarily of interest as towards a sense of minimizing risk in open positions on the market, with a manner of a mathematically informed approach to the market data itself.

Candidly, I don’t personally believe I would ever wish to so much as propose to develop any kind of a completely autonomous mechanical or algorithmic trading system. Certainly, I am interested in minimizing the time I should need to spend in studying the market data when developing a strategy for opening positions on the market. I would not wish to believe as though any single mechanical trading platform could run forever unattended, though. Certainly, I’ve read a little about VPS hosting for algorithmic trading systems. As my being - albeit, in a manner, informally so - a student of free/open source applications of UNIX operating systems, in seeing the VPS options that I’ve seen notices about, it reminds me of a broader topic of Wide-Area Networks, candidly - a mechanically simple topic, but fairly a hairy thing to design in any manner of short instant. I understand that a VPS system, ideally, could permit for a certain mobility when tracking one’s open positions on the market. However, I know that it is a matter that may not be without risks, cautions, and serious technical considerations as may naturally attend with any design of an application of such technology. I believe that it is semantically towards a broader sense of [I]computer business systems[/I] - however independently applied, such a manner of CBS.

Of course, I should wish to have developed a system I would believe I can trust, ethically and technically before ever permitting such a thing to mechanically open any manner of market positions for me, in any measure of real currency capital. Thus, I believe such a thing should need a lot of testing, also a fair amount of documentation about the testing methods, and primarily, a lot of documentation as to its design.

I believe that I know at least a little bit of some of the mathematics, if only from a level of a formal High School mathematics studentiship, some couple of years ago. Statistics was not a topic that the courses had covered at depth, but it was a topic that the courses had addressed - so far as of simple applications of set-wise permutations and combinations, at least. Of course, outside of the observation that the time-series data of a financial chart may be relevant in a sense of statistical, if not expressly stochastic analysis: There may be a manner of a logical side to the system of a mechanical trading system, itself.

Towards that end, I’ve found a book that I believe may serve as a helpful, mathematically canonical reference. The text of the book is avaialble at Safari Books Onilne, moreover: Sigaud, Olivier, and Olivier Buffet, eds. [I]Markov Decision Processes in Artificial Intelligence: MDPs, beyond MDPs and Applications[/I]. London: ISTE ; Hoboken, NJ : Wiley, 2010. (Bibliography created with Zotero) I believe that the book’s Chapter 7 may be particularly relevant to the topic of mechanical trading - viz a viz the [I]open system[/I] nature of a mechanical trading system applied onto any manner of realtime market data - certainly not without the canonical material addressed of the book’s Chapter 1, such that may be applicable as towards more of a manner of a closed system - as in which all states of the hypothetical [I]finite state machine[/I] would be controlled internally of the closed system, itself. Of course, a realtime market data stream may not be so simple to make decisions about - whether of a personal investor, or for a proverbial software-based investor - as a market being, logically, an open system.

Broadly, the text describes some kinds of essentially logical models developed for applications in mechanical decision-making systems. The book’s title denotes a concept of AI, thus, as a concept. However, with regards to so many mathematical models as are described in the book, I believe that it may serve to find an application in any arbitrary number of a computational methodologies as may be applied for any manner of ethically viable process automation onto stochastic systems - including, in any system for mechanical trading onto time-series market data in a realtime investments market.

So, I’m afraid it’s not an easy topic to breeze through, but it seems that there are some existing works in academia.

Hi Sean,

Welcome to the forums.

It seems like you have done a bit of reading/thinking on the topic of mechanical/algorithmic trading. In regards to your first statement, every technical analysis, and/or algorithmically based trading strategy is more or less mathematically-based by nature. Overall you have made sound observations, I encourage you to dig deeper. As for the statement, “a completely autonomous mechanical or algorithmic trading system”, it exists, but they are being kept behind closed doors for the most part; don’t expect to find this out in the open.

In my experience, a crucial step into algorithmic trading would be to design an efficient pipeline for the creation, validation, operation, and review of strategies.

Hope this helps you out.

Hello! Thank you for the kind advice. I hope it won’t sound too revolutionary to propose that a design for such a thing, ostensibly, could be produced as a free/open source software (FOSS) product. Personally, I’m a fan of the BSD 3 Clause License, in terms of FOSS licensing. Juxtaposed to the GPL and its derivatives - LGPL, etc - I believe the BSD licenses are much simpler to work with. Of course, I’m cautious of being too overconfident about the matter - thus, proposing that if I would begin any such software development project, myself - and formally so - it might be available in a peer-reviewable open source model.

With regards to the data channel implementation, not to be too ambitious, if there may be a role for a sockets-based communications channel between e.g MetaTrader and any secondary software services, personally I’ve been wondering whether AMQP or CORBA could be more suitable. I am biased towards CORBA. I believe that a suitable CORBA implementation - by any suitably skilled software programmer - could be applied for introducing a data-channel for a manner of distributed computing and “Push” notifications. However, as I am only now beginning to study the rudiments of the MQL programming language, I would not wish to build the cart before the horse, so to speak. I am familiar with a CORBA implementation in Common Lisp, but I would propose The Ace ORB ostensibly for integration with MetaTrader.

With regards to the logical qualities of mechanical trading methodology, I would wish to propose that a data service for logical inference onto stochastic market data could be developed in Common Lisp, then a data channel established between any single Common Lisp implementation and MetaTrader, via an inter-ORB bridge. In such a regards, MetaTrader hypothetically could be applied as a sort of data proxy application logically between (1) any data services on a trusted local network and (2) the broker’s respective “Black box” services.

Of course, it may seem simpler - if not less [I]disruptive[/I], in manner of speaking - to rely simply on one’s own organic sense of intuition, without endeavoring to make a lot of a software architecture of the endeavor. Personally, however, I am still intrigued about whether some software services may be developed as to serve in manner of an [I]assistive[/I] role to a trader at a trading terminal - as in a spirit of the MetaTrader [I]Expert Adviser[/I].

Certainly, the mathematics and the logical mechanics of an algorithmic trading service may be the proverbial key of the thing. In such a regards, I believe that a Markov Decision Process may present an ideal model, abstractly, such that - in application - could be integrated with other logical models - as [I]viz a viz[/I] description logics, linear temporal logic, and computational tree logic. Of course, it may seem challenging to develop any manner of a discrete finite state machine model as could serve to present the stochastic, yet in a ways numeric data of a market logically closed under a single currency pair. I believe there may be a challenge as to represent such a manner of constantly varying and “tick-marked” data in a way that could be applied in a discrete logical inference model.

…needless to ask? whether any manner of Academia whatsoever tenured about “AI” may deem it all politically correct in any regards. There, I’m afraid, is my most immediate concern to the matter.

I’m not overly knowledgeable regarding the various open source licensing models myself (I will talk to a colleague of mine who has more experience), although I am a big supporter of the open source movement. With that being said, an application of this nature would have its fair share of challenges, such as privacy and security concerns.

For data feed handler, any IPC interface would suffice. Although I personally would opt for named pipes or share memory since they have a speed advantage over sockets. Overall, as long as the proposed application is designed with OOP fundamentals and modular in nature, it should fit the needs of many.

Without going into too much detail, I have built something along the lines of what you have been proposing (always improving on it). If you want to discuss in more detail, my contact info is on my profile.