Showing posts with label robots. Show all posts
Showing posts with label robots. Show all posts

Saturday, October 13, 2012

Robot Thoughts

It's getting easier to look at a chart and figure out what to do. For example, recently I've been using bollinger bands on the D1 and trading infrequently when something presents itself.

It's more difficult to turn this intuition into an algorithm and quantify it. I suppose I need to come up with clever ways to localize a local bottoming or topping event and then characterize the shape of it.

What I am relatively good at is finding moments of extreme extension. Unless a major new trend is about to occur these can indicate reasonable entry points. For example, if the price is getting "far" away from a moving average and price action is respecting a boundary or throwing a good candlestick event then a robot can take action based on well defined situation.

There are also "warnings" available. If the price is moving very fast then what is considered a good entry point may be a lot riskier. This type of thing can be examined across multiple time frames to detect a larger scale event while trading on lower time periods.

The latest thought and robot experiment is to collect these little nuggets of interpretation. Accumulate the "value" of a list of reasons that it looks like a good time to trade and compare to the "value" of those reasons that a trade should not be entered.

To illustrate, let's assume our robot is "thinking" about entering a long trade on the USDJPY pair:

  • Bid price is 8 pips below the m15 moving average (+ 0.08)
  • Bid price is touching the lower h1 bollinger band (+ 0.10)
  • Bid price is within one pip of middle h4 bollinger band (+ 0.05)
At the same time we have some hazards:
  • The h1 bollinger band was recently pinched
  • The previous m15 candle dropped 25 pips
Well, never mind then, a nefarious "something" is happening that the robot should have the sense to realize it doesn't understand. Wait for a clearer situation.

Perhaps many robots would be better than people expected if they were able to look for more reasons not to enter a trade?

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.

Thursday, February 18, 2010

AUDJPY: Profit Is My Density

No, that's not a typo. It's a rip-off of a line from the Back To The Future movie. Anyway, this post is another in the series of theoretical considerations with respect to various robot building strategies.

In this scenario let's consider fixing our maximum total position size across a specific price range. For example, perhaps we are willing to purchase 10000 units per 1000 pips (remember, I'm generally talking about small account sizes). For Oanda traders this will run you up to about $175.00 in margin.

If you want to limit your overall positions to 10% of your account capital then you'll have to ante up $1750.00 to play in that 1000 pip range. Obviously, a large account value will either give you a larger playing field or a higher density of positions if you don't expand the playing field.

Are you still with me?

I know, at this point things are pretty boring. In fact, we're looking at a simple grid that we can play every time price passes through our space. However, this gets a bit spicier if we can find a way to optimize the open and close activities.

For example, what if we can compress our position openings towards the low end of a short term movement? Similarly, what if we can compress our position closings towards the higher end of price movements within our price space?

If you have good ideas for these processes, then you are set!

My thought is to adjust the probability of closing profitable positions based on the amount of profit a position embodies. For example, perhaps a position with a 10 pip profit has a 1% chance of being closed while a 20 pip profit has a 5% chance of being closed -- per bar. What would this do to the expected profit per position? Are some probability formulas able to provide much better returns?

Remember, we're talking about trading a maximum density of positions while prices move through our trading space. We know our total position, our total risk, and simply want to allow our winners to run as much as we can based on historical price movement patterns. Basically, we know that prices range for a while and then take off up or down. It's the multi-day upward movement that we want to catch... letting go of positions slowly during smaller moves until we can eventually latch onto a bigger move.

I'm probably about 85% into building a new robot based on this concept. I like the measured aspect of this on the risk side. I like the less definable profitability expectation -- it's beyond my math skills at any rate -- which is suggestive of an ability to preferentially capture larger profits. I also like that it should continue to eek out smaller profits if the price decides to languish in a smaller range for some period of time.

Maybe I'll be able to fire this up on Monday.

Friday, November 13, 2009

Trading Week Recap

I've been leery of letting BREAD (my primary trading robot) trade too much. I suspect prior tweaks have it taking too much risk. As such I kept it on a short leash and it only earned 0.9% for the week. Perhaps I'll have time to make some adjustments over the weekend.

On the discretionary front I was back down to a more reasonable 13% this week. Last week's 34% was probably some type of market movement vs trading style confluence. These thing happen.

In other news I have a new Bollinger Band based robot in the works. An early version of it was trading this week -- earning almost %1 as well. More trials and adjustments to look forward to!

UPDATE: No time to do anything Forex related this weekend.

Wednesday, October 21, 2009

Forex Robot Wars: BREAD vs ARTFAB

Two titans of the forex robot trading industry are squaring off in the search for higher profits.

In the green corner we have BREAD (Basic Robot Earning All Day) with consistent earnings of approximately 1.2% per day. In the other green corner we have the relatively new ARTFAB (A Rising Tide Floats All Boats) with very promising early results. Already today ARTFAB has locked in over 3.0% returns.

Wait, before you change the channel, neither of these robots is for sale and I do not want to manage your money. Relax, it's safe here.

In a macro sense BREAD and ARTFAB work using very different concepts. BREAD attempts to time the market and move money in and out during cyclical movements. This allows a small amount of risk to be taken, hopefully profited from, and then put back to work during another apparent down cycle.

ARTFAB, on the other hand, doesn't care about cycles when opening positions. It accumulates small positions and releases them when larger price moves have made them significantly profitable. However, cycles are examined with respect to determining when it may be a good time to close a position.

Both of these strategies appear to be working reasonably well. I'm hoping that ARTFAB will prove to consistently earn more than BREAD, such that I am enticed to move capital from one robot sub-account to the other. However, I have to keep in mind that BREAD functions best during a consolidation while ARTFAB's best earnings occur during a market move.

Of course, as I trade the AUDJPY currency pair almost exclusively both of these robots are trading it. As I have mentioned from time to time my trading account is with Oanda (which let's me scale trade sizes down to the unit level) and I'm using the FxSpyder platform to create and run robots. I prefer Oanda's platform for discretionary trading.

Wednesday, October 14, 2009

Recent Forex Results

I've had some success analyzing the AUDJPY over the last few days. In particular, whether by luck or otherwise I managed to spot some channels, one of them an apparent bull flag, a wedge leading to 82.00 and then predicting a breakthrough beyond that level.

It's very rewarding to make an observation and then have results conform to your expectations.

Anyway, I'm still letting my robot do my trading for me. It's earning north of 1% per day and I continue to make minor tweaks in an attempt to push the appreciation rate closer to 2% if I can.

Recent tweaks involve looking at various stochastic values in order to adjust position entry scale to some degree. Obviously, as the robot only opens long positions, the idea is to open less positions during periods of strength and more positions during periods of weakness.

It's never as simple as it sounds.

For more radical tweaks or outright departures from the main trading robot I'll strike out with a small amount of capital in a new account. I have one of these experimental robots running right now. It's very heavily tweaked.

I've got another radical, but simple, idea in the wings. It will have to wait until next weekend so that I'll have time to implement it.