Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
I'd like some input from the community on how you would add some basic AI (artificial intelligence) principles to your automated trading strategies.
In the past, I've tried assigning weights to certain conditionals, and then take a total score and make entry decisions, even profit target or stop loss decisions, based on the total score -- which was determined by the weight of those conditionals.
It didn't work very well.
What I am trying to do is is add some basic problem solving to a strategy.
Problems to solve:
- Are we in chop?
- Is this normal trading behavior or abnormal?
- Are we bullish or bearish?
- How have our past trades worked, what adjustments are needed?
I think these are some key areas that a human will identify and answer prior to trades, and I want a better method to do this by automation.
However, I don't want strict rules (EMA 100 rising, Stochastic 14,3 below 80, etc). I want fluid rules (the strategy fluidly adjusts each parameter).
In addition, I want the strategy to analyze its past trades and learn from them. Just like a human, but without the emotion. For instance, were we getting stopped to the tick? Were we getting faked out? Were we getting in too early, or exiting too late? etc. A human can make these decisions by glancing at a chart, I want the AI to do the same thing and at least be mostly right.
So like I've said, I've tried some of this before but it didn't work. I want to elevate it and try a new direction, hence my approaching you guys for some help and inspiration.
One motivating reason I think this is entirely possible is Video Games. Look at today's video games. I don't play shooters much, but I know that the AI in these games has improved drastically in the last ten years.
The computer-AI can now take cover behind objects, can decide when it needs to retreat or attack, can know if you are near death and alter his attack strategy, can talk to other computer-AI team mates and formulate a joint strategy, and much more.
And it can do it with a lot of realism, so much so that the best games with the best AI can hold their own with some human players. By realism I mean that they can don't take cover behind a weed, but a wall. Or that they know that the player with higher ground has the advantage. etc, etc.
Sure, there is no substitute for human, but I'm not looking for perfection -- I'm only looking for better than average.
Hi Mike, i agree with your ideas, but i think it requires a quantity to know.
I learn also on AI or better FIS and it gives a lot of solutions for c# or similiar c, java ...
But the problem his, how put the best together ... i am in my research time to develop similar.
You need some steps concept, build, implementation and testing (the most importent point imo) ...
So i do not look in c# or build up, all based now on matlab/R (inspired by sefstrat). You can easy build in matlab ... so your knowledge growing up and and you see what is nonsense and not. Later if i understand all the terms so i build up in c# ...
here some keywords: mackey glass, wavelet, anfis, genfis2, k-step prediction ...
also the unis_report which sefstrat posted is very good. but i also read this doc 7 times, until I have understood ...
best regards
look into the unis_report and in the other paper page 27 - 29 ...
Hmm. This is where my eyes roll back into my head a bit. I enjoy programming. Lots of languages, many years of experience. But when you start talking math equations, my head explodes.
Can't there be a non-calculus way to do AI? please? lol
Honestly you don't really have to understand much of the math to be able to implement most of the techniques.
I would start with fuzzy logic actually, it is very simple mathematically.. the prime reason fuzzy logic was created is to 'keep the man in the loop' and easily allow non-mathematically inclined experts to create rulesets for machine learning tasks.
That is why fuzzy logic is often combined with genetic algorithms or neural nets, it gives a structured framework which makes it much easier to define rulesets which is usually the hardest part of designing a machine learning system.
As wh mentions Matlab is very valuable for this line of research.. one of the best things about it is that you can easily prototype your ideas and you don't really have to know much about the math because all of the hard work is done for you (because there are many good demo programs of AI and related techniques in matlab, much more so than c# or any other language). The matlab scripting language is very similar to c but is interpreted like ruby or python so you can instantly try things out and it is easy to understand if you know c#.. plus the built in documentation is very good, lightyears ahead of visual studio
So after learning the basics of matlab you can relatively easily translate complicated AI programs into c# without fully understanding the details of what is going on. You can use the demos in matlab to understand the general idea of how a technique works in a graphical way, in most cases that level of understanding is all that is required.
I think if you do that also you will find that many of the techniques are not as complicated as you might think, in most cases its just all the mathematical jargon which makes them look very complicated. Its somewhat analogous to how lawyers speak in legalese just to keep themselves relevant although the subjects they discuss are really not fundamentally complex.
The "Real Deal" Matlab with the extra packages you need is actually pretty dear. US$ for what I'd want is roughly 6.5K. Where I live it's about $10K.
With that, consider R. It is not as intuitive or pretty, but it's free. REvolution offers a nice package for Windows users (sorry), and RMetrics offers a companion package. Look at the Matlb vs. R vs. C++ textbook availability for finance on Amazon.
I've never really been an open source guy but now that it's my money and not the Company's, my trading rig includes uses Open Office and R... no Office in sight .
Give me a year and I'll have Ninja calling R (or is it the other way around? ).
I think $6500 sounds like overkill, I seriously doubt you need that many of the toolboxes. While the matlab toolboxes are very nice you can get free replacements for pretty much anything they can do in the matlab repository or elsewhere on the web. The reason the official toolboxes are worthwhile IMO is their excellent documentation which features real world examples and often interactive demos all with very clean and well documented code.
Many of the free matlab packages have good demos and examples as well but most of the time their code is not very well documented and is much harder to follow, especially if you are not very familiar with matlab or the math behind the technique in question.
R is nice too (can't argue with free) and they have pretty good documentation for an open source project but it can't compete with Matlab as far as ease of use. I think it would be safe to say matlab has the best integrated help I have ever seen in a product, very clear well formatted documentation (no tangled nightmare of crap like microsoft docs ie MSDN), lots of video demos included, informative application specific webcasts available on their website etc etc..
I heard one interview on TraderInterviews.com of a trader that uses Neuroshell and says it gives them an edge. He keeps buying more computers so he can run more instances of Neuroshell. These guys always run ads in TASC too and they've been around a while. I've never used their tools so I can't speak to their effectiveness.