What is a trading system?
For some traders, building a trading system means that they focus on finding the best indicators they could get their hands on or the one trading setup that is backtested to work 99% of the time. All I can say is, to each his own.
For me, the keyword of a trading system lies not with trading, but with system. Remember, it is a system. First of all, it is a system for trading. Not a system to trade. What do I mean by that?
Consider this saying, “traders don’t go broke by missing opportunities, they go broke by taking too many.” A trading system needs to be selective. It needs prudent risk management.
Secondly, you need to generate your own market view to trade. Rather it be technical, fundamental, sentimental, or just following some joe, you trade based on your view. Trading is a test of your market hypothesis using money. If you think the market will rise, you buy. If you think the market will fall, you short.
Lastly, a trading system needs to execute trades. Otherwise you’d be an anlayst. It needs to time entries and exits. Again, this could be as simple as on a whim or as complicated as some n-th order algorithm.
Thus we have the three pillars of a trading system.
- Risk Management
- Market Analysis
- Trade Execution
What’s more, if we combine some of these pillars we get some well known concepts. For example, market analysis + trade execution = trading signals, wherein you derive signals based on market conditions to execute trades. Or risk management + trade execution = position management, wherein you manage your holdings by manipulating your trades based on your risk profile.
All these relationships and composition of a trading system can be summarized with a Venn diagram. So, this is my view of a trading system:

Trading system Venn diagram
Why winning automated contest strategies don’t work in real trading
I despise sellers of trading robots making misleading promises like “doubling your money every month”. They are nothing more than snake oil salesmen exploiting on the greed and ignorance of others. Yet I am finding myself in a similar situation lately.
Ever since my interview at Dukascopy about my JForex automated trading contest win, I seem to have established a persona for being able to generate 45%+ return per month using my strategy. Despite my constant reiteration that this is merely a lucky result in a risk-free game, I am still getting inquiries from people interested in following my trading signals.
In another attempt to rein in expectations, consider this chart of my contest demo account balance for this month.
As you can see, my strategy doubled the account within days. However, it also lost half of its paper value plus some more soon afterward. As it stands now, my September strategy will not be in the top 10 for this month.
If I haven’t mentioned this embarassing negative return, you wouldn’t have noticed it, would you? That’s the thing with trading contest and those snake oil trading robots, we hear a lot about them when somebody win. But what happens to those same people when they aren’t winning or the countless other unfortunate followers lost money?
This reminds me of the lottery system. Our perception of the probability of winning the lottery is drastically distorted because we hear about the winnings so much while neglecting the fact that there are millions of losers out there.
The fact is, most of the seemingly impressive trading robots out there will not last for the long term. The only reason that I have won three times out of the five months is that I change my strategy’s parameters in expectation of the future month’s market condition. That expection is based on my own market analysis from my real trading. It isn’t something that can be readily quantified yet.
The way I see it, the only way in which others can exploit my success is to buy my real secret trading system, which is, perhaps unfortunately, my brain.
read moreNumber one with 40+ percent return in a month! So am I rich yet? Not really
I have won first place in the August Dukascopy JForex contest! My automated strategy returned over 45% in the month of August. With that honour comes a $5,000 grand prize in real greenbacks.
The setup that I used is a minor updated version of the one I used last month. I continue to adapt my system to expect market conditions of the month ahead. Sometimes I’m right, sometimes I’m wrong.
This contest is turning out to be more than a nerdy pass time for me as I have finished in the top 10 three times already since it started in April. However, I must reiterate the fact that this is not real trading. It’s just a paper trading contest with no real money risked on my part. If I’m really that good at trading to make 45% of return a month, I wouldn’t be writing this post at lunch in my cubicle at this moment.
So yes, back to reality as I continue my engineering work while improving my own trading and developing my quantitative trading system in my spare time. As my blog’s tagline reads, this is an engineer’s training to trade for a living.
read moreJForex Example: Automatic position sizing
Proper position sizing is an integral part of risk management. It can be one of the easiest thing to do too. For example, I typically size my trading position based on the following factors:
- Amount of capital willing to put at risk.
- Stop price level.
- Volatility of the instrument.
The following JForex code calculates a lot size based on these three factors. It is part of my Dukascopy JForex July strategy (complete source code to the strategy is available via that link).
private double getLot(Instrument instrument) throws JFException
{
double riskAmt;
double lotSize = 0;
riskAmt = this.acctEquity * (this.riskPct / 100d); // CCYUSD only
lotSize = riskAmt / (this.atr[instrument.ordinal()] * this.atrFactor);
lotSize /= 1000000d; // in millions
return roundLot(lotSize);
}
Referring to line 237, riskAmt is the amount of capital to put at risk for a trade (#1). Line 238 calculates lotSize, which is the position size that we want. The denominator in that division is the distance of the stop in pips. The strategy uses a multiple of ATR to set the stop loss. Nothing fancy here.
Lines 240–241 are to set the lotSize value according to the JForex API specification. In which the lot amount is in millions and in steps of a thousand units, or 0.001 step size.
As I’ve noted in the code, the caveat to this implementation is that the secondary currency of the instrument and your account currency needs to be in U.S. dollar. However, it’s just a matter of conversion to extend this method for other currencies.
Update: I expanded on this functionality in the JFUtil open source project.
read more


Recent Comments