StockFetcher Forums · Filter Exchange · HOW TO DESIGN A SYSTEM (NOT JUST A FILTER)<< 1 ... 11 12 13 14 15 ... 43 >>Post Follow-up
Kevin_in_GA
4,536 posts
msg #101738
Ignore Kevin_in_GA
7/20/2011 8:45:07 PM

Two new BUY signals today - ALTR and JCI. No SELL signals.

Kevin_in_GA
4,536 posts
msg #101758
Ignore Kevin_in_GA
modified
7/21/2011 12:15:15 PM

Noon 7/21 intraday:

SELL Dean Foods (DF). In at 11.26 out at 11.79 for a gain of 4.7%.

Intraday BUY signal for LH at 93.00, but it closed at 94.47 so it won't show up as a buy at EOD.

Kevin_in_GA
4,536 posts
msg #101763
Ignore Kevin_in_GA
modified
7/21/2011 4:32:44 PM

End of day:

SELL signal for PLL - in at 53.30, out at 55.01 for a gain of 3.2%. 3 days in trade.

SELL signal for DF - in at 11.21, out at 11.90 for a gain of 6.1%. 3 days in trade.

cracken
2 posts
msg #101764
Ignore cracken
7/21/2011 8:12:07 PM

I am trading this "system" now after some basic fundamental research on the stocks that turn up. Thanks for posting this Kevin. I have some questions/ comments....

For backtesting in SF I am using CLOSE above Upper BOLLINGER BAND(16,2) as the exit. Works ok, but using the second filter for the actual exit signals.

How could you limit this system so that it does not trade during a bear period (e.g. SPY is below 200 day MA or slope of SPY is negative). It seems that most of the bad trades are during bear periods. It seems like this would help but not sure until backtested. Also, I is this the right change to use this on the NASDAQ 100 stocks? still trying to figure out how to do the exit without creating multiple watchlists.

NASDAQ 100

/*FIRST DETERMINE HISTORICAL RATIO OF NASDAQ100 STOCK TO THE NDX OVER THE LAST 16 DAYS*/
SET{PRICERATIO, CLOSE / IND(^NDX,CLOSE)}
SET{RATIOMA16, CMA(PRICERATIO,16)}
SET{RATIOSTD16, CSTDDEV(PRICERATIO,16)}
SET{DIFF16, PRICERATIO - RATIOMA16}
SET{ZSCORE16, DIFF16 / RATIOSTD16}
SET{THRESHOLD16, RATIOSTD16 * 2}

/*NEXT, SET CRITERIA NECESSARY TO TRIGGER A PAIR TRADE*/

SET{UPPERBAND16, RATIOMA16 + THRESHOLD16}
SET{LOWERBAND16, RATIOMA16 - THRESHOLD16}

ZSCORE16 BELOW -2
WILLIAMS %R(16) BELOW -94
CLOSE BELOW LOWER BOLLINGER BAND(16,2)
CLOSE ABOVE MA(200)

DRAW LOWERBAND16 ON PLOT PRICERATIO
DRAW UPPERBAND16 ON PLOT PRICERATIO
DRAW BOLLINGER BANDS(16,2)
ADD COLUMN ZSCORE16 {Z-score}
ADD COLUMN WILLIAMS %R(16)

DRAW ZSCORE16 LINE AT -1
DRAW ZSCORE16 LINE AT -2
DRAW ZSCORE16 LINE AT 0

SORT ON COLUMN 5 ASCENDING
CHART-TIME IS 6 MONTHS

03bsbme
20 posts
msg #101767
Ignore 03bsbme
7/21/2011 9:45:11 PM

You can add the following to the filter to indicate that the SPX is above the EMA200. You might want to play around with the period you want to use though. The SPX can be falling like a rock and yet still above the MA200. The code shown is one way to add some criteria for the overall market though.

set{spx,ind(^SPX, close)}
set{spxMA200, cema(spx,200)}
spx above spxMA200


duncanhoo
14 posts
msg #101772
Ignore duncanhoo
7/22/2011 1:27:16 PM

kevin you still in paper or gone live yet on this? Thanks for hte referral to stratasearch. having lots of fun with it.

Kevin_in_GA
4,536 posts
msg #101777
Ignore Kevin_in_GA
7/22/2011 9:46:48 PM

7/22 EOD signals:

BUYS: BCR and APD

SELLS: None

Kevin_in_GA
4,536 posts
msg #101778
Ignore Kevin_in_GA
7/22/2011 10:07:56 PM

I am trading this "system" now after some basic fundamental research on the stocks that turn up. Thanks for posting this Kevin. I have some questions/ comments....

For backtesting in SF I am using CLOSE above Upper BOLLINGER BAND(16,2) as the exit. Works ok, but using the second filter for the actual exit signals.

+++++++++++++++++++++++++++++++++++

I'll backtest this further, but when I ran this exit strategy against the same stocks/time period as was used for the original filter desing, it fared MUCH worse - equity gain was only about 40% of the Zscore exit gains, days in trade extended to 14 from 5 for the original filter, and the overall monthly Sharpe ratio dropped from 0.49 to less than 0.25.

Here's a quick comparative backtest using SF over the last four months (maximum trades in play here is only 5 at any time):

Exit - close above upper Bollinger Band(16,2):

Test started on 03/22/2011 ended on 07/22/2011, covering 85 days

Trade Statistics
There were 27 total stocks entered. Of those, 27 or 100.00% were complete and or 0.00% were open.
Of the 27 completed trades, 17 trades or 62.96% resulted in a net gain.
Your average net change for completed trades was: 1.80%.
The average draw down of your approach was: -3.33%.
The average max profit of your approach was: 5.85%
The Reward/Risk ratio for this approach is: 2.04
Annualized Return on Investment (ROI): 34.42%, the ROI of ^SPX was: 10.60%.

Equity summary (which does not take commissions into effect): Total (Cash + Market): $110,133.70

Exit - zscore16 above -1

There were 62 total stocks entered. Of those, 62 or 100.00% were complete and or 0.00% were open.
Of the 62 completed trades, 41 trades or 66.13% resulted in a net gain.
Your average net change for completed trades was: 1.35%.
The average draw down of your approach was: -2.55%.
The average max profit of your approach was: 2.87%
The Reward/Risk ratio for this approach is: 3.30
Annualized Return on Investment (ROI): 69.40%, the ROI of ^SPX was: 10.60%.

Equity summary: Total (Cash + Market): $117,972.21

____________________________________________________

How could you limit this system so that it does not trade during a bear period (e.g. SPY is below 200 day MA or slope of SPY is negative). It seems that most of the bad trades are during bear periods. It seems like this would help but not sure until backtested.
+++++++++++++++++++++++++++++++++++
I tried this and in all cases the overall performance took a hit - that's why I use the "close above MA(200)" on the individual stocks instead.
____________________________________________________

Also, I is this the right change to use this on the NASDAQ 100 stocks? still trying to figure out how to do the exit without creating multiple watchlists.
+++++++++++++++++++++++
Your code is correct, but the specific settings are for S&P500 stocks, not the NASDAQ. You would want to optimize this approach specifically for those stocks, then verify using Monte Carlo and out-of-sample testing.

duke56468
683 posts
msg #101783
Ignore duke56468
7/23/2011 9:51:54 AM

Kevin.... are you still using the original filter? I get different results using 20 days and and max 10 positions and zscore above
-1 exit.

Test started on 03/22/2011 ended on 07/22/2011, covering 85 days

There were 97 total stocks entered. Of those, 93 or 95.88% were complete and 4 or 4.12% were open.
Of the 93 completed trades, 57 trades or 61.29%resulted in a net gain.
Your average net change for completed trades was: 0.80%.
The average draw down of your approach was: -2.84%.
The average max profit of your approach was: 2.55%
The Reward/Risk ratio for this approach is: 2.05
Annualized Return on Investment (ROI): 38.13%, the ROI of ^SPX was: 10.60%.

Total (Cash + Market): $107755.72


Kevin_in_GA
4,536 posts
msg #101785
Ignore Kevin_in_GA
modified
7/23/2011 12:48:21 PM

Duke - note in my post that I said max 5 open positions. Also in a previous post I had looked at the impact of maximum days held - no difference between 15 and 20 days. So while it will not change the numbers, I am now using 15 days as a maximmum hold period for these trades.

StockFetcher Forums · Filter Exchange · HOW TO DESIGN A SYSTEM (NOT JUST A FILTER)<< 1 ... 11 12 13 14 15 ... 43 >>Post Follow-up

*** Disclaimer *** StockFetcher.com does not endorse or suggest any of the securities which are returned in any of the searches or filters. They are provided purely for informational and research purposes. StockFetcher.com does not recommend particular securities. StockFetcher.com, Vestyl Software, L.L.C. and involved content providers shall not be liable for any errors or delays in the content, or for any actions taken based on the content.


Copyright 2016 - Vestyl Software L.L.C.Terms of Service | License | Questions or comments? Contact Us
EOD Data sources: DDFPlus & CSI Data Quotes delayed during active market hours. Delay times are at least 15 mins for NASDAQ, 20 mins for NYSE and Amex. Delayed intraday data provided by DDFPlus