Showing posts with label explained. Show all posts
Showing posts with label explained. Show all posts

Monday, October 5, 2009

Robot Strategy / Development

Without getting into detailed specifics I thought I'd try to answer a recent question about the strategies I'm trying with my various robots.

First, a bit of background in case this is the first post you see on this blog:

  • I design software and systems for a living
  • I've been trading for years -- learning through the heart of the downturn.
With that out of the way I'd suggest looking at one of my posts about microtrading.

You may also want to consider the fact that the Australian economy seems to be doing very well with respect to the rest of the world. I've been pointing that out on my blog from time to time. Also, if you follow AUDJPY as I do, you may notice that the RBA just hiked interest rates by 25 basis points. This bears out a previous post about the long term carry trade prognosis dated September 2008.

Anyway, what this all means is that I'm happy to open long positions in AUDJPY, to some pre-defined level of risk, and then wait for this currency pair to give me some profits. To get down to brass tacks, the AUDJPY trading robot looks for what appears to be decent entry points, perhaps via stochastics and/or moving average crossovers, and then opens up micro-positions.

Sure, often the robot is wrong for some period of time. Who cares? With confidence that the AUDJPY will eventually rebound, and/or pay decent carry trade rates, it doesn't hurt to wait. Besides, when the robot is wrong, trades entered at even lower levels can often be closed for a profit, repeatedly, prior to a later price rise allowing the short-term carry trade to be closed for a profit.

In case you are thinking this sounds like throwing darts here are a few of the strategic points that guide this strategy:
  • The fundamentals over the next period of years points to a rising AUDJPY.
  • A future period of panic is unlikely to exceed the unwind that occurred during the recent financial crisis.
  • A rising AUDJPY will eventually allow any position to be exited profitably during a new high.
  • Using microtrades allows frequent trading within precise levels of accumulated risk.
  • Adding logic to enter positions at what will often be an opportune time greatly improves the odds of taking profit from a position quickly.
Another robot, currently experimental, trades the EURCHF. The idea here is that this currency pair is relatively stable compared to some others. Here I'm basically trying to play a mathematical game. If one were to open a very small long or short position every few moments the price would eventually make at least one trade direction profitable.

The reason this is interesting is that you can define the rate of return you want. Trade N positions at size S per hour at P pips profit and you will earn $D. Of course, it isn't so simple, but that's where the challenge lies. How do you keep from accumulating all your long positions at a recent top and all your short positions at a recent bottom? How do you keep from accumulating positions during a lull in price movement? How can you goose profits during active periods to make up for price movement lulls?

This thing is a work in progress, is not significantly capitalized, and probably is a pure dart throwing exercise. However, it does keep me busy. This is important. If I don't keep busy I'll worry too much about what's happening in my AUDJPY sub-account and either make discretionary trades or tinker with something that is already working well enough.

Anyway, all strategies face the same basic issues. These include:
  • Prices will eventually move up and down in varying amounts.
  • Accumulation of positions incurs increasing levels of risk.
  • Avoidance of risk decreases maximum theoretical gains.
  • Carry trades have long term pressure supporting the carry trade.
  • Carry trade pairs have periodic unwinds.
  • Long term economic fundamentals are plainly visible to all but very often misunderstood.
Traditional robot development is based on the same concepts as discretionary trading. Find a high probability entry point, based on risk versus reward, set an appropriate stop-loss, and then wait to see the result.

In a nutshell -- my current robot strategy is to look for long term predictability and then try to take advantage of that predictability as often as possible using small individual units of risk.

A final word of advice. If I'm wrong about the AUDJPY, and it doesn't have a long term rising trajectory, then I'll have an unproductive robot sitting on some carry trades. Similarly, if you decide to take advantage of a longer term trend, make sure you have a solid basis for your predictions.

Saturday, April 18, 2009

EURUSD: Weekend Analysis

I don't generally trade the EURUSD but since it's the weekend I seem to have some extra time on my hands.

Here are a series of charts, in varying timeframes, that I'd use to get a general feel for this currency pair.

First, let's look at the 1D chart to see what's happened over the long term. I've compressed the chart a fair amount in order to get it to fit into a single snapshot -- you should be able to click to expand the image:

EURUSD 1hr Jul 08 to Apr 09
First, notice that over this period there has been an apparent double bottom. In fact, I've drawn a trend line to help identify this. As well, the currency pair has not yet broken above a resistance line drawn from the middle of July until now. In the big picture I'd expect the price to bounce around between these lines until a major news event or until the lines have converged.

Frankly, I'm not sure what will happen to the Eurozone or North America with respect to economic growth and interest rates, so I refuse to try to call which direction a long term breakout will go. However, that doesn't mean you can't speculate on either or both directions.

Moving to the 3HR, below, it looks like we might be able to fall a bit, but more importantly, we've broken a recent support point:

EURUSD 3hr
Notice the horizontal yellow support line that has been breached? If I were going to put money into this market I'd be thinking that we've got some room to drop. Don't get me wrong, it certainly doesn't have to, but often a support or resistance breach is a prelude to further movement in that direction.

On the 1HR chart, I see something that looks like a setup to me. See how the price appears unwilling to break the lower red support line? If I were going to play EURUSD I might wait to see if the currency makes it's way back to upper resistance line and then short the pair:


It's easy to call shots on the weekend and obviously when the markets open on Sunday this could all be trash due to news of some type. However, until things get shifted in some major way I'd either try to counter-trend a long position back upwards or simply wait for the short setup that seems suggested after a move back up.

Finally, this is not advice, and I could very well be completely out to lunch. However, this is my take on the situation. You should simply consider this one interpretation. Obvious weak points, from other points of view, are previous highs and lows as resistance levels, Fibonacci points, and so on.

Thursday, April 16, 2009

AUDJPY: Slow Decline

I'm sitting here watching the slow, achingly slow, decline in the AUDJPY.

Based on RSI and stochastic evidence, not shown on the image below, it's very possible that we'll get an upturn soon.

Anyway, this image shows you that we are continuing to approach what I've called a containment field. It represents a possible consolidation zone while the market tries to figure out whether to ultimately head north or south.

Collision Alert!
Obviously, I'm bullish on the AUDJPY so I expect this to bounce. A lot of other people, on Twitter or elsewhere, seem to be bearish.

... continuing ...

If we do get a solid bounce, you'll notice that we'll have a double bottom in the right side of a W shape. I'd generally expect this to be bullish, but we have to figure that we'll be going into the Asian session before long. One possibility is a trouncing of the Yen while another is an increase in risk aversion -- generally bad for carry trades.

Monday, December 29, 2008

Extraction Strategies

Extraction strategies? What the heck is that?

Underwater Psychology
If you are like anyone else you've found yourself in a trade that is going against you from time to time. You start to imagine reasons why the price could continue to move against you.

For example, this morning I was underwater in a position due to the spike in AUDJPY. The price of oil was rising due to the conflict in Gaza, apparently. At the same time, due to the recent break of a long term resistance line I'd expect a long term upward trend. Oh, not to mention that in thin markets I'm unsure how prices will react to these issues.

On my side was the fact that the 5m, 15m, 1hr and 3hr were all pinned at the top of their respective stochastic indicators.

First, keep your cool. If you are entering with reasonably sized positions you shouldn't be facing an emergency even if you expect the market is in a long term trend against you. If you aren't in a panic then look for the ability to work your way back out of your trades...

All At Once
This strategy is fairly ballsy, but when it works it feels really good. Look for indications that the upward spike is coming to an end. Perhaps a double top, long term indecision, stalling at a resistance level, or some other good probability situation. At this point you can acquire another position. You may find this happens more than once before you get an eventual correction. Each time you dip your toe in draw a new horizontal trend line at your current break even point. Pop out when you have a small profit and get your bearings.

Salami Method
While this strategy is less risky, it can be easier to perform once the market establishes a new consolidation zone. As you approach a high in what seems to be the new consolidation zone, acquire another position. As you eek out a bit of profit close your profitable entry, protecting that profit from a market reversal, and then close off a small portion of your losing trades. Over time you should be able to use many small profits to reduce open positions and square your account.

Who Gets Underwater?
Look, though all the get-rich-quick kiddies in the online forums are trying to scalp their way to riches, this is not how everyone trades. These people use positions that are quite large with respect to their NAV and they are not able to maintain positions during periods of loss. With small trades, patience, and an ability to know whether or not it's time to throw in the towel you can survive being underwater quite handily.

The Big Picture
I like to think of the markets being "rational" or "irrational". When the markets are irrational, they are not adhering to your technical analysis. Whether fundamentals, news, or other issues are taking precedence does not matter. What matters is that you look for periods of rationality to make your trades. If the markets become irrational while you are in the pool, don't panic. Unless things are truly horrific, try to wait until the 1hr or 3hr stochastic indicators have gone your way.

This is how I was able to get out of some underwater trades just this morning. With all the stochastics pinned against me, I opened a position at an apparent top. The AUDJPY then dropped like a rock, below my new break even point, and I closed my positions for a small profit.

I don't care if I missed some upside on a continued drop. I believe the market will continue to move upward in the long term -- so I don't want to hold on to short positions for long term gain.

Hmm, another thought. If you are a beginner and aren't able to generate a high percentage of winning trades, these strategies probably are not for you. You have to be able to create winners or else entering more positions will simply sink you further into distress.

Wednesday, October 22, 2008

Betting Against The AUDJPY

Well, with commodity prices spiraling down the toilet, it's a good time to be short of the AUDJPY.

Look, put an SMA 20 on your AUDJPY chart. Load up the 1HR or 3HR chart. What direction is the simple moving average going?

That's the trend.

So, if the trend is your friend, what's the best direction to play?

You guessed it in one... down!

If you know how to draw a resistance line, or to put something like a CCI, Williams %R or even possibly a stochastic or RSI indicator then you should be able to pick relative high points to pal around with your friend the trend.

Heck, even the SMA or a set of Bollinger Bands will probably do the job.

Really, it can be that simple, at least while you have a clear trend.

Get your trades on!

Sunday, August 31, 2008

Forex: What Is A Pip?

If you are a beginning forex trader you might be wondering what exactly a pip is. Everyone throws around the lingo but hardly anyone ever stops to give a good explanation that makes things clear for the aspiring trader.

Generally, a pip is explained as the least significant digit of a price quote.

So, if the US Dollar (USD) trades at 120.19 JPY (Japanese Yen) then each unit of change, such as a an increase increase in value of the USD to 120.20 JPY, involves a one pip change in price.

I'm going to step out on a limb and say that a PIP is a price increment point. However, the more confusing official terminology is apparently percentage in point. Which is less confusing?

Either way, it's a single point of change in the quote price between two currencies. Now, while this is very simple, it can be confusing at first when you find out that different currency pairs are quoted to a varying number of digits.

By way of example, here are some relatively current price quotes for various currency pairs:

    AUD/JPY   093.29
    AUD/USD   0.8574
    EUR/USD   1.4668
    EUR/JPY   159.62
    GBP/JPY   198.05
    GBP/USD   1.8204
    NZD/USD   0.7001
    USD/CAD   1.0635
    USD/JPY   108.75
Unfortunately, it is possible that your trading platform will display partial pips! If so, I'd recommend turning that extra level of detail off when you are just getting started. Being clear on currency price and profit/loss calculations will be much more important to you as a beginner than worrying about price moves in the partial pip range.

Why such a feature is enabled by default is something that mystifies me. I guess people in the forex industry soon forget what it is like to be at the beginning of your trading experience -- things can be confusing at first.

Monday, December 31, 2007

Forex Speculation?

Have you ever wondered what is meant by the term speculation?

It seems to be rather loosely defined.

Speculation is the process of selecting investments with high risk in the hopes of making a profit due to price changes. Apparently, if you use that which you purchase, such as consumption of a commodity, or if you purchased something in order to profit from dividends or interest rates, then it isn't speculation.

So, in summary, if you buy a financial instrument in the hopes that you will profit from a change in price, you are speculating. Obviously, forex trading is a form of speculation.

According to Wikipedia, speculators provide a valuable service to markets by adding liquidity. This allows the market to operate with more efficiency and it allows lower spreads between buy and sell prices. Or, in Forex terms, it allows a lower pip spread.

Are you interested in being a forex trader? Look around and read my blog. I write about my trading experiences as a Forex speculator so you can learn from my mistakes -- instead of making them yourself.

Friday, October 26, 2007

Forex Scalping Information

Okay, I've been trying to find information on forex scalping and the pickings are mightly slim indeed. In fact, the so-called information on the net is so bad I'm going to write up a small post of my own... because I'm sure if you found this page you are desperately looking for some real information.

What Is Scalping?
Quite simply, very short term trading.

Why Don't Brokers Like Scalping?
Well, some brokers don't like scalping because of how they are set up. If they are not able to execute your trades quickly or efficiently enough then they risk being the source of your profits.

Does Scalping Work?
I've seen some people claiming that it works great as well as others claiming that it is impossible to do profitably. The reality is that if you can predict the direction that an equity pair will move, either up or down, then you can hop into the market and grab a few pips when it happens.

How Easy Is It To Predict Equity Pair Price Changes?
Well, that's the million dollar question! I don't have any books to sell or anything, but a lot of people claim to have solutions for you. Personally, I think if they really had solutions that worked they wouldn't waste time telling you about it, they'd be busy trading. However, in an effort to be informative, when you spend enough time watching a market (which is quite boring) you'll get a feel for it's current state and how it is moving. Often, until conditions change, you can be fairly accurate with your predictions.

Can Anyone Do This?
If you find a market maker that doesn't mind scalping, you can try. However, you must know how to place stop and limit orders with their trading platform. In particular, it would be very nice if you were able to have someting known as a trailing stop. As well you will want to understand the concept of leverage as it applies to a forex account. Basically, I'd suggest throwing $100 at a starter account and playing around, carefully, until you've made enough bad decisions to learn how things work. After that, you should have the tools needed to try out various strategies.

How Much Effort Is It?
Scalping is very time consuming. You have to spend a lot of time watching the markets, to the point that it would be difficult to do well if you had an existing full time job. Also, scalping is very demanding from a psychological point of view, as you will have large amounts of your capital ready to put into play, but you may have to wait hours before you spot a good entry point. Then, upon entry, you might find you are back out with a small loss in no time. Alternately, you might get a small profit, take it, and then watch the market skyrocket after your exit. The shorter your trading is the more attention it will take and the more nerve wracking it will be.

Are You Scalping?
I'm thinking about it. I've been opening up a grid strategy to catch swing trades, but I have noticed that using half of the scalping mentality to accumulate positions in trends may be able to have a significant positive impact on my results. I guess I'll end up letting you know how things work out.