StockFetcher Forums · Filter Exchange · My goal is to backtest Stan Weinstein method(s) one step at a time<< 1 2 >>Post Follow-up
nibor100
1,010 posts
msg #149798
Ignore nibor100
modified
12/4/2019 12:57:40 PM

1. This thread will hopefully cover several purposes:

a. to finally prepare at least one Weinstein backtest filter that I promised weeks ago

b. to show that it is not that hard for the rest of you to implement backtest filter lines to your own filters so you don't have to wait on me to get around to it.

c. to explore Weinstein filters methodology in more depth as from reading his book and part of the way thru analyzing his book charts more thoroughly I believe his method has lots of SF filter potential.

2. I plan on starting with filters from the Mactheriverrat thread in General Discussion entitle "Stan Weinstein's Secrets For Profiting in Bull and Bear Markets"

a. So first up is Xarlors filter from Jun 29th.

b. If I run that filter for yesterday it comes up with 2 stocks RDNT and EVER,

Looking at the chart for RDNT it most recently crossed above the daily 150 simple moving avg on Oct 3 and has gained near 36% since then.

Looking at the chart for EVER it most recently crossed above the daily 150 simple moving avg on Apr 23 and has gained near 341% since then.

Two stocks don't make a study but seems to have promise especially since the 28 charts I orginally analyzed from his book had an avg gain of 237% and 10 of those that I've analyzed a little more have had an avg gain of 58% in the first 3 months of trading. I started the 3 month analysis because I realized a lot of his charts showed stocks that really took off early and I know many of SF'ers aren't long term traders.

Next step will be to try and backtest a Weinstein filter that only looks for stocks above the 150 day simple moving avg. that Xarlor used (Weinstein preferred a weighted moving avg)

Ed S.







nibor100
1,010 posts
msg #149800
Ignore nibor100
12/4/2019 2:39:29 PM

Below is first backtest which I tried to keep as simple as possible as I basically was only testing the ma(150) for past true and false conditions.

I will clean it up a bit in the next iteration as stocks such as CLVS should be showing up when I run the filter today, but is only showing up on Dec 2 even though this filter is supposed to be looking back 1 year from today.

As always questions and comments are welcome,
Ed S.

Fetcher[
market is not etf
optionable
average volume(30) > 500000
low > 5

/* 1-2: General assumptions about price and volume*/
close > open
close 1 day ago > open 1 day ago
volume > volume 1 day ago

/* 3: 30-week MA */
/* setting true or false variables for the above and below ma(150) conditions*/
set{cl1,count(close 1 day ago > MA(150),1)}
set{cl2,count(close 2 days ago < MA(150),1)}

/*multiplying those 2 variables together for true when both are 1 or false when 0*/
set{comb1,cl1*cl2}

draw ma(150)

/*setting variable for next day Close-Open Percent Gain*/
set{var2, opcl / open}
set{var3, var2 * 100}

/*Testing the gain variable for 1 day gain or loss*/
set{var4, count( var3 is between 0 and 100, 1)}
set{var6, count( var3 is between -100 and 0, 1)}

/*Only want days filter is true for past year times gain is true or times loss is true*/
set{Tru12, comb1*var4 }
set{var5, count(tru12 > 0 ,252)} and add column var5 {next day winners }
set{Tru13, comb1*var6 }
set{var8, count(tru13 > 0 ,252)} and add column var8 {next day losers }
set{var20, var5 + var8} add column var20 {total hits }
and sort column 7 descending
var20 > 0

/*set variables to draw gains and loss days when true in past year*/
set{var7, Tru12*var3 } draw var7
set{var9, Tru13*var3 } draw var9
chart-time is 252 days

/* 4: Long-range background
set{var1,high 1 day ago}
set{var2, high 3-year high 2 days ago}
set{NewHighs,count(var1 > var2,50)}
add column NewHighs
var1 > var2*/

/* 5: Relative-strength line
Relative Strength(^SPX,150) > 1.5
30-day slope of Relative Strength(^SPX,150) > 0

draw ma(150)
draw high 3-year high
draw Relative Strength(^SPX,150)
do not draw var1
do not draw var2*/
]





Cheese
1,374 posts
msg #149802
Ignore Cheese
12/4/2019 3:56:22 PM

Ed S nibor100,

THANK YOU very much for your valuable time and good works.
At this time, as a basic sub, I cannot comment on your backtest filters
and some of the posted Weinstein filters.

I am really hoping to learn from you, Mac, xarlor, graf, and any Weinstein advocates
about the transition from Stage 1 to Stage 2.

For example, some of Mac's Weintein picks were like rockets in the last few months of 2019
when they crossed above weekly WMA(30) or daily WMA(150)
and moved from Stage 1 to Stage 2.

But when I looked at 2008, 2009, 2010 there were many fake moves and those
Weinstein stocks lingered in Stage 1 for months and even years.
Then, the weekly WMA(30) and daily WMA(150) crosses were fake again in 2014, 2015, etc

My descriptions above were from my flawed memory and should be viewed as conceptual only.

So, my question to Weinstein advocates is: Based on your experience and readings,
is it possible to make reliable guesses of real transitions from Stage 1 to Stage 2?
At one point, gratonian introduced Schaff to help divine the transition, and that filter
appeared to become more of a Schaff approach than a Weinstein approach.

Many thanks in advance for your insights.




Cheese
1,374 posts
msg #149805
Ignore Cheese
12/4/2019 4:08:54 PM



/* BASIC SUB version of nibor100 backtest */
/* https://www.stockfetcher.com/forums/Filter-Exchange/My-goal-is-to-backtest-Stan-Weinstein-method-s-one-step-at/149798 */

Fetcher[
market is not etf
optionable
average volume(30) > 500000
low > 5

/* 1-2: General assumptions about price and volume*/
close > open
close 1 day ago > open 1 day ago
volume > volume 1 day ago

/* 3: 30-week MA */
/* setting true or false variables for the above and below ma(150) conditions*/
set{cl1,count(close 1 day ago > MA(150),1)}
set{cl2,count(close 2 days ago < MA(150),1)}

/*multiplying those 2 variables together for true when both are 1 or false when 0*/
set{comb1,cl1*cl2}

draw ma(150)

/*setting variable for next day Close-Open Percent Gain*/
set{var2, opcl / open}
set{var3, var2 * 100}

/*Testing the gain variable for 1 day gain or loss*/
set{var4, count( var3 is between 0 and 100, 1)}
set{var6, count( var3 is between -100 and 0, 1)}

/*Only want days filter is true for past year times gain is true or times loss is true*/
set{Tru12, comb1*var4 }
set{var5, count(tru12 > 0 ,252)} and add column var5 {next day winners }
set{Tru13, comb1*var6 }
set{var8, count(tru13 > 0 ,252)} and add column var8 {next day losers }
set{var20, var5 + var8} add column var20 {total hits }
and sort column 7 descending
/* var20 > 0 */ /* EDITED */

/*set variables to draw gains and loss days when true in past year*/
set{var7, Tru12*var3 } draw var7
set{var9, Tru13*var3 } draw var9
chart-time is 252 days

/* 4: Long-range background
set{var1,high 1 day ago}
set{var2, high 3-year high 2 days ago}
set{NewHighs,count(var1 > var2,50)}
add column NewHighs
var1 > var2*/

/* 5: Relative-strength line
Relative Strength(^SPX,150) > 1.5
30-day slope of Relative Strength(^SPX,150) > 0

draw ma(150)
draw high 3-year high
draw Relative Strength(^SPX,150)
do not draw var1
do not draw var2*/
]



Cheese
1,374 posts
msg #149806
Ignore Cheese
12/4/2019 4:20:03 PM

Ed S,

Thanks again for your selfless efforts.

I agree that we should not rely on you 100% for backtesting. That would be an unfair burden.

But at least in the near term, some of us certainly would have to rely on you
for the bright ideas that come with your backtesting. For example, I suspect that we may gain
a little more insight from the interplay of your var7 and var9.




Cheese
1,374 posts
msg #149807
Ignore Cheese
12/4/2019 4:44:45 PM

Maybe to make money, I should keep in the back of my mind that
a lot of credits for Mac's 2019 rockets should go to Trump, Fed QE & "not QE"
as much as they go to Mac, Guppy and Weinstein.

nibor100
1,010 posts
msg #149830
Ignore nibor100
12/7/2019 1:13:27 PM

I was surprised that this filter wouldn't run on the basic subscription without Cheese's one line edit. It appears my backtest accumulation variables are part of the issue.
Ed S.

jiten_ch
9 posts
msg #149833
Ignore jiten_ch
12/8/2019 4:09:04 AM

Thanks the filter is quite comprehensive,
I want to trade only few time of years and only on stocks Stan called as buyout candidates (refer chapter 5)
His criterion was
-above ma 30
-rs line positive
-stock moved 40-50 before breakout
-volume 5 times at breakout
-volume remains heavy
-large stage 1

can you please build or guide me how to build a fetcher with these factors ?



Cheese
1,374 posts
msg #149837
Ignore Cheese
12/8/2019 6:23:31 PM

jiten_ch,
earlier this year (2019) someone mentioned Chartmill for Weinstein stage analysis.



nibor100
1,010 posts
msg #149844
Ignore nibor100
12/10/2019 10:10:08 AM

@ jiten_ch,

Graftonian's filter posted in Filter Exchange "Another Weinstein filter" is probably a good place to start for most of the Weinstein criteria you are interested in.

Ed S.


StockFetcher Forums · Filter Exchange · My goal is to backtest Stan Weinstein method(s) one step at a time<< 1 2 >>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 2022 - 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.