Improving an automated system

adrianjm

Junior member
Messages
38
Likes
0
Hi All,

I have been trading an automated system for some time on the SP500. I have let it do its thing, not interfering with it for more than a year. I think its easy to break working systems, overthinking and trying to extract the maximum return. Presently making about 25% per year, but volatility of returns prevent me from throwing bigger money at it.

I use IB, mostly entering with market orders. I have started using their VWAP algo to enter and exit, but I am not 100% sure if it's producing better returns than just market on open orders.

Since I have not been across any developments in the last year of so in terms of trading techniques, I'm looking for some advice to help analyse my system and see if there are any glaring issues or improvements that I could make that either improve return or reduce volatility. Are there any recommended sites/people/techniques that anyone could recommend to help go over my trades and method and point out improvements?

Or is it worth marketing a successful strategy that is using only a fraction of potential volume to willing investors?

Some stats:

Return since 27/10/2014: 76%
PF: 1.46
Win%: 60%
No. Trades: 1450
ave trade length 5 days

thanks

Adrian
 
From reading your post it seems like you are lacking some confidence in your method? How volatile is your strategy? I find a good way to measure strategies is by looking at returns and drawdowns as a percentage of the risk you have taken.

For example, if I have a daytrading strategy where I did a backtest with $100 daily risk and my max expected drawdown (determined from backtesting) is $400 then I know I may need to re-evaluate my strategy if my drawdown nears 400% of my actual daily risk. By normalizing trades to a percentage of risk taken, it is easier to track performance.

It seems like you have not done backtesting on your strategy. Is this correct? This could help with gaining confidence in your strategy (or it could completely shatter your confidence in it). But with 3 years live trading on it, I would imagine you should have developed a bit of confidence in it...and 1,450 trades is a reasonable sample size to draw conclusions from. How did your system perform in the time period of July 2015 to July 2016? The S&P 500 had essentially 0% return in this timeframe.

I use tradestation to develop and backtest my automated strategies, but for you that would likely require learning easylanguage (not really that difficult especially since I presume you know a coding language) in addition to setting up an account on the platform. I think they do make a standalone - Multicharts - which can be used essentially the same as tradestation to develop and analyze, but I don't really know since I don't have it.

I would be willing to code the strategy up and put it through some fairly thorough backtesting and potentially further development, but I am certainly no expert on doing either of these. The obvious drawback of this would be that you would have someone else who knows the ins and outs of your strategy. I would agree with you though that often keeping the strategy in its simplest form is the best. I rarely find adding complexity to help strategies.
 
Hi All,

Some stats:

Return since 27/10/2014: 76%
PF: 1.46
Win%: 60%
No. Trades: 1450
ave trade length 5 days

thanks

Adrian


Based on your PF of approx 1.5 and approx 1500 trades over the period and 60% win rate.

You should of made approx 900 units in profitable trades and 600 units in losing trades.
(900/600 = 1.5 pf and 900+600=1500)

Therefore your net profit is 300 units (900-600) and you say your overall return is approx 75%,

and 75/300 = 0.25%

So you should have been risking 0.25% per trade to make 75% over the period (300x0.25% = 75%).

You shouldn't be having much in the way of volatility/drawdowns if you are only risking 0.25% per trade.

What was the biggest drawdown you had in the period?

I would say your area for possible improvement would be your small period of testing/live trading.
Although your sample size is over 1000 trades, it does not cover enough years. Therefore does not cover a variety of different market conditions.

So I would test the system going back all the way to 1997. 20 years. That is the year the S&P 500 futures began trading electronically with the ES. That will give a better idea of what the longer term stats are for your system. You could go even further back to the 80s and test with the pit traded contract as well. And that would also cover the period of the 87 crash. It takes little extra effort to test with extra data.
 
Last edited:
Hi Guys,

Thanks both for your responses. It is true - confidence is what I am missing, but its not due to a lack of backtesting. I use Amibroker, and I am reasonably familiar with it after many years of use.

The difficulty in posting images on this site prevents me from showing you my returns in time, so i'll just post them as embedded links:

Full results:

https://ibb.co/hZ9xkF

My returns between June 2015 and june 2016 are as follows:

https://ibb.co/eMoUza

As you can see, not great over this period. I did make some changes in Jan 2016, and it appears to be going great since then (~ trade 800 on the first graph).

If I go back to 2000, its still profitable (27% CAR), but the CAR/MDD really suck (0.67) with a 40% DD - not surprising given the conditions in the 2000 and 2008.

The difficulty is having a system which (just like the market), may go DD at any time, but continuing to invest a larger portion of ones lifetime earnings in any case. Perhaps I am too risk averse. Fortune favours the brave. If I look at history back to 2000, then I need to accept that whatever I put in, may go down 40% tomorrow, and I am not sure I can accept that with any bigger pot.

The system is such that most of the time I am either on the sidelines, or completely at account capacity. The above results are from a 24% exposure since most of the time there are no trades.

I think I remember Tharp talking about initial stake being a much smaller influence over long term results. Perhaps I just need to be patient and let compounding do its work. Looking at better entry points today, something has to be better that Market opens.
 
I haven't been able to look at this in much detail, but my initial thoughts are:

1. Your results over an overall flat market period look to be pretty good to me.

2. A 40% max DD during a time when the markets completely tanked is completely reasonable. Certainly more than anyone would want, but given what the market did (from my recollection ~55% drops a couple of times), 40% is an improvement.

3. You could try and be more selective with entries by adding additional filters. The most likely outcome will be a reduced DD but with a reduced gain.

4. With a system that is only in the market ~ 25% of the time, I would probably keep this one on autopilot for a while and try and develop another strategy that would take advantage of the capital you have available 75% of the time. You may come up with some ideas for your current system through developing another.

5. If you want to increase capital, the only way to do it (for me at least) is to do it incrementally rather than all at once. When you are at an uncomfortable level, leave it there for a while and when it becomes not uncomfortable, raise your risk another notch. Repeat.


I would imagine you already know several of the points above already though. Good luck!
 
adrianjm, have a look into equity curve trading. That may help you get a better overall equity curve and avoid massive drawdown.
Are you using intraday or daily data?
 
Just to say a 25% annual return is not to be sneered at - assuming no serious DD as stated above.

If you only invested $10k, after 8 years you're getting back more than your $10k in profit if you compound all gains to that point. Another 3 years of compounding and you're getting back over $20k a year.
 
I haven't been able to look at this in much detail, but my initial thoughts are:

1. Your results over an overall flat market period look to be pretty good to me.

2. A 40% max DD during a time when the markets completely tanked is completely reasonable. Certainly more than anyone would want, but given what the market did (from my recollection ~55% drops a couple of times), 40% is an improvement.

3. You could try and be more selective with entries by adding additional filters. The most likely outcome will be a reduced DD but with a reduced gain.

4. With a system that is only in the market ~ 25% of the time, I would probably keep this one on autopilot for a while and try and develop another strategy that would take advantage of the capital you have available 75% of the time. You may come up with some ideas for your current system through developing another.

5. If you want to increase capital, the only way to do it (for me at least) is to do it incrementally rather than all at once. When you are at an uncomfortable level, leave it there for a while and when it becomes not uncomfortable, raise your risk another notch. Repeat.


I would imagine you already know several of the points above already though. Good luck!

Thanks for the info Dr, your bullet points really chimed with me. I have tried (3) but I have not successfully discovered a filter that improved my system in an OOS test. I am going to start defining the time when my system is not trading, and see if I can find a complementary system for the other 76% of the time (your point 4).

Your point (5) clearly indicates to me that you have been exactly where I am - position size is a learned exercise. My entry size today is easy - 6 months ago it would have been very worrying. These things take time to get used to, but like anything you need to keep pushing a little bit more all the time.

Thanks again for your insights.

Oh, PS. I only trade EOD. That 40% drawdown is CLOSED trades only. So potentially it could have been (cough cough) somewhat worse in terms of open trade account drawdown! :)
 
Last edited:
Just to say a 25% annual return is not to be sneered at - assuming no serious DD as stated above.

If you only invested $10k, after 8 years you're getting back more than your $10k in profit if you compound all gains to that point. Another 3 years of compounding and you're getting back over $20k a year.

Yes. 25% for an automated, 5 minute-a-day system is good imo. Probably why I have invested those 5 minutes every single day since 2014!
 
adrianjm, have a look into equity curve trading. That may help you get a better overall equity curve and avoid massive drawdown.
Are you using intraday or daily data?

I have never been much of a fan of trading my own equity curve. Perhaps I am not doing it right, but like any MA system, it lags too much to be useful.

I trade EOD
 
If you tested everything properly and you are making double digit returns, next step is to get as much money you can and put into your own system, 2nd mortgage (interest rates are very low and much lower than your profits), friends and family members, you should be able to get 6-7 digit account for trading...
 
If you tested everything properly and you are making double digit returns, next step is to get as much money you can and put into your own system, 2nd mortgage (interest rates are very low and much lower than your profits), friends and family members, you should be able to get 6-7 digit account for trading...

And if you read the thread properly you would realize that the whole issue here is with gaining full confidence in the system. Gradually increasing risk is the way to go.

Going as big as possible all at once is only good if you want to start breaking your systems rules because you aren't prepared for drawdowns orders of magnitude greater than what you are used to. Seriously...this is your advise to him?
 
And if you read the thread properly you would realize that the whole issue here is with gaining full confidence in the system. Gradually increasing risk is the way to go.

Going as big as possible all at once is only good if you want to start breaking your systems rules because you aren't prepared for drawdowns orders of magnitude greater than what you are used to. Seriously...this is your advise to him?

I said precisely if you tested the system properly which implies live with real money, once you are confident you should go full force, why would you start to break it if you have confidence in it? If you don't have confidence you should go back to the testing board...
 
It's not possible to gain full confidence. The market is controlled by people you have no influence over.

Going large increases the incentive for those people in control. Then they have more reason to come grab your money.

Market is about taking risk. If you want more, you'll just have to put in more money. There is no guarantee. If you can't handle the uncertainty, then you are better off not be in the market.

Is lack of confidence coming from past experience of system failure ? A curve fitted system will fail at some point. The stocks have been in a long steady up trend for the past few years. The fitted curve will fail when the trend stops.
 
Adrian,

1. It seems you have had only 2-3 years of testing period in your equity curve. For me that is too short to have enough confidence, even for a 5min daytrading system. Please try to include the market from at least 2002, then we can see how the system performs during the volatility drought (2003-2006), the financial crisis, and the Fed-pumped bull market. Longer is better. If you are going to adjust its parameters every few months, you are prone to overfit the system because you are introducing more variables (e.g., the interval of re-optimization) which is hard to justify.

2. A suggestion: I assume you are trading emini S&P futures (ES), have you tested with similar markets like EMD, TF, YM? The system should be at least profitable in similar markets if the edge is not market-specific.

Just my 2 cents.
 
Top