Saturday, December 31, 2011

Meta-Trader - 2011 Wrap-up

Welcome back Meta-Traders and Happy New Year!

As of today's post, this blog is now 2 years old so Happy Birthday wishes are in order as well. Blogging has allowed me to connect with like-minded people from around the world. Through blogging I was introduced to MetaTrader 4 and to Daniel Fernandez from Asirikuy whose work has produced the bulk of my results.

It was a wild year in financial markets and foreign exchange as well. The world economy is still struggling to recover from a financial crisis and despite an incredibly easy US Federal Reserve, equity markets struggled as well with the S&P 500 losing a fraction of 1% on the year. But with a dividend yield of about 2.4% and government bonds yielding almost nothing, equities continue to be the place to be versus bonds and cash. What about Forex, that's why you are reading this blog, right?

The table on the left shows my live results for the year. The numbers in the current column may not agree with current account balances because I have subtracted out recent deposits and deposit bonuses to reach a before and after number. As you can see, I made money in all but one account and my overall return was 16.94% which beat the S&P 500 by almost 14%, even considering dividends!

It is important to note a good part of the returns are due to deposit bonuses. For example with Atipaq Full Portfolio, I started with $2000, then put $2100 to work from deposit bonus, and the rest was the result of trading profits and pip rebates paid by the referring broker. It's important to note because deposit bonuses help in the account building stage, but will not help further once I am fully invested. Now let's go through each account.

Atinalla #1 had an excellent year returning about 27.6%. The bulk of the returns were made in January of 2011 and has since held onto its gains which says something for the robustness of the 3 embedded systems.

Atipaq Full Portfolio was the star performer of the year returning a stunning 59.5%. This portfolio had a rough period during August drawing down from being up almost 67% to almost 19%. I don't mind draw down so much when its giving back profits versus when it cuts into the initial investment. That's why its psychologically important to survive the initial account draw down since I would probably cut the loss on any account once its exceeds a 20% loss from the initial start up.

Megadroid Live had a pretty decent year, up about 9.62% for the year. I added FX-Regression USD/CAD and USD/CHF to the account in early December to goose the returns. While the account is still down slightly since opening, note that I started the year down about 10%, so it had a decent recovery off the lows.

FX-Regression Live returned about 4.7% for the year. Most of this profit was due to pip-rebates and profits from actual trading were close to nil. This account was up as much as 20% and down as much as 15%. Clearly this system needs additional work but has survived one year of live trading which is somewhat of an accomplishment.

Atinalla FE was another case where the bulk of the profits came from a deposit bonus and the actual system had a slightly negative return. I have stopped trading this system and will likely switch to Sunqu in 2012.

Atinalla #3 was another case where the profits came from the deposit bonus and the actual return for the system was slightly negative. I have made some adjustments to this account and will continue to trade it live in 2012.

Atinalla Custom was my only losing account. I started this account trading Atinalla #4 from Asirikuy, but had a number of problems due to an incorrectly high starting balance. Also, I had poor performance from Sapaq and God's Gift ATR. As of now, I am running a subset of the systems in Atinalla #4 and the account is already starting to recover.

Overall, it was an excellent year and its clear that the deposit bonus and pip rebates made the difference in many cases. My overall performance did not meet my 30% to 60% target, but its possible that my goal was not attainable. Of course, the best accounts made those targets, but you can never tell in advance which system will perform best. That's why its important to have a good mix of systems each with a positive expectation.

That's all for now, enjoy your New Year's celebration and i'll see you back in 2012.

Saturday, December 24, 2011

Meta-Trader - Sunqu Review

Welcome back Meta-Traders.

Here's wishing you a joyous winter solstice and greetings of the season! Summer is now officially on the way!

In this review we tackle Sunqu, Asirikuy’s first expert advisor which makes use of neural network technology.

Before approaching a topic like this, it’s good to get some context. There are a lot of good introductory articles on Neural Networks. If you are not familiar with the topic, check out this article here.

To put it simply, Neural Networks are mathematical models that accept one or more numeric inputs, perform a mathematical function and produce a number as output. I have some familiarity with the topic since I did an independent study based on Neural Networks when I was working on my Master’s Degree in Computer Science back in the winter of 1988. The project turned out to be more like a solution looking for a problem in the sense that I didn’t focus on any particular problem domain. So it’s fortunate that all these years later I have an excellent problem domain in the forex markets!

First, Sunqu means door in Quechua, the language of the Inca people in Central America. Sunqu runs on EUR/USD against the daily charts and attempts a once-per-day prediction of the direction of the close based on the today’s open plus the prior X bars price action. Sunqu trains by looking a X bar price patterns over Y number of bars of recent price action.

Since the network weights are initialized to random values, it turns out that the network may produce different results on 2 subsequent runs - even if presented with the same input data! This would appear to violate the definition of a mathematical function that given the same inputs, should produce the same output no matter how times you run it, right?

Daniel tackles this problem by making a ‘committee’ of networks, that all are presented with the identical input data and produce their prediction. Then he polls each of the networks and considers the results to be valid only if some percentages of the network’s predictions agree on one direction or the other. As a result of that process you get one of 3 results:

  • All Bullish
  • All Bearish
  • No-agreement
Based on the daily evaluation, the trading strategy falls out as follows:

  • An "All Bullish" prediction: results in opening a long position - and first closing an open short if necessary
  • An "All Bearish" prediction results opening a short position - and first closing an open long if necessary
  • No-Agreement results in no position being taken, and existing longs and shorts are closed if necessary
Other key points of the strategy as follows:
  • Position size defaults to 1 risk unit using the standard Asirkuy position size calculation based on the 14 bar daily ATR
  • There is also an option to pyramid positions where you get agreeing signals for more than one day in a row
  • Stop losses default to 200% of the ATR value
Back testing Sunqu is time-consuming and CPU-intensive to say the least. Running a back test for 10-years on EUR/USD took the better part of 24-hours to complete. It would have taken much longer except I reduced the committee size to 5 and the agreement threshold to 80% - so 4 of the 5 networks would have to agree to produce a trading signal. Daniel coordinated a group-back test in which many Asirikuy members ran the back tests to compare results. As a result of that effort, Daniel came out with a recommended number of committes and agreement threshold. Clearly, you can be more liberal with the number of networks used for live or demo trading versus back testing.

Before we talk about performance, keep in mind that your results may vary. That’s always the case with back-test and live trading of course. But there’s an extra bit of uncertainty due to the semi-deterministic nature of the neural network and the results that it produces.

In a 10-year back-test, against EUR/USD, Sunqu showed an annual return of 5.62% with a maximum drawdown of 14.05%. That sets the Average Annual Return to Maximum Drawdown Ratio at about 0.4 which does not compare favorably to many Asirikuy systems and portfolios. To put it more simply, Sunqu risks about $1 for every 40 cents in realized profit.

But those numbers don’t really tell the whole story. Considered on a year-by-year basis, Sunqu showed a profit in 9 of the 10 years between 2000 and 2010 and the largest yearly loss was -3.63%. So to consider the overall performance, Sunqu does not produce a lot of profits, but drawdown is also relatively low. Also, the fact that its trading signals are completely unrelated to the other systems on Asirikuy, adds additional diversification to the trading results and should therefore be a good complement to other systems on Asirikuy.

One more thing – Sunqu has a cool user interface which can be enabled through an external variable or property for the expert advisor. When enabled, Sunqu pops up a window during network training which shows the actual performance over the past Y days, and the system’s predictions versus the target data during the training process. Each round of training can take between 10 and 30 seconds and based on the settings and the number of networks to be trained, the system can take up to 15-20 minutes to finish testing once it has started the process.

Another positive thing about Sunqu is that it trades often. Looking at the demo account, the system was in a trade more often than not for the testing period. That means more opportunities to be on the right side of a big more even if utterly unforeseen by other circumstances. Also, more trading means more pip rebates which his always a good thing.

Another plus is NFA compliance, since the system trades in only one direction at a time.

Sunqu was tested on the daily chart of several major pairs, and most pairs were not profitable with the exception of EUR/USD. Sunqu has been show to be profitable on USD/CHF as well as EUR/USD.

Sunqu is currently not enabled for live trading. Once it is, I will apply it to one of my spare accounts.

That’s all, have a great weekend folks.

Friday, December 16, 2011

Meta-Trader - What's your Edge?

Welcome back Meta-Traders.

Do you have an edge in the markets? I've often heard it said that if you don't know what your edge is, than you probably don't have one!

Forex Trading presents a great opportunity to find and develop an edge. There are also some inherent advantages to Forex trading on the Meta-Trader platform, particularly if you know the tricks. And the tricks are not 100% about trading strategy itself. What am I talking about? Read on.

Trick #1

Use a broker-paid deposit bonus. Every dollar deposited to the accounts followed here has been been paid at least a 5% deposit bonus. That means that if you deposit $1000, the broker will put in an extra $50 and you have $1050 to trade. This doesn't mean you can deposit $1000 on Monday and withdraw $1050 on Wednesday. There are often conditions that the broker must earn at least as much as they paid you in bonus before you can withdraw the funds. But if you have a long-term perspective and a good trading edge, this should not be a problem.

Do I consider deposit bonus to be part of the total return? Absolutely! It may not show up in the account performance on the right side of the blog, but it will be considered part of total return shown in my end of year blog post.

Not all brokers pay a deposit bonus. Do your homework and find one that does before you give them your money.

Trick #2

Use Pip Rebates. When you open an account with your Forex broker, do it through an Introducing Broker often abbreviated an IB. That allows the IB to capture a portion of the broker's revenue. And if you pick the right Introducing Broker, they will split the proceeds with you, the trader. This means that you capture a portion of the bid-ask spread which (when you don't open your account through an IB) by default goes 100% to your Forex Broker!

If you use an IB, then a portion of that money goes to the IB. And if you select the right IB, they will pay you a portion of the Pip rebates. If you are not using an IB that pays Pip rebates, find another setup, because you are giving away profits!

For all of my live trading, I use Trader's Choice FX. These guys pay $5 US for each 100K lot. This may not seem like much, but for systems which trade a lot, this can add up. For my own Expert Advisor FX-Regression, this adds up to about 0.5% of the account per month or about 6% return per year - aside from the gains returned by the expert!

To see this affect in action, check out the deposit made to my FX-Regression account between the 28th and 30th of each month. For my $1000 account, the bonus payment is about 0.5% per month or 6% per year. What affect does this have on the total return of the account? As of 12/16/2011, this account is up 7.47% for the year, but the actual account balance is just over 10%. Pip rebates clearly favor accounts that trade often.

For the record, I have no affiliate relationship with Traders Choice FX, and getting them to pay the promised bonus can sometimes be like pulling teeth. They won't make starting bonus payments which amount to less that $20. So sometimes you have to wait many months, then go back to them for pip rebates earned in prior months. I am in this situation with my FXDD accounts which have never received a bonus payment, and if all goes well should get a fat payment toward then end of this month. Once the account is setup, they will deposit the bonus directly into your trading account (like you see above for my Forex Regression account) for trades executed 2 months prior.

Of course you can skip this step and open an account directly with the Forex broker, but then you are just giving away a portion of your profits.

Tip #3

Develop a trading edge.

In my humble opinion, trading Forex is incredibly hard. Sometimes a pair will move 50 pips in 2 minutes, but most of the time, they just slosh around within their daily range 24 hours a day, 5 days a week. I can't think of market more prone to false breakouts, whipsaws, head fakes and just plain old untradable conditions. I simply don't have the time to spend watching, analysing and trading the markets. That doesn't mean I don't want to work hard on trading, it just means I don't want to trade manually.

In his excellent book Trading in the Zone, Mark Douglas reduces trading to something along the lines of finding your edge in the markets and executing it regularly, relentlessly and without hesitation. That can be a challenge for anyone to do manually. We are all human and our human needs, mental, physical and psychological all stand in the way of proper trading.

Fortunately, Meta-Trader comes to our rescue here by automating the trading process. But you need to carefully follow a process that goes something like this:

1) Find a system that provides a tradable edge. Get to know the system including key characteristics such as entry and exit conditions, average 10 year returns, expected drawdown in both quantity and duration. Obviously, Asirikuy is a huge help here.

2) Run the system in demo mode for at least 3 months and monitor its performance.

3) Once you are satisfied the system is running properly, start it with real money and off you go!

Finally, keep your expectations reasonable. I consider a 10% annual return to be pretty good, but my target is 30-60%. I suspect my annual return for 2011 will be something closer to 20%. Check back around the first of the year for my 2011 wrap-up post.

And yes, be patient. Being a Doctor, Lawyer, Athlete or anything else worth doing takes time. Consider making a trading plan. My 5-year plan can be found in my blog post Forex Trading, my 5-year plan. I'm about to begin year 3 of my 5 year plan.

What's my long term objective? To be able to live off the forex markets as follows. If have have a million dollars under management, and I can make 20% return, that $200,000 per year, and yes, I can live comfortably on that much.

Take care and enjoy your weekend.

Saturday, December 10, 2011

Meta-Trader - Welcome Coatl H1

Welcome Back, Meta-Traders.

This week I started trading on my new FXDD Account which will be running Coatl H1 from Asirikuy. Here are a few pointers for new account start up from my experience:

- The LAST thing you want to do is let the expert go live on the first tick of the Sunday open. A lot of stuff goes on at the open and you want to make sure your experts are running properly and everything is kosher before live trading.

- Instead, load up all the experts, with all the preset files except uncheck the box to allow live trading. This way the experts will run, but they won't be able to trade.

- Next, monitor the systems for a few days. Check the lot size, starting balance and make sure the position size looks correct.

- Check for trades - the log files will fill up with stuff like this:

02:58:58 COATL EURJPY,H1: openBuyOrder: Trading is not allowed.
02:58:58 COATL EURJPY,H1: openBuyOrder: Trading is not allowed.
02:59:00 COATL EURUSD,H1: openBuyOrder: Trading is not allowed.
02:59:00 COATL EURJPY,H1: openBuyOrder: Trading is not allowed.
02:59:00 COATL EURJPY,H1: openBuyOrder: Trading is not allowed.
02:59:00 COATL USDCAD,H1: openBuyOrder: Trading is not allowed.
02:59:00 COATL USDCAD,H1: openBuyOrder: Trading is not allowed.
02:59:00 COATL EURJPY,H1: openBuyOrder: Trading is not allowed.
02:59:00 COATL EURJPY,H1: openBuyOrder: Trading is not allowed.
02:59:00 COATL EURUSD,H1: openBuyOrder: Trading is not allowed.
02:59:00 COATL EURUSD,H1: openBuyOrder: Trading is not allowed.

- Sanity check the trades if possible and compare against other instances.

- Once you are satisfied, you can slowly enable live trading for all 8 pairs being traded.

In my case, I started monitoring on Monday, and let it run most of the week with no live trading. Finally on Friday, I enabled trading on EUR/USD and USD/CAD and took a few trades. I'm going to enable the remaining instances in the coming week or so. Am I cherry-picking the opening trades? Maybe a little. As long as I let them run live after start up with no interference, I'm sticking to my plan.

If you don't know what COATL is about, check out the Prior blogs posts I did on the subject:

COATL Part 2

COATL Part 3

There's some pretty good stuff in there, and COATL is a mind-blowing achievement in itself, reducing a large decision space (2.14 X 10^16) into 3 different sets of parameters per currency pair via Genetic selection and optimization. And this is only one of about 8 possible Coatl portfolios.

Enjoy your weekend.

Saturday, December 3, 2011

Meta-Trader - Blog Updates

Welcome back, Meta-Traders.

The end of the calendar year brings an opportunity to reassess our routines on the lower time frames, daily, weekly, etc. I am convinced that success is the net result of all the little behaviors we do on a routine basis, without having to think about it. Along those lines, I am evaluating my weekly blogging routine.

Every Friday night and Saturday morning, I spend between 2 and 3 hours reviewing the week's news events, and my equity and forex trading. For the most part, it is fun and I enjoy it. But is it the best use of my time?

As it turns out, I'm not that great an equity trader, and my performance is highly correlated with the S&P 500. So does blogging about my equity trading provide any benefit to you, my loyal blog readers? I believe the answer is no. It also can have a negative affect on my own trading because I have to concern myself with whether what I'm saying makes me look smart or dumb, since I'm laying it out there for everyone to see.

On top of that, the weekly up and down, thrill of victory, and agony of defeat takes its toll. After blogging about my Zulutrade experiences for a year, and then this blog for coming up on 2 years straight - without missing a week - I'm ready for a break.

Yes - I am still going to blog. Yes - I will talk about automated forex trading and the equity markets. Yes - I'm still going to post my weekly accounts performance on the right. No - I'm not going to talk about my own equity trading on a per-trade basis. But I will keep an eye on the markets and their performance, particularly as it relates to Forex Trading.

Instead, here's what I'm going to focus on:
  • Original research in Forex Trading including hints, tips, etc.
  • Review of Trading Resources, Books, web sites, anything I find helpful
  • Anything else want to talk about that is vaguely on topic
So for this week's tip, here is what I have:

For those of you trading Asirikuy systems, pay particular attention to the Starting Balance value which appears inside the Experts window. The starting balance is stored in a file underneath the Experts\Files folder in your platform and is named according to the Account Number and Instance ID for that account. The balances can be wrong if you just made a deposit or withdrawal from your account and that could result incorrect lot sizing calculations.

If the balance is incorrect, you have 3 options:
  • Backup the files, then delete them and let them get re-created or
  • Edit the files to adjust the starting value. Leave the other number alone to keep the same balance reset date or
  • Set the UseGlobalBalance properly in your experts to True
One more thing, I'm taking the last 2 weeks of December off from my regular job, and i'm looking forward to some good research and blogging time.

So check back for that and have a great weekend all.