Showing posts with label theory. Show all posts
Showing posts with label theory. Show all posts

Sunday, August 15, 2010

Return Of The Robots

Once again I am purely a robot trader.

Part of the reason is that my day job does not allow me to use company Internet or computing resources for the purpose of earning revenue. This is a sensible restriction even if my use would only have been to let me view charts and enter trades.

Now I use the Internet at work purely to watch how my robot is doing. I don't enter trades, I can't access or change the robot's behavior during the day, so really, I'm watching buy and sell events for entertainment purposes. As long as it isn't chewing up bandwidth or interfering with my productivity that is alright.

The latest incarnation of live robot is a bi-directional trader. The theory is that at any point in time prices are going to move in some direction for a while and then in the other direction. This back and forth movement will continue endlessly.

Conceptually, break the bi-direction robot into two unidirectional robots.

With that done, admittedly, it is possible that one of my robots will run out of ability to trade as the price moves a long way in the wrong direction. However, my other robot will be earning a profit during this time. Additionally, I am certainly able to manually reallocate resources between these two robots if and when conditions support the reversal of a large movement.

With the volatility of last week this reasonably cautious robot did fairly well. However, this robot isn't suitable for professional trading as it is allowed to hang onto negative positions for a long period of time.

Perhaps the most important aspect of this robot is the sound it makes whenever it closes a profitable position. Hearing the ka-ching sound whenever there is price movement up or down is very rewarding... as it happens so often.

Tuesday, October 6, 2009

US Economy Heads Up

If you are wondering what is going on with the US economy, this puzzle piece from CNBC will fit in very nicely.

What this is saying is that there probably is not a small business collapse in the works due to credit issues. Smaller businesses will simply wait until they see consumer spending before they bother to access credit.

Personally, I am going to suggest that old habits die hard. For all those that did not suffer unemployment, which will be the majority of consumers, the lure of credit and consumption will be waiting for them once confidence returns. As well, they will have fattened their bank accounts to the point that they won't know how to resist putting some of it to use.

While we do perhaps have a lot of reasons to fear gloom and doom, we also have a consumer tinderbox waiting for a spark. I don't know which one will win out nor do I know how long it will do so. For example, I don't know if the tinderbox can be lit before housing prices start to rise. What is the ratio of renters vs owners?

I do know that the nuggets of information regarding real people, real habits, and their likely actions are few and far between. Too much of the material we read (on CNBC) is very biased by political viewpoints... and you need to find a way to see past that barrier to the good information the partisan baloney conceals.

UPDATE: Wednesday 7-Oct-2009

As a counterpoint, here is another article talking about problems caused by the ongoing lack of various debt-securitization markets.However, I will point out that the title seems a bit broad for the issue at hand. It seems that the article is pointing to the idea of a systemic inability for large lenders to resell their lending in order to enable more lending.

Perhaps the fact that these institutions, and their rating agency cohorts, have just burned half the planet with their prior recklessness is one reason that purchasers of these products are a bit gun shy?

Friday, September 25, 2009

Friday Market Analysis

I am following CNBC regularly (via their web site) these days. I see many of the pundits advocating panic and doom. I suspect they all want to be able to claim they were right when we finally do experience some type of pullback.

However, these braying naysayers of doom really don't have much of import to say. All they really do is act as large forces on the emotions of market players. Everyone is appropriately skittish due to the massive bear movements over the last year or more. It's only natural.

All of these fools who only imagine one direction for the markets will be right from time to time. What they say is not important. What's important is to understand the volatility, or level of price fluctuation, and the amount of risk that this implies when you are trading.

For example, the odd negative number here and there doesn't mean all that much. This doesn't mean the market won't throw a tantrum, but it does mean that there could be a spate of good numbers in another week or two. These trends have variations in them as well. Perhaps because the media jumps on whichever bandwagon has the most passengers the market sentiment gets rapidly overblown.

So, sure, we could see some type of sell-off coming soon. So what? So, don't risk all your money on the notion that the markets, carry trades, risk appetite, GDP growth, corporate profits or whatever will only go up. In fact, cushion yourself by assuming a mini-panic could be right around the corner. Seriously, hasn't everyone been hiding under their sheets due solely to the fact that we're in September?

What am I going to do? I'm going to move more capital into my account. Any serious downtown represents a good opportunity to scale in. So, let it rain, I'm going to wait until all the overextended or panicked fools get forced out, then I'm going to take a peck at an opportunity here and there. Again, just make sure to nibble your way in at appropriate times.

Remember, fear and downward movement provides opportunity, but only if you don't assume you can predict the bottom and thus assume too much risk. When you aren't being pushed into making decisions by market movements you can make much better decisions.

So, early next week, fresh capital into my account. I can apportion this to my robot trading army (I know, but it sounds more fun this way) in small chunks as we come up to significant resistance levels. Unless the world collapses, and if it does my trading account will be the least of my worries, there will eventually be another upturn.

As a side note, I'm planning to make opposing robots this weekend. They will trade long and short positions in different sub-accounts. I expect that one of the two will be earning during up or down movements. I expect both of them will earn during periods that the market is moving sideways. You can't see it but I'm rubbing my hands together in a greedy manner -- think Mr Burns.

Good luck out there.

Wednesday, May 6, 2009

Theory: Trading With Little To No Margin

As I often do, especially when the markets are excruciatingly slow in determining when to make the next significant move, I've been thinking about Forex.

Take a mental walk with me...

The DOW falls from 10,000 to 5,0000 and loses 50% of it's value. It returns from 5,000 to 10,000 and gains 100% of it's value.

Wait, think about that for a minute. In the normal world having the ability to gain double digit gains, per year, is considered excellent.

If you are confident that an upward cycle will eventually happen, in a suitable time frame of course, then movement is valuable. If you aren't trading on margin, and you don't have the associated risk, then you can afford to look at each dip in price as an opportunity.

While this may be applicable to the DOW, it is ever more applicable to the Forex markets. If you are trading with little or no margin it's simply a matter of scaling your entry and exit based on price moves. This is very similar to the gridding concept that I posted recently.

However, when the margin is gone the risk is gone. You choose the price range you expect and scale your entry and exit points within it. If you must, you leave some positions in place while you recapitalize to attack another range. In fact, perhaps you simply allocate a set number of dollars per thousand pip trading range. If the price falls into a lower range you simple ante up and play within a lower range -- while your higher range positions provide interest income.

However, keep in mind, it's possible that currency pairs adjust interest rate differential. This could erode or reverse the suitability of holding a pair over a long period of time.

MT4 EA: Average Position Based Trading

While I don't have any pictures to show, yet, I am working on an EA that trades AUDJPY based on the market price relative to the average price of positions held.

The first few passes at this type of system were pitiful. My testing starts from September of last year to now while only opening long positions. As you can imagine this is a difficult period of time for a long only system!

However, late last night I was able to complete a test that showed profits.

The strategy behind this EA is basically as follows:

  • If you've just seen a recent downward movement open an initial position.
  • If the price is high enough above or below your average order open price, open another.
  • If the current price is above your average price close your lowest and most profitable position.
  • Try not to open any position while in a downward movement regardless of the above rules.
Obviously, the last item mentioned is not simple, but it is the key to account survival. If you open too many positions and the market falls too far you will get a margin call.

As ever, I'm basically using the AUDJPY for this. I am interested in strategies that can accumulate a safe quantity of long positions such that they pay me to wait for the eventual upturn.

I'll provide updates once/if I'm able to get appropriate results.

... continuing ...

Here's a chart showing this:


Notice the wicked looking draw down during challenging periods of AUDJPY decline?

Friday, May 1, 2009

Theory: Gridding Microtrades

I've been thinking about grid based strategies designed to take advantage of volatility without incurring great risk.

The idea is that the strategy be followed using a carry trade pair in the event that you do inevitably end up holding some positions. You'll want a platform with a decent spread. Oanda often has about a 3.0 pip spread on the AUDJPY pair -- my current pair of choice.

So, let's start with these parameters:

  • Every 20 pips have a limit order with a take profit of 20 pips.
  • Each order is for 125 units (not lots).
What does this mean? It means that we will earn approximately a penny per pip of movement. It also means that a sustained downturn will accumulate positions at a very slow rate.

Note: I'll be throwing around numbers very loosely, if you want to consider this type of strategy seriously you'll want to account for spreads and other issues very accurately.

However, as I'm sure you can imagine, not all currency moves are for 23 pips or more. There are a lot of small moves that would be contained within a 20 pip range. There are a lot of moves that would rise and fall above the purchase price without being sold for a profit. This is missed opportunity.

You can easily calculate your risk... just assume a straight fall to some absolute low with a position acquired every N pips. Don't forget to account for the losses as purchases at higher levels will be suffering losses as well. How much capital do you need to sustain all of that?

What if you placed limit orders every ten pips and maintained a 20 point take profit stance? You'd double the theoretical maximum at risk and earn 2 cents per pip (over larger distances) if you kept the position sizes the same. It get's interesting when you decrease the size of the positions to reduce risk. Once you do that you can increase the density of your positions.

The interesting question is how much movement can you profit from as you increase position density, to catch smaller moves, given the spread on the pair you are trading? How many pips can you catch in a day without being in danger of accumulating more than you can handle in a downturn?

Practical risk reduction steps could be taken...
  • You could place limit orders above the current price to avoid buying positions on the way down.
  • You might also decide to trade only during periods that certain conditions are met.
  • You might stop trading if you accumulated a large net position
  • You should eventually make some profits which has the result of increasing your capital and adding to your total risk capacity.
This again gets interesting. If you assume you stop accumulating positions at a safe point you could easily recapitalize your account to start trading again within a lower range. While you trade with this new capital, within safe limits, you'll have a carry trade position which should have a reasonable average price in the bigger picture measured in months and years.

Thursday, October 9, 2008

AUDJPY Technicals

I'm looking at my AUDJPY trend line.

We've seen some good movement, recovering from the recent meltdown in short order... probably due to the coordinated rate changes.

While I like the move I think we're getting to the top of our current trading channel. How we handle the reversal, assuming there is soon to be one, will set the tone of the next couple of days.

If we bounce back up on or before the lower trend line it should mean good things. Next week, of course, may be a different story.

P.S. Can't figure out where the bottom trend line is? Buy a book or something.

Monday, September 1, 2008

Carry Trade Accumulation Strategy

As I haven't seen this forex tactic expressed anywhere else I thought I'd blog about it and share it with my small readership.

Are you familiar with trailing stops?

This is when you set a stop loss some number of points below the current price and then allow that stop loss to float when the price moves in a profitable direction.

Well, I'm not going to talk about stop losses, but the idea is similar. What I'm going to describe is a trailing limit order.

Let's say, for example, that you think the GBPJPY is starting to look like a good deal. Instead of jumping on and buying it you may want to set a limit purchase order above the current price. The odds are good, given recent history, that the price will drop further.

Bingo. You can then adjust your limit order and trail the market price by some appropriate level. Be warned that the price could spike, activating your purchase, and then continue dropping. In today's environment you can then save yourself the risk of acquiring a position until the price does show some type of strength.

I'm not aware of any forex trading platform implementing this so you'll have to execute a manual trailing limit order yourself.

Sunday, August 31, 2008

Carry Trading Thoughts

Today's post is basically a bit of mental exercise concerning accumulating carry trades. If you are looking for serious advice, this post probably isn't it.

Anyway, for the two or three people that do follow along, you know that I like carry trading. For today's exercise, let's consider the GBPJPY. Looking at the five year chart on Google finance we can see an absolute range of approximately 7000 pips. The GBPJPY price went from somewhere near 180.00 all the way up to 250.00 at it's high.

That's a lot of pips!

Looking closer, we can see that from the highs last summer we have retraced almost 5000 pips.

Now, I know that there is a lot of turmoil in US, UK and world markets, but I don't forsee the GBP being wiped out any time soon. I'd like to accumulate GBP but I don't want to simply buy it on the way down as I have no idea how far down the currency might travel before finally deciding to fight back.

Let's think. How can I take advantage of another future uptrend without risking a lot of capital before it happens? How can I take serious advantage of such a future uptrend if I don't currently have much capital myself? Obviously, I need to find a way to minimize my risk and take advantage of a future trend with house money.

What if I execute some type of sneaky manual gridding strategy. I'm going to design this so that I never have much actual capital at risk while not have to sit on the sidelines if things go my way. Curious? So am I, as I haven't worked through the details yet myself.

Since I trade with Oanda let's consider some very low capital trading. We'll create limit orders above the current market value. These can only be tripped if the market moves up. Given the current bid price of about 198.20 let's consider the following order list...

- buy 10 at 198.30
- buy 10 at 198.35
- buy 10 at 198.40
- buy 10 at 198.45
- buy 10 at 198.50
- buy 10 at 198.55
- buy 10 at 198.60
- buy 10 at 198.65
- buy 10 at 198.70
- buy 10 at 198.75

There, that's ten trades. We'll have a total of 100 units of GBPJPY if the pair moves up to 198.75 at some point. I know this isn't very impressive. I also know that the price is likely to drop too -- it never moves in a straight line. So how do we handle these issues?

First, let's realize that you'd have to have a tiny account to worry about any size of price move while holding onto a mere 100 or 200 units of currency. So, having this level of capital at risk is not a problem. Hey, don't laugh, we aren't done yet!

To keep our risk limited, let's set a stop loss on our lowest priced trades. We'll set it 11 pips above our purchase price and leave only 100 units of currency at risk at any point in time. At 11 pips we'll grab a penny per stop loss tripped potentially see 9 positions left underwater. Keep in mind that over time we could leave multiple sets of 9 positions underwater whenever the price rises for a while prior to the GBPJPY hitting what will become a regional low.

Thinking out loud some more, if we leave 10 underwater sets above us on the way down we'll be sitting on approximately 1000 units. Let's say they average 5000 pips underwater -- which leaves a LOT of room for continued deterioration. We'd be looking at a capital drawdown of less than 500 dollars. At the same time, this is a carry pair, so we would be earning some offsetting interest during this period of being underwater.

Okay, so I am probably looking at a fairly safe idea. I don't expect another 5000 pips of descent, but it's also possible that I can leave more than 1000 units underwater if prices start to whipsaw. I'm comfortable. Now, am I interested? Let's take a look at the behavior on the way up.

Here's an aggregate accumulation of positions during an uptrend...

198.30 - 199.25 ... 200 units
199.30 - 200.25 ... 200 units
200.30 - 201.25 ... 200 units
201.30 - 202.25 ... 200 units
202.30 - 203.25 ... 200 units

Hmm, this doesn't seem to be a large enough accumulation to really sink my teeth into an uptrend. Can I fix it? Maybe. What if we execute trades with larger and larger sizes? Is this somewhat reminiscent of a Martingale strategy?

buy 10 at 198.30
buy 11 at 198.35
buy 12 at 198.40
buy 13 at 198.45
buy 14 at 198.50
buy 15 at 198.55
buy 16 at 198.60
buy 17 at 198.65
buy 18 at 198.70
buy 19 at 198.75
buy 20 at 198.80
buy 22 at 198.85
buy 24 at 198.90
buy 26 at 198.95
buy 28 at 199.00
buy 30 at 199.05
buy 33 at 199.10
buy 36 at 199.15
buy 39 at 199.20
buy 42 at 199.25

Well, this certainly grows a lot faster. We would have 435 units open after about 100 pips of movement. This is going to increase our risk quite a bit. There is always a tradeoff. You simply cannot increase rewards without increasing risks. While I'm not going to do a lengthy detailed analysis of varying rates of growing trade sizes, you can certainly see that our larger riskier trades happen at higher and higher prices. That doesn't feel right.

Another way to look at this is that the probability of making a losing trade increases as the price rises. Eventually the price of the currency pair will hit a regional top and any trades made near that point must be losers. Let's look for a strategy that doesn't require increasing risk with increasing prices. I still want to make a future GBPJPY recovery work for me!

What if I'm willing to add additional funds to my account? I generally have no problem putting about 10% of my net asset value into active carry trades. It would take a tremendous move to cause a margin call if you only use a small amount at any point in time. With a $450 capital infusion I'd be willing to use $45 of margin. Let's see a grid based on getting this money into the market.

- buy 125 at 198.30
- buy 125 at 198.40
- buy 125 at 198.50
- buy 125 at 198.60
- buy 125 at 198.70
- buy 125 at 198.80
- buy 125 at 198.90
- buy 125 at 199.00
- buy 125 at 199.10
- buy 125 at 199.20

Okay, we get 1250 pips out of a 100 point move. If the market doesn't go up then our grid will adjust and move downward. If the grid is activated but then the market immediately drops we have sunk our cash infusion into a reasonable carry trade. Assuming another cash infusion in the following month we can continue to lay out upward grids above the current price.

By putting in fresh capital, and expecting further fresh capital, we can get comfortable pushing our capital into positions at a relatively rapid pace. What happens if the market starts to follow an overall upward trend? Following along from where the grid above left off we get...

- buy 125 at 199.30; place stop loss at 198.40 for our trade at 198.30
- buy 125 at 199.40; place stop loss at 198.50 for our trade at 198.40
- buy 125 at 199.50; place stop loss at 198.60 for our trade at 198.50

Okay, our overall risk isn't increasing. Each time we open a new trade we protect the capital behind the trade which is currently most profitable. We are accumulating more and more open positions without increasing trade size.

However, there is every possibility that it may takes months of capital infusions and a fairly sizable carry trade position before the market turns around to any degree. What if it takes years before the GBPJPY makes any attempt at serious recovery?

Anyway, as I said at the beginning, this is just a mental exercise. I don't think that very many people trade with a carry accumulation mindset. I suspect that many traders are looking at the swings in price and trying to get in on them... as they are huge in magnitude compared to shaving some interest from the market over larger time periods.

I've had some luck trading price movements myself... but I like the lure of building up some type of income stream over time.

Thursday, July 17, 2008

Wednesday Forex Gains: NAV +8.2%

Like the title said, today was a great day!

A short morning session yielded two or three percent. The rest of the day went very slowly, but I was able to wrestle pips out of the market again and again.

Basically, I'm watching charts very closely, looking for setups. I've got some work to do to improve my timing, but in general I seem to have a good collection of indicators that keep me from getting into trouble very often.

When a setup happens, I drop in a position. Generally, I'll switch from currency to currency, on the 1h, looking for things I am fairly confident will move in a way I can predict. Once I have those, I may check the 5m, looking for the same indications, as a means of entry timing.

What seems to happen is that sometimes I'll be right, and sometimes I'll be wrong. The positions that go well end up hitting take profits. At that point, because they are reasonably well chosen, the market will often reverse and give me an opportunity to exit from the positions that weren't previously winners.

Anyway, the real key, at least for me, is having a series of indicators that give you a very high probability of being able to make a prediction. Unfortunately, I'm not willing to get very precise and tell you my setup. Though people often say that it makes no difference how many people know something, it does. If everyone knows the same thing -- then some people will anticipate that thing and in doing so change the price dynamics.

Wednesday, December 26, 2007

AUDJPY With Bollinger Bands

Lately I've been trading the AUDJPY using only an EMA (exponential moving average) and SMA (simple moving average). The theory is that when the price is below these averages it will at some point return above it. This is generally true, even during a downturn, but especially so during an upturn.

I have been seeing some success with this, but it does have me hanging onto losers for some period of time, so that they again return. I continue to have trouble dumping a loser as soon as I recognize it as one... and it is probably something I should be working on.

In any case, I've added Bollinger Bands to my 5 minute chart. It seems to give an indication of when a price movement has reached the limit of movement with respect to recent volatility. While it is always important to realize that the past does not guarantee the future, it does give you an indication of timing with respect to entry and exit points.

Again, keep in mind that I am happy to accumulate carry positions in AUDJPY. This greatly colors my strategy and how I trade.

Wednesday, December 19, 2007

Theoretical Investment Strategy

I like to think about things, twist them around, and come up with theories.

It strikes me, that as long as a market continues to move up and down, such as the AUDJPY, that every time you take a position, you are guaranteed a profitable exit if you are able to wait long enough.

This leads to some interesting theoretical strategies if you are using a trading platform that doesn't penalize you in any way for executing micro-trades.

For example, if you take a small position with a predetermined take-profit setting, then you know that over time you will earn the return you've selected. So, in theory, you can drop one of these positions into the market every five minutes and determine your eventual average earnings per hour.

At the same time, as a carry position, you know you will be earning interest while you wait for the position to close out with a profit.

Additionally, perhaps the best time to embark on this strategy is after a significant unwinding in the carry market? However, keep in mind, that if you blithely throw your money into the market you will slowly end up with a large and vulnerable position during a long term down trend.

An alternative to help alleviate this concern is to buy positions at what you think might be a bottom. Then, if you are wrong, wait until another 100 pips or so have fallen by the wayside before trying again. This will let you avoid getting a large position on the way down. If you aren't wrong, execute a grid strategy, buying a new small stake for every N pip rise.

It seems "wrong" to buy on the way up, but this also limits your total position. You will be taking profit on the lower positions and accumulating new positions every N pips. With the downward and upward strategies outlined above you can calculate your total position and your total drawdown for potential market movements.

As a bonus, this type of strategy would be easy to implement using some type of automated trading platform.