StockFetcher Forums · Filter Exchange · HOW TO DESIGN A SYSTEM (NOT JUST A FILTER)<< 1 ... 3 4 5 6 7 ... 43 >>Post Follow-up
shainadir
25 posts
msg #101218
Ignore shainadir
6/12/2011 3:24:28 PM

FortyFour

Even with a lower ROI, I would expect that Kevin's orignal filter would have a better bottom line cash result due to the fact that his filter produced more trades.

duke56468
683 posts
msg #101220
Ignore duke56468
6/12/2011 4:00:15 PM

In the backtest if I leave the "selection method" blank will SF choose the stocks in the order of the filter selection or do I have to write in a selection method??

fortyfour
189 posts
msg #101221
Ignore fortyfour
modified
6/12/2011 4:31:25 PM

Shainadir,

Thanks for pointing that out to me. The 15% width is extreme and I shouldnt have posted it as such.
A better method (eliminate about 160 SP500 stocks... everyone of those Electric Utilities etc..) , yet, include the
likes of APPL...... change the 99 day average bb width to 7% .

It now yeilds equity of $200,526 with 342 trades (approx 160 low volatility SP500 stocks eliminated)
The "original" master ( and I do mean that ! ) yeilds $183,700 with 515 trades


This would be a much more reasonable "look" in StrataSearch than the 15% bb filter.
Thanks.
Kevins exit of Zscore above -1 is used as well.


PS.
The display regarding BB's (width etc..) on the SP500 is posted below if anyone is interested...

PS. #2
Side by side comparisons within stockfetchers backtesting feature( never used this much) show that
cash(equity) was increased in method #2 mostly by changing(unintentionally) the max open positions to 6f(from 10)
and max daily entries to 3(from 5)
Setting to 10 and 5 as it is in study #1... the volatility exclusion reduced trades from 505 to 480 (not much) and
cash was nearly the same...
I should leave this type of analysis to others...

***************************************************************************************

Statistics · Performance Chart · Trades · Equity Summary new! · System Summary · Edit Backtests · Backtest Forum · Help
Approach Information
Approach Name: kevin_wide_bb_width
Test started on 06/10/2009 ended on 06/10/2011, covering 505 days
Filter used:
Market is sp500
/*FIRST DETERMINE HISTORICAL RATIO OF S&P STOCK TO THE SPY OVER THE LAST 16 DAYS*/
SET{PRICERATIO, CLOSE / IND(^SPX,CLOSE)}
SET{RATIOMA16, CMA(PRICERATIO,16)}
SET{RATIOSTD16, CSTDDEV(PRICERATIO,16)}
SET{DIFF16, PRICERATIO - RATIOMA16}
SET{ZSCORE16, DIFF16 / RATIOSTD16}
ZSCORE16 BELOW -2
WILLIAMS %R(16) BELOW -94
CLOSE BELOW LOWER BOLLINGER BAND(16,2)
CLOSE ABOVE MA(200)

ADD COLUMN WILLIAMS %R(16)

/* 99 DAY AVERAGE BOLLINGER WIDTH */
set{hh, bollinger width(16,2)}
set{width_per, hh * 100}
set{wsum, sum(width_per,99) }
set{99_width_avg%, wsum/99}
add column 99_width_avg%

99_width_avg% > 7
sort column 6 descending



Trade Statistics
There were 342 total stocks entered. Of those, 336 or 98.25% were complete and 6 or 1.75% were open.
Of the 336 completed trades, 233 trades or 69.35%resulted in a net gain.
Your average net change for completed trades was: 1.33%.
The average draw down of your approach was: -3.50%.
The average max profit of your approach was: 3.30%
The Reward/Risk ratio for this approach is: 2.51
Annualized Return on Investment (ROI): 60.00%, the ROI of ^SPX was: 17.03%.

Exit Statistics
Stop Loss was triggered 0 times or 0.00% of the time.
Stop Profit was triggered 0 times or 0.00% of the time.
Trailing Stop Loss was triggered 0 times or 0.00% of the time.
You held for the maximum period of time (20 days) 0 times or 0.00% of the time.
An exit trigger was executed 336 times or 100.00% of the time.

***************************************************************************************


Fetcher[market is sp500
draw bollinger band(16,2)
sort column 5 descending
draw williams %r(16)

/* CURRENT BOLLINGER WIDTH PERCENTAGE*/
set{bb, bollinger width(16,2)}
set{bb_width%, bb * 100}
add column bb_width%

/* 99 DAY AVERAGE BOLLINGER WIDTH */
set{hh, bollinger width(16,2)}
set{width_per, hh * 100}
set{wsum, sum(width_per,99) }
set{99_width_avg%, wsum/99}
add column 99_width_avg%

/*PRICE's PERCENTAGE(distance) FROM LOWER BOLLINGER BAND*/
set{ee, close - lower bollinger band(16,2)}
set{rr, ee/lower bollinger band(20)}
set{From_Lower%, rr * 100}
add column From_Lower%

/*PRICE's LOCATION IN RELATION TO LOWER AND UPPER BB*/
/* IE: "KMB" MAY BE 2% AWAY FROM LOWER BB BUT 50% AWAY FROM LOWER BB*/
/* IE: "JDSU" LIKEWISE MAY BE 2% FROM LOWER BB BUT ONLY 10% AWAY FROM LOWER BB*/

set{yy, From_Lower% / bb_width%}
set{fraction_per%, yy * 100}
add column fraction_per%
]












03bsbme
20 posts
msg #101226
Ignore 03bsbme
6/12/2011 7:41:21 PM

What would you use for a stop loss or exit if it goes against you? Some of these have drawdowns of more than 20%. Perhaps if the zscore falls more (ie from -2 to -3)?

novacane32000
331 posts
msg #101228
Ignore novacane32000
6/12/2011 9:57:37 PM

03
The best exit is a cross above -1 Zscore.

I backtested with a 5%,7% and 10% stop.

Also tried exits after 5 days and 10 days .

Only during a few isolated time periods were these exits better. At this point ,I am only using the Zscore exit.

Kevin_in_GA
4,599 posts
msg #101229
Ignore Kevin_in_GA
6/12/2011 10:24:00 PM

What would you use for a stop loss or exit if it goes against you? Some of these have drawdowns of more than 20%. Perhaps if the zscore falls more (ie from -2 to -3)?
+++++

Two options - double down and increase your positions on both sides, recognizing that now the attractiveness of this pair is even higher, or cut your loss and move to another pair trade.

No system can avoid the occasional bad trade. One of the reasons I built in a maximum holding period was to mitigate these types of situations, since nothing prevents them entirely.

I looked at adding a second exit criteria of "zscore(16) < -3" and allowed the maximum days held to vary. The stats are essentially unchanged, but you get a very slight improvement when you reduce the max holding period to 16 days from 20.

This argues that if you were to "double down" when the zscore(16) went south of -3, you would basically make more money than cutting your losses.

Kevin

novacane32000
331 posts
msg #101235
Ignore novacane32000
modified
6/13/2011 5:31:56 PM

Here is a strategy that may help with slippage without hurting performance results.

Buy with a limit order (use your discretion here .25%, .50%, 1%) at the open the day after a signal.

I am using a max portfolio of 7 since my acct is not so big but this should work fine with 10 also. There are enough signals generated daily that if your order does not get filled one day you can enter a limit order the next day on another signal.

I will need to review trades on previous backtest to determine how often you would get filled and more importantly how often you will miss on a pick that takes off .

For now, here are my current holdings with the % limit below the open I could have used and still got a fill.

GT 1%
THC .25%
LO 1%
ANF 1%
WM (Probably would not have been filled .20%)
KIM 1%
ALTR 1%

5 OF 7 would have been filled at a better price using a limit order 1% below the open.
THC did not drop much from the opening price.
WM –tough fill, only dropped .03 from the open


I’m sure many of you do this as common practice.

I have always entered w/ a market order.


Kevin_in_GA
4,599 posts
msg #101237
Ignore Kevin_in_GA
6/13/2011 6:36:29 PM

Follow up - 2 exits triggered today:

LO - entry at 97.00, closed trade today at 101.57 (+4.71%)
R - entry at 50.71, closed trade today at 50.90 (+0.37%)

Replace these two with CHK and IP at the open price tomorrow.

duke56468
683 posts
msg #101239
Ignore duke56468
6/13/2011 8:39:42 PM

four or anyone....do you know this answer? In the backtest if I leave the "selection method" blank will SF choose the stocks in the order of the filter selection or do I have to write in a selection method??


Kevin_in_GA
4,599 posts
msg #101240
Ignore Kevin_in_GA
6/13/2011 9:16:47 PM

I use the following:

SET{PRICERATIO, CLOSE / IND(^spx,CLOSE)}
SET{RATIOMA16, CMA(PRICERATIO,16)}
SET{RATIOSTD16, CSTDDEV(PRICERATIO,16)}
SET{DIFF16, PRICERATIO - RATIOMA16}
SET{ZSCORE16, DIFF16 / RATIOSTD16}
SET{THRESHOLD16, RATIOSTD16 * 2}

select by zscore16 ascending

This insures that the stocks with the lowest z-score are chosen ahead of any others.

StockFetcher Forums · Filter Exchange · HOW TO DESIGN A SYSTEM (NOT JUST A FILTER)<< 1 ... 3 4 5 6 7 ... 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 2026 - 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


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.