Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Are most simple trading systems worthless?

Hi,

I am new to the algorithmic trading and I found a lot of trading systems, but it seem that all of them are lacking a crucial point. I wonder if I am missing something that more experienced systematic traders know, so authors don't spend time on this, or if these "systems" are just garbage and I need to look for something else.

Usually an author of a trading system describes it like this:
- Buy when some condition is met (say SMA(10) > SMA(30) or similar momentum/breakout indicators)
- Sell when some other condition is met (say SMA(30) >= SMA(10))

This is it, just enter and exit criteria.

What I found confusing is how to manage a portfolio of stocks that meet described conditions. Most of the systems that I saw so far simply ignore this question but to implement an algorithm I need to answer following questions:
- If on a particular day I have N stocks that should be bought according to this system, should I buy all of them or some subset?
- Should I buy an equal dollar amount of these stocks or should I weight them somehow?
- Should I buy more of the stocks that I already have in my portfolio later or should I simply hold it until an exit criteria is met?
- Should I split all existing cash among all stocks or should I left some to buy stocks later?
- What if the next time I check for these indicators I have more stocks that match an enter criteria? Should I buy more? Clearly, I can only do this if I have cash in my portfolio left, so do to this I may need to ignore some of the stocks that match an entry criteria.
- All this lead to another question... Should a system be traded weekly, daily or with some other time interval?

Also most of the systems ignore what capital a trader have and how this should influence trading style. I would imagine that $10,000,000 portfolio should use different rules comparing to a $10,000 portfolio since because of trading fees and how a portfolio can be diversified.

So far I saw just one system (Stocks on the Move) that described how to manage positions in portfolio. Is there a common "framework" that can be applied to manage these simple systems?

1 response

@Ivan

You are probably one step ahead of a lot of folks simply because you realize there is more to algorithmic trading than simple buy and sell signals. All of the questions/issues you stated are real decisions that an algorithm needs to address. There isn't any one framework or one right answer. And yes, as you mentioned how these are approached depends greatly on if you have a $10,000 or $10,000,000 portfolio. Most algorithms don't scale well across that large a range. Another big consideration is how much you pay in commissions.

That all said, here are my ideas of 'common' approaches. These may not be best or even good approaches, but it's what you see a lot of.

- If on a particular day I have N stocks that should be bought according to this system, should I buy all of them or some subset?
What one typically sees is an algorithm tries to hold a fixed number of positions. Buy as many as needed to get the portfolio to that number. However, the quantity isn't often the consideration as much as the dollar amount of each trade. You can't ever trade fractional shares and unless you are paying $0 commission (eg Robinhood) the trading cost become high when trading small dollar amounts. Typically don't open new positions if the dollar amount is less than some minimum (maybe $2000 depending upon commissions)

- Should I buy an equal dollar amount of these stocks or should I weight them somehow?
Completely up to you. Equal percentage is common because it's easy to calculate. However, one could ague it makes sense to 'bet' more on stocks that you think will have the greatest return. Take a look at the Kelly Criteria https://en.wikipedia.org/wiki/Kelly_criterion . Again, if the weight of a stock reduces the dollar value of a trade below some minimum then maybe don't trade (as above).

- Should I buy more of the stocks that I already have in my portfolio later or should I simply hold it until an exit criteria is met?
Completely up to you. This is one of the basic algorithm decisions. Make sure you have exit criteria that cover all the bases otherwise you will end up holding a stock longer than maybe you should. For example, if one has an exit criteria that the sell price must be greater than the buy price (ie you made a profit) then you're going to ride a losing stock all the way to the bottom.

- Should I split all existing cash among all stocks or should I left some to buy stocks later?
The big decider here is if one trades in a margin account or not. If you have a cash account then you will need to free up cash before you can buy more. If you have a margin account then you can take advantage of buying opportunities and wait for selling opportunities and can be completely invested at all times.

- What if the next time I check for these indicators I have more stocks that match an enter criteria? Should I buy more? Clearly, I can only do this if I have cash in my portfolio left, so do to this I may need to ignore some of the stocks that match an entry criteria.
Again, up to you. That is why we backtest. Find out what works best.

- All this lead to another question... Should a system be traded weekly, daily or with some other time interval?
For backtesting, to find quick and dirty results then try trading at different intervals. This often saves the effort of coming up with more involved exit criteria, and saves the effort of perhaps filtering out daily or minutely noise. However, I'm going to say that any serious live trading algorithm should generally be looking at conditions on a minute basis or at least as often as the underlying data can change. The premise is simple. Algorithms trade based upon information or 'signals'. If one only looks at that information at arbitrary intervals, then all the information in between is missed. This implies that ones algorithm is potentially missing opportunities if it doesn't use all the data at it's disposal. This doesn't always mean you need to run logic every minute. A solid way to capture price movements at the minute level without dealing with the complexities of minute trading is to enter limit orders at the beginning of each day.

Good luck.