Market filter

Discussions about the testing and simulation of mechanical trading systems using historical data and other methods. Trading Blox Customers should post Trading Blox specific questions in the Customer Support forum.
Post Reply
joefcr
Senior Member
Senior Member
Posts: 36
Joined: Sun Jun 19, 2011 4:47 am

Market filter

Post by joefcr »

is it possible to have filter on Index (like 200 WMA). System will exit all positions if Index falls below 200 Week Moving average.
TrendsCatcher
Roundtable Fellow
Roundtable Fellow
Posts: 97
Joined: Thu Jan 10, 2008 3:28 pm
Location: Southern California, USA

Post by TrendsCatcher »

200-week is probably too slow, 200-day is more practical. Yes, if you trade individual stocks, a filter on the index is almost necessary, you don't want to go long in a bear market, and you don't want to miss too much of a bull market. How you define bull and bear markets is up to you, either your x-period moving average filter, a moving average cross over, or other types of filters: this structure means up, that structure means up no more etc.
babelproofreader
Roundtable Knight
Roundtable Knight
Posts: 138
Joined: Wed Nov 10, 2004 4:36 pm

Post by babelproofreader »

I think 200 WMA means weighted moving average, not weekly moving average!
Aaron01
Roundtable Knight
Roundtable Knight
Posts: 113
Joined: Thu Jun 02, 2011 1:21 pm

Re: Market filter

Post by Aaron01 »

joefcr wrote:is it possible to have filter on Index (like 200 WMA). System will exit all positions if Index falls below 200 Week Moving average.
Why wouldn't (shouldn't) it be possible?
babelproofreader
Roundtable Knight
Roundtable Knight
Posts: 138
Joined: Wed Nov 10, 2004 4:36 pm

Post by babelproofreader »

I have just come across this paper which proposes using a filter based on the VIX.
svquant
Roundtable Knight
Roundtable Knight
Posts: 126
Joined: Mon Nov 07, 2005 3:39 am
Location: Silicon Valley, CA
Contact:

Post by svquant »

Babelproof

Thanks for the link and when I read the abstract it struck me as the opposite of what many researchers and traders believe and have observed. But after reading the paper it is clearer what they are saying and a word of warning. The VIX system is counter-trend (at the med to long term time frame) to the index price. If you are interested in the links between volatility, predictability, and technical trading there are quite a few papers going back to the works of Blake LeBaron (perhaps others are even earlier) in the late 1980's and early 1990's
Bravochico
Full Member
Full Member
Posts: 24
Joined: Wed Sep 14, 2011 11:46 pm
Location: Southern California, Ca

Post by Bravochico »

It's price path dependent in the end, but most active strategies work better in rising Vix climate with perhaps option writing the exception.

I'd speculate a moving average of ATR would work just as well as Vix in paper above.
joefcr
Senior Member
Senior Member
Posts: 36
Joined: Sun Jun 19, 2011 4:47 am

Post by joefcr »

what i wanted to know is that since i can not give a time price series as Index, how can i tell Trading Blox to check a specific series as Index (whether it is above 200 EMA or any other market filter) before buy.

if anybody has a blox for that and can upload it, it will be helpful for all of us.
rgd
Roundtable Knight
Roundtable Knight
Posts: 396
Joined: Thu Aug 10, 2006 5:21 pm

Post by rgd »

before test script:

SPY.loadsymbol("SPY")

where SPY is a instrument based BPV

entry orders script:

if SPY.close > SPY.SMA200 then...
joefcr
Senior Member
Senior Member
Posts: 36
Joined: Sun Jun 19, 2011 4:47 am

Post by joefcr »

thanks.

i have TB pro now. i can do that only if i have TB Builder, yes?
sluggo
Roundtable Knight
Roundtable Knight
Posts: 2987
Joined: Fri Jun 11, 2004 2:50 pm

Post by sluggo »

If you've got the "Pro" edition, you are able to assemble new systems out of the components (blox) that were provided when you purchased the software. The Pro edition also let you assemble systems using custom blox, i.e. other blox besides the ones that were shipped with the software. A large number of custom blox have been donated by other customers, who created them using the Builder edition. These custom blox are stored here on the Trader's Roundtable forum, in a section named the Blox Marketplace. Surf around in the Marketplace to see whether it contains something that meets your needs. If so, downlad it and give it a whirl.

Handy product guide:
  • Turtle Edition has no System Editor, has no Blox Editor. Cannot assemble new systems, cannot create or edit new blox.
  • Pro Edition has the System Editor but no Blox Editor. Can assemble new systems, cannot create or edit new blox.
  • Builder Edition has both the System Editor and the Blox Editor. Can assemble new systems, can create or edit new blox.
Post Reply