EOM Trend Buyer Strategy: bars held
Author: jtgraham
Creation Date: 1/16/2009 1:37 PM
profile picture

jtgraham

#1
The EOM Trend Buyer strategy (5.1) includes a Hold Bars parameter to set how long the position is held. In my testing, whenever this parameter is set below 7, the Trade List shows that Bars Held does not conform to the Hold Bars parameter setting, but varies depending on the Entry Date. Does anyone know if this is intended? If not, there appears to be a problem with the strategy.
profile picture

Eugene

#2
QUOTE:
the Trade List shows that Bars Held does not conform to the Hold Bars parameter setting,


Re: hold bars != Bars Held.

To be more risk-aware, Wealth-Lab 5 employs a "pessimistic" scenario when counting position bars held. It means the following (assuming daily data): even if you buy at close today and sell at market (open) tomorrow, that counts for two full bars. You can verify that by running this very simple code:

CODE:
Please log in to see this code.

You could find it in the Wealth-Lab User Guide, Preferences > Performance Visualizers > Trades
profile picture

jtgraham

#3
Thanks for the info on the pessimistic method of computing Bars Held. The problem I have found appears to go beyond that. For example, in a group of 9 trades generated using Hold Bars = 3, the Bars Held values were 5, 7, 7, 8, 5, 6, 8, 8, 6.
profile picture

Eugene

#4
This is by design of the strategy: it just won't let you sell until the next month begins.

To make it, the bar is skipped by affecting the trading loop with the continue statement:

CODE:
Please log in to see this code.
profile picture

jtgraham

#5
Thanks, Eugene. I now can see how the exit dates that I had not expected were determined. I had looked at the continue statement, but did not see that it was preventing an exit date in the same month as the entry date.
profile picture

gymcoach

#6
I am also having a problem with this strategy. Not sure if it is related to this issue.
I am running the strategy on symbol IWO.
Scale = Daily
Data Range = 1,250 bars
Position size = $10,000 starting equity, 95% percent of equity
SMA period = 25
Hold bars = 27
Buy date = 28

I am not able to figure out why no buys are made after it exits on 12/08/2010.
Is this due to a similar flaw in the strategy or my lack of knowledge of the script.
profile picture

Eugene

#7
QUOTE:
I am not able to figure out why no buys are made after it exits on 12/08/2010.

Because there should be no buys made, and it's easy to verify by reading the strategy code.

On those 7 occurances (Straps: 25-27-28) since 12/28/2010 and until today, the Close price had never declined for three consecutive days, invalidating the entry criteria.
profile picture

gymcoach

#8
Thanks for the explanation. That condition should be included in the Strategy Description.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).