Click here to Login

                                                   Momemtum Strategy


2010-08-04 14:53:45

Lets say I have a list of Symbols ( ABC , XYZ , DEF , LMN , UVW etc ) and I want to write a back test strategy in selecting the best performing symbol ( in terms of
absolute return ) in the last 1 month and sell if there is a new symbol which has the maximum return ( out of all the other ones ) or it meets a certain minimum return requirement.

How would I achieve that ?

2010-08-05 05:09:13


Do you want to keep symbols for a minimum number of bars or sell them directly when new symbols rank better than them in terms of last month return?

2010-08-05 10:57:44


I would like to sell them directly when new symbols rank better than them in terms of last month return .

2010-08-05 11:14:31


Best Answer
The best way to do this is to use the Composite function.

Buy Rule:
comp(perf(close, 25), "rank", 1, close > 2) <= 10

- Buy the top 10 stocks that have the highest perf(close, 25) value.
- Filter stocks using the following rule: close > 2

Sell Rule:
comp(perf(close, 25), "rank", 1, close > 2) > 10

- Sell stocks that are no longer in the top 10

2010-08-05 16:10:18


That was what I was looking for.Thanks

No more messages


No html code. URLs turn into links automatically.

Type in the trading objects you want to include: - Add Objects
To add a trading object in your message, type in the object name, select it and then click on "Add Objects"


Trading Items
Collar Option Strategy
Global Market Rotation Strategy V1.4
Bulls and Bears Strategy
Bollinger Strategy
EMAs Cross Strategy

How-to Lessons
Difference between the watchlist and the screener tools
How to create a trading system
How to generate buy/sell signals from a trading system
How to create and trade a Neural Network model
How to add a metric in the trading system simulation report

Related Forum Threads
Pair Trading Strategy would be nice!
Williams%R trading strategy
Receate ETFReplay strategy
Set Position Size by Ticker Within Main Strategy
Advice on building a trading simulator strategy

Blog Posts
Create a trading strategy using the money management tool - Part ...
Trading the Strategy Equity Curve
How to Backtest a Strategy from a Chart
Backtesting a Strategy Based on Bond and Stock Index ETFs
Money Management: Scale-in Trading Strategy

Create an account
Affiliate Program
Contact Us
Trading Forum
How-to Lessons
About Us
Terms of Use

Copyright 2024
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
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.