An open-source genetic algorithm software (Guest post)
Mechanical traders never stop researching for the next market edge. Not only to get better results but also to have more than one system. The best trading results can be achieved with multiple non-correlated systems traded simultaneously. Unfortunately, most traders use similar market inefficiency: some traders specialize in trend following, some in mean reversion and so on. That’s because learning to exploit one kind of edge is hard enough, mastering all of them – impossible. It would be beneficial to have a software that creates many non-related systems.
The driving engine behind Genotick’s power is a genetic algorithm. Current implementation is quite basic, but with some extra quirks. For example, if any of the systems is really bad – it stays in the population but its predictions are reversed. Another trick is used to help recognize biased trading systems: a system can be removed if it doesn’t give mirrored prediction on mirrored data. So for example, position on GBP/USD must be opposite to the one on USD/GBP. Genotick also supports optional elitism (where the best systems always stay in the population, while others are retired due to old age), protection for new systems (to avoid removing systems that didn’t yet have a chance to prove themselves) and inheriting initial system’s weight from parents. These options give users plenty of room for experimentation.
When Genotick is run for the first time – there are no systems. They are created at the start using randomly chosen instructions. Then, a genetic algorithm takes over: each system is executed to check its prediction on historical data. Systems that predicted correctly gain weight for future predictions, systems that predicted incorrectly – lose weight. Gradually, day after day, population of systems grows. Bad systems are removed and good systems breed. Prediction for each day is calculated by adding predictions of all systems available at the time. Genotick doesn’t iterate over the same historical data more than once – training process looks exactly as if it was executed in real life: one day at a time. In fact, there is no separate “training” phase, program learns a little bit as each day passes by.
Interestingly, Genotick doesn’t check for rationale behind created systems. As each system is created out of random instructions, it’s possible (and actually very likely) that some systems use ridiculous logic. For example, it’s possible that a system will give a “Buy” signal if Volume was positive 42 days ago. Another system may want to go short each time the third digit in yesterday’s High is the same as second digit in today’s Open. Of course, such systems would never survive in real world and also they wouldn’t survive for long in Genotick’s population. Because each system’s initial weight is zero, they never gain any significant weight and therefore don’t spoil cumulative prediction given by the program. It may seem a little silly to allow such systems in the first place, but it enables Genotick to test algorithms that are free from traders’ believes, misguided opinions and personal limitations. The sad fact is, the market doesn’t care about what system you use and how much sweat and tears you put into it. Market is going to do what it wants to do – no questions asked, not taking prisoners. Market doesn’t even care if you use any sort of intelligence, artificial or not. And so, the only rationale behind every trading system should be very simple: “Does it work?”. Nothing more, nothing less. This is the only metric Genotick uses to gauge systems.
Each program’s run will be a little bit different. Equity chart below shows one possible performance. Years shown are 2007 until 2015 with actual training starting in 2000. There is nothing special about year 2007, remember – Genotick learns as it goes along. However, I felt it’s important to look how it performed during financial crisis. Markets traded were:
USD/CHF, USD/JPY, 10 Year US Bond Yield, SPX, EUR/USD, GBP/USD and Gold.
(In some cases, I tested the system on a market index such as SPX instead of an instrument that tracks the index such as SPY, but the difference should be minor.) All markets were mirrored to allow removing biased systems. Some vital numbers:
CAGR: 9.88%
Maxim drawdown: -21.6%
Longest drawdown: 287 trading days
Profitable days: 53.3 %
CALMAR ratio: 0.644
Sharpe ratio: 1.06
Mean annual gain: 24.1%
Losing year: 2013 (-12%)
(Click the cumulative returns in % chart below to enlarge.)
Cumulative Returns (%) since 2000 |
Source: http://epchan.blogspot.com/2015/10/an-open-source-genetic-algorithm.html
Anyone can join.
Anyone can contribute.
Anyone can become informed about their world.
"United We Stand" Click Here To Create Your Personal Citizen Journalist Account Today, Be Sure To Invite Your Friends.
Please Help Support BeforeitsNews by trying our Natural Health Products below!
Order by Phone at 888-809-8385 or online at https://mitocopper.com M - F 9am to 5pm EST
Order by Phone at 866-388-7003 or online at https://www.herbanomic.com M - F 9am to 5pm EST
Order by Phone at 866-388-7003 or online at https://www.herbanomics.com M - F 9am to 5pm EST
Humic & Fulvic Trace Minerals Complex - Nature's most important supplement! Vivid Dreams again!
HNEX HydroNano EXtracellular Water - Improve immune system health and reduce inflammation.
Ultimate Clinical Potency Curcumin - Natural pain relief, reduce inflammation and so much more.
MitoCopper - Bioavailable Copper destroys pathogens and gives you more energy. (See Blood Video)
Oxy Powder - Natural Colon Cleanser! Cleans out toxic buildup with oxygen!
Nascent Iodine - Promotes detoxification, mental focus and thyroid health.
Smart Meter Cover - Reduces Smart Meter radiation by 96%! (See Video).