Click here to Login





                                                   What about this strategy?

  0

0
F A
2011-07-15 10:16:35


Dear
I found this trading strategy in a blog in the web by someone : It says:

The first component of this formula is to determine the trend. What you want are the daily moving averages in three time frames: the 10 day MA, 20 day MA, and 50 day MA. Here is the first part of the formula: 10 day MA > 20 day MA > 50 day MA. In other words the 10 day MA is higher than the 20 day MA which in turn is higher than the 50 day MA. If the stock you are looking at meets this criteria, then move on to the next component in this formula. If it does not, go back and keep looking for a stock until you find one that does.
The next component in this formula is to determine if on the previous day, in the last hour of trading, the stock closed above the 5 hour MA. If it has, move on to the next component in this killer formula. If not, reject the stock and start all over again until you find a stock that does.
The next component in this formula is to determine if the stock is at a 3 day high. If it is, move on to the next step below. If not, you know the drill, throw away this stock and start over again.
The next component in this formula is if the last price of the stock is above the 20 day MA. If it is, move on, if not, reject and start over.
The next component in this formula is if the stock has hit a 3 week high in the last week (the previous full week of trading). If not, reject the stock and start over.
The final component in this formula is if the stock has hit a 3 month high in the last month (the previous full month of trading).

What do you think about this strategy? Can we implement it in quantshare with daily values only?

Regards



QuantShare
2011-07-18 05:34:29

  0

Best Answer
All rules can be implemented except the second one (It requires intraday data)

Here is the strategy formula:

rule1 = sma(10) > sma(20) and sma(20) > sma(50);
// Cannot be implemented using daily data: In the last hour of trading, the stock closed above the 5 hour MA
rule3 = close == hhv(close, 3);
rule4 = close > sma(20);
rule5 = ref(TimeframeDecompress(TimeframeApply(7, close == hhv(close, 3))), 1);
rule6 = ref(TimeframeDecompress(TimeframeApply(31, close == hhv(close, 3))), 1);
buy = rule1 and rule3 and rule4 and rule5 and rule6;



F A
2011-07-18 14:45:43

  0

Thanks again.

Does anybody have any comment about the effectiveness of the formula? Do you think it is a good one?



Stefan Kroscen
2011-07-18 20:23:04

  0

My 2 cents... what would you use as sell criteria? Without the sell side of the equation, you don't yet have a full trading strategy.

I ran the formula provided for 2001 to current, and found the result to be -3.69% avg annual return, and a -0.89 sharpe ratio. So by itself, it doesn't seem promising. Perhaps with the missing rule and a different sell strategy... who knows.

But, that's the great thing about backtesting! Didn't cost anything to find that out. :)




F A
2011-07-19 05:23:26

  0

Thanks Stefan.

You are right, I think.



No more messages
0




Reply:

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"










QuantShare

Trading Items
Drawdown: Long and Short
Fed Watch - Federal Reserve News
Euronext Paris - News Data
Stock repurchase plans (Buybacks)
Floor Traders Pivots

How-to Lessons
What is the Bookmark Panel?
How to debug a downloader
How to plot a stock using different periods in the same chart
How to get trading orders from a portfolio programmatically
How to drag & drop a stock to a static watchlist

Related Forum Threads
What is name of this timestamp format: 20130117T153001??
Question about an object
I have been thinking about automation...
Very basic question about backtesting
First time here. Questions about Excel and Quantshare

Blog Posts
More about QuantShare Programming Language
What's new in this trading software?
How to Import Metastock data into QuantShare
Create Realtime Quote Sheets with the Watchlist Tool
Let QuantShare Manage your List of Securities









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.