Search
× Search
Monday, December 23, 2024

Archived Discussions

Recent member discussions

The Algorithmic Traders' Association prides itself on providing a forum for the publication and dissemination of its members' white papers, research, reflections, works in progress, and other contributions. Please Note that archive searches and some of our members' publications are reserved for members only, so please log in or sign up to gain the most from our members' contributions.

Building Blocks for Automated Trading

photo

 Mark Brown mark@markbrown.com, Global Quantitative Financial Research, International Institutional Trading, Algorithmic Modeling.

 Tuesday, December 29, 2015

In today's competitive automated trading the old method of building a trading system much less effective. There are actually quantifiable edges proven to be consistent which however do not make a complete system. This is where a building block approach is most helpful to system developers. Quantify, code and test small building blocks even though you may have no idea how you will use them at the time. Building block's may take shape as 1.) order entry and exit methods 2.) position sizing and money management 3.) expansion and contraction of price and volume 4.) divergence and price patterns 5.) time of day, week, month, year cycles 6.) social media reaction and residual studies 7.) geometry and solar system permutation cycles. There are of course many other possible types of system building blocks which one can imagine and come up with. The point is that you don't have to get lost in huge convoluted system coding when you can break down your ideas into building blocks. Sometimes when you're writing simple or complex systems there will be a conflict that is very time consuming to debug. Using building blocks which have each been tested and debugged independently help save time when when writing systems. Interesting you can also use this building block method to decipher or reverse engineer trading systems. Good trading - Mark


Print

34 comments on article "Building Blocks for Automated Trading"

photo

 Mark Brown mark@markbrown.com, Global Quantitative Financial Research, International Institutional Trading, Algorithmic Modeling.

 Tuesday, December 29, 2015



Chart of order entry "Block" in action. http://markbrown.com/linkedin/20151229-002.png


photo

 Mark Brown mark@markbrown.com, Global Quantitative Financial Research, International Institutional Trading, Algorithmic Modeling.

 Tuesday, December 29, 2015



Alex - I think it is important that traders catalog and store snippets of code along the way to developing a valid trading method.

I think often many become overwhelmed with trying to achieve perfection with a complete system. I am suggesting that traders focus on the small truths that they have discovered and catalog these for future use.

Not everyone has knowledge of how to time a market. Many are on a path of discovery and should value the steps along the way. Discard the invalid and cherish the pieces that may complete their masterful trading model one day. It's a part by part process I propose. Mark


photo

 Alex Krishtop, Consultant at Edgesense Solutions. Mentor at Algorithmic Traders Association

 Tuesday, December 29, 2015



Mark, this all sounds reasonable, but code snippets start to generate reasonable results only when applied in the right order, to put it simply.

However I do support your thesis about focusing on "small truths". This is btw exactly what I try to teach my students and what I'm still trying to bring forth in many discussions here, in the group: don't run for a "universal" strategy which should work in all markets, in all time frames: it doesn't exist. Replace this impossible task with a number of minor, each one reflecting a single, simple and understandable market process, bring them all together in a portfolio and you will get a highly robust strategy with manageable risks — not only systematic, but also operational.


photo

 Mark Brown mark@markbrown.com, Global Quantitative Financial Research, International Institutional Trading, Algorithmic Modeling.

 Tuesday, December 29, 2015



Alex - I agree there are so many ways to trade wrong that when you find a small truth that work's for you hang on to it even though you may not know what to do with it yet. One day the pieces will come together and you will need that snippet of code.

Also about the universal system that everyone is after - it would be far better to break down task and understand step by step not getting lost in a big trading system that is convoluted to the point you don't understand it. At that point you might as well have a black box. I like your approach makes sense.


photo

 Ryan W., Real Estate Investor at RZM

 Tuesday, December 29, 2015



thanks for the tip Mark. I am currently learning python to build my algo. Is your method different from OOP?


photo

 Alberto Sfolcini, Senior Project Manager

 Wednesday, December 30, 2015



Building an automate trade system from scratch can be a daunting task, I strongly suggest to focus on system's logic and using an already built trading system framework engine.

Taking care of low level logic, sycnhronizing, connectors, data feeders it's not something you can learn in few weeks unless you have strong coding skills.


photo

 Bill Sarubbi, President at Cycles Research Investments

 Wednesday, December 30, 2015



Hi Mark-Solar system permutation cycles are now acceptable? It has taken 30-40 years.


photo

 Mark Brown mark@markbrown.com, Global Quantitative Financial Research, International Institutional Trading, Algorithmic Modeling.

 Wednesday, December 30, 2015



Alberto exactly what I was thinking about when Ryan mentioned Python and in another thread someone mentioned MatLab - not that there is anything wrong with some trying that path but for me it was a waste of time. Many myself included get lost in the discovery process and forget about the end goal which should first be make a living.

The best traders I know focus on knowing the market they trade and they will use whatever tools are the simplest that they themselves can work with. No matter what it happens to be pencil and paper, charts, spreadsheets, advisories, ibd and more it just doesn't matter.

Automated traders often fall into the control freak category where they want to control everything. I did that developed two software platforms that were both commercial flops no matter how brilliant they were. Fact was that most successful traders who can pay a monthly fee don't really need to learn a programming language.


photo

 private private,

 Thursday, December 31, 2015



@Mark .. what is the question ? .. i am using this method .. we start building a new platform / Parallax before 4 years . . witch i connect with MC.NET ..is not simple ..


photo

 Aleš Kudrna, Founder & Chief Trading Officer ve společnosti Livento Capital Management, LLC

 Thursday, December 31, 2015



We have as well quant systems that runs on futures. Our approach is bit different but very effective. We include each block and strategy under running automated system that manages the strategies. The system on its own decides which block to run and what attributes to give to it.

https://www.liventocapital.com/en/our-strategies


photo

 private private,

 Thursday, December 31, 2015



@Ales . . Nice advertising .. let me know how we can test your platform .


photo

 Patrick Rooney, Product Marketing Manager at Trading Technologies

 Thursday, December 31, 2015



Building blocks is the exact approach we took at Trading Technologies.

Our ADL, Algo Design Lab, allows the user to develop, test and deploy simple to complex algos and order entry types using proven code snippets with drag and drop blocks of code. ADL has been in production for nearly four years and has generated a considerable footprint in the futures trading industry.

Free demos of ADL are available on our website and you're welcome to reach out to me with any questions.

https://www.tradingtechnologies.com/customize/adl/


photo

 Mark Brown mark@markbrown.com, Global Quantitative Financial Research, International Institutional Trading, Algorithmic Modeling.

 Thursday, December 31, 2015



Patrick - thanks I think allot of TT and was involved with TradeVec which has remained a proprietary hedge fund platform only. I was a registered developer with you guys for years and love your data. It is nice to see you working on a suitable front end although it is long overdue, very long overdue.

Anyway TT data and speed is fantastic so you have a great infrastructure to use as a base. I for one will certainly see what you have to offer, there is a great need for such products. I just have not visited TT in a few years so was unaware of any current projects, thanks.


photo

 Maxim(Zhongchen) Shen, _

 Thursday, December 31, 2015



The word should be read as Encapsulation, as it is in the world of OOP world. Yes, it is of course easier and less bug if we can get all "blocks" ready. But there is no free lunch, bad "blocks" design or bad understanding of good "blocks" would also easily cause less flexibility, algo inefficiency, or sometimes hard to step into those one size fits all type "blocks"


photo

 Borut Skok, Market Analyst

 Friday, January 1, 2016



I think also that Python, MatLab, etc. in this area represent a wasting of time, because here the leading point it is not having an aresenal of mathematical possibilities, but the crucial point is an idea encapsulated in a tested block, that only could be a foundation of the next step. And that has nothing to do with the Python or MatLab, etc. A consistent trading program could be made only as a summarisation of the mentioned blocks. If so, we would only have a need for Python or MatLab, etc. for the easiest part of the job, what is worthless. When I see the Python and MatLab demandings exposed, when offering jobs in this field, I immediately know that the board of the company does not know very much about the mathematics. The ideas could be tested in a much easier, cheaper and less complicated ways than by the Python and MatLab are offered..


photo

 Ron Leplae, Global PaaS - eComm at Verifone

 Friday, January 1, 2016



I have spent a lot of time with some vendors, encountered some ego's of this planet (= people with an attitude), had to nearly double proof before they would admit a simple bug, then took a long time and numerous recalls to get it fixed. They blame the data-feed, until you create your own tool that correctly works with the same exact data-feed. Some more in depth analysis showed that some vendor is adding a 32 byte random string to make a tick-based stream of historical data uniquely identifiable. Needless to say what kind of performance waist this creates. Bottom-line i'm curious to find the perfect framework to win time and focus on the algo development. For the time being, that was impossible and i have been forced to focus on my own end-2-end controlled platform... It has allowed me to understand what i'm doing and why i'm doing it this way... It is also kind of a comfort feeling that i know i can do an iteration of optimization on my code when i'm running into a performance issue.


photo

 Borut Skok, Market Analyst

 Friday, January 1, 2016



Ron, very interesting.


photo

 Janusz Pawel Opechowski, Developer &givers culture fan.

 Saturday, January 2, 2016



Hi.

* other block definitions

All building blocks should be a clear cut list of reusable tested components.

One element of that list is a variation about given block .

What clear cuts u propose people?

* of other technologies usage:

Object oriented coding allow say mt4 to use matlab or python components as

Implementations of mt4 objects.

When mt4 is not enough get some pyton back up to build component and interface it to mt4.

Python or matlab have lots of tested free code we could use to build our (simplier than coding it in mt4 ) components.ie find your portfolio composition there.

Finally all open close, risk etc. mt4 components stay untouched

while some additional ones interface to python.

All closed to blocks,

tested and reusable in rapid development of future strategies.


photo

 Ron Leplae, Global PaaS - eComm at Verifone

 Sunday, January 3, 2016



A good system will contain a number of building blocks. Without any academic thought and without spending hours on the topic i see the following blocks coming back in my own systems (some being reusable/some being one-off) , but still adhering to being 'blocks' as discrete collaborative components (i often use JSON to make them talk together):

* infrastructure blocks (feed/correlation/persistency/order mgmt & execution/risk mgmt/money mgt), all being generic reusable blocks

* bias/context blocks

* trade trigger blocks

* scale-in/additional trigger within the running trade

* scale-out/closure

- neural network based scoring blocks (optimization)


photo

 Wang Q., Technical Manager at Perfect World Co., Ltd.

 Tuesday, January 5, 2016



The term "block" you used is also called reusable module in software engineering. My own trading and back testing system is composed by many reusable modules, such as trailing stop is an independent module. Reusable modules+composition=flexible and powerful system.


photo

 Mark Brown mark@markbrown.com, Global Quantitative Financial Research, International Institutional Trading, Algorithmic Modeling.

 Wednesday, January 6, 2016



Simple Truths - The building blocks for a successful automated trading system. It looks like there are quite a few researchers taking this approach and what is really interesting is that everyone has a slight spin on it. However we have all come to same conclusion which is that it is a worthy and valued approach to block code.

Even in everyday life you can get overwhelmed by huge complex problems but by isolating what you can take care of and setting that aside you can conquer piece by piece a much larger problem. I appreciate all the comments so far it has been very enlightening to me and hope the same for fellow traders.


photo

 James Hudson, owner

 Thursday, January 7, 2016



A layman perspective of using building blocks for strategy system development:

I prefer to use the term “plug in modules”. Your library of modules can be just a few or

extensive depending on the function of the module when plugged into the system.

Imvho, this approach can have very interesting results. Depending on the level

of complexity, I am not sure there is a lot of time savings, as each deeper level requires a lot of custom

coding to achieve a total system from the many modules. I do believe with using this approach

that you have a better insight into “your strategy” to be more able to build on strength and

strengthen weakness.

just my opinion


photo

 private private,

 Thursday, January 7, 2016



I think is simple .. entry = One block (with all conditions ) / ---> exit second = block (with all conditions ).. you dont need to have a full EA ..


photo

 Eshan Ahluwalia, Vice President at Nomura Securities

 Friday, January 8, 2016



7.) geometry and solar system permutation cycles. what does this mean.


photo

 Patrick Rooney, Product Marketing Manager at Trading Technologies

 Saturday, January 9, 2016



Mark Brown mark@markbrown.com We have a new platform now that will be of interest to you. The TT platform has been built from the ground up over that last few years for a faster, more flexible tool set so non-developers and developers alike have a fantastic experience in both their algo development and trading. Please take a look at the new website for more information of reach out to me.

http://about.trade.tt/

https://www.tradingtechnologies.com/customize/apis/

https://www.tradingtechnologies.com/customize/adl/


photo

 Vitor Oliveira, Financial Trading

 Saturday, January 9, 2016



Same question placed by Eshan Ahluwalia. Thank you Sir.


photo

 Mark Brown mark@markbrown.com, Global Quantitative Financial Research, International Institutional Trading, Algorithmic Modeling.

 Saturday, January 9, 2016



Algorithms to compute the positions for the Sun, Moon, major planets, comets, minor planets etc. and computing a planet's position in three dimensional space is a great exercise to break market data free from its two dimensional captor.

During the time I was analyzing permutation cycles I did find cycles relative enough to be used in trading. Weather and Geometry are also areas that show great promise for cyclical automation systems.

I don't know how some of these ideas work but I can't deny their validity.


photo

 Borut Skok, Market Analyst

 Sunday, January 10, 2016



At the end, everything is a part of geometry. My opinion is that cycles in the financial area are not "natural". One of the simplest algorithms in finance, Fibonacci, is more a secret agreement than a natural cause. Is there also any difference between cycles and trends? Or the cycles are only the borders of the trends? My system is albe to find almost any cycle or trend depending on the instructions to the formulas. So by my opinion a or the cycle (trend) is what I see or what I wont to see and not somthing that nature is positioning in front of me.


photo

 Alton Crooks MBA, Proprietary Trader at T3 Trading Group, LLC

 Monday, January 11, 2016



It there a book on using this building block method.


photo

 Thomas Tomiczek, Owner at NetTecture & Trade-Robots

 Monday, January 11, 2016



There is no building block method. The post of Nigel is basically describing basic software development techniques that are more than 20 years old. There are TONS of books on writing good and modular code. Except - most strategy developers never actually learn to do what they do (i.e. software development). The result is that "modular code" can be presented as something innovative. I suggest you grab any book about software development, clean code. SOLID principle, test driven development etc. There are bookshelves full of that.


photo

 Ron Leplae, Global PaaS - eComm at Verifone

 Monday, January 11, 2016



Conversation is about trading automation and not just an 'app'. You need to think business blocks, not IT technical blocks. The best well designed perfectly written, bug free code, will fail if you don't know what you are doing. You (might) need data-feed, market context/footprint, triggers, trade management, money management, correlation/divergence, ... some of which will be specific to the system and some generic


photo

 Mark Brown mark@markbrown.com, Global Quantitative Financial Research, International Institutional Trading, Algorithmic Modeling.

 Monday, January 11, 2016



Another way of thinking about "it's" like infrastructure you need roads and utilities before you build an apartment complex.

Or in the auto industry we don't build every tire custom for every car. You make parts and then assemble the automobile. The engine which is the most important can continually be refined once you have a great platform.

In trading systems the engine would be the logic whereas the order entry, data handler, charting etc. would be considered the platform. Perfect the platform block by block and then go after perfecting the logic engine. You are left to focus upon what matters the most and can be confident that the small items are solid and proven.


photo

 James Hudson, owner

 Monday, January 11, 2016



@Mark, well said.


photo

 William Jacobs, Capital Markets Professional

 Wednesday, January 20, 2016



I like your approach Mark! Modular systems are easier to manage and offer greater flexibility. Sometimes a good "building block" works better in a different system then the one for which it was created. I completely agree! Over time you can even get a sense for which types of building blocks should be used in certain situations. . . giving more edge and increasing trade efficacy across multiple trading systems. The idea, for those interested - is to compartmentalize each segment of your system development process. Using the numbered categories provided by Mark is helpful or you could use ones that make sense for you. Over time you may even break them down further. . .it really depends on the style of the system your trying to develop. Thanks Mark

Please login or register to post comments.

TRADING FUTURES AND OPTIONS INVOLVES SUBSTANTIAL RISK OF LOSS AND IS NOT SUITABLE FOR ALL INVESTORS
Terms Of UsePrivacy StatementCopyright 2018 Algorithmic Traders Association