Click here to Login




Improve your trading system performance by ranking stocks

Updated on 2009-08-21





In the backtesting world, things could be so simple; you define your buy and sell rules and the system generates signals and long positions on bars where the buy rule passes and exits those positions when the sell rule passes. Traders often need more complexity to improve their trading system backtesting results, and thus will tweak the order type, switching from a simple buy at tomorrow open using market order to buy at a limit price, or add stop rules like a trailing stop using the ATR as exit.

There is also what is called 'Ranking', it can be added to a trading system to further improve its performance. 'Ranking' is used for example when you are backtesting a basket of equities. The simple buy and sell rule leaves the simulator with decisions that are generally made arbitrarily if no ranking system is defined in your trading strategy.

Here is a simple trading system example:
Buy when the 20-bars simple moving average crosses above the 100-bars simple moving average and sell when the 20-bars simple moving average crosses below the 100-bars simple moving average.

Let’s say that on 12 august 2008, the simulation engine generates 10 signals and that our trading system has room for 4 more positions. The arbitrary decision we talked about later comes into play in the current scenario. What stocks will the simulator buy among the list of ten signals?

If you don't define or tell the simulator how to act, the stocks that will be bought will be chosen generally by alphabetical order, which isn't really the best way to proceed. Here, there is a possibility to improve our trading system performance by creating a ranking system that will tell the simulator what stocks to pick when it faces such scenario, which often occurs when backtesting several equities.

The ranking system will attribute a value or score to each symbol, and then the simulator will rank the symbols based on this value. The answer to the question regarding which signals the simulator will choose among the 10 available can now be solved. The simulator will choose the ones that have the higher score.
We can for example add to the simple trading system discussed above a one rule ranking system: rsi(14).
For each date, the engine will now generate signals, rank those signals based on the 'rsi(14)' formula, and finally select the top ranked signals. Those are the signals that will be transformed into trading orders.

The trading system isn't limited to one ranking system; in fact two RS can be added: one for long positions and one for short positions. If you choose 'rsi(14)' as a rule for your ranking system (The RS is not limited to one rule, it can be composed of multiple rules and nodes with a factor and weight for each rule and node), you can add a short ranking system with the opposite formula (1 / rsi(14)). The higher the relative strength index the lower will be the signal rank.











no comments (Log in)

QuantShare Blog
QuantShare
Search Posts




QuantShare
Recent Posts

Create Graphs using the Grid Tool
Posted 1449 days ago

Profile Graphs
Posted 1554 days ago

QuantShare
Previous Posts

Data snooping bias
Posted 5574 days ago

Limit and Market orders
Posted 5585 days ago

Ranking system calculation methods
Posted 5594 days ago

RSS feeds transformation
Posted 5598 days ago

Stocks: Market Capitalization
Posted 5600 days ago

Ranking System Engine
Posted 5602 days ago


More Posts

Back







QuantShare
Product
QuantShare
Features
Create an account
Affiliate Program
Support
Contact Us
Trading Forum
How-to Lessons
Manual
Company
About Us
Privacy
Terms of Use

Copyright © 2024 QuantShare.com
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
Google+
Follow us on Google+
RSS Trading Items



Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.