Lead Bars & Position Sizing Leeway
Author: wycan
Creation Date: 9/1/2008 1:22 PM
profile picture

wycan

#1
In the process of converting my 4.5 scripts over to 5.1. So far, really like the 5.1 product.

Do have a couple of questions (probably won't be the last)

(1) Does "Lead Bars" exist, or something simliar in 5.1 ? I'm calculating a 200SMA in one my scripts and I'm starting at bar 200, but finding I need to back way off from the original start date, which throws off the actual results for the time period in question.

(2) Is there a "Position Sizing Leeway" in 5.1, or something simliar to avoid dropped trades ? This worked nicely in 4.5.

thx
profile picture

Eugene

#2
QUOTE:
(2) Is there a "Position Sizing Leeway" in 5.1, or something simliar to avoid dropped trades ? This worked nicely in 4.5.

You're right, but an alternative is to bump up the Margin Factor slightly greater than 1:1.
QUOTE:
(1) Does "Lead Bars" exist, or something simliar in 5.1 ?

Lead Bars were problematic in generation 4, but as far as I remember planned for a later release of v5 (Robert can correct me on this.) But since the data isn't appearing out of anywhere with their use, you may as well just shift the starting date 200 bars in the past?
profile picture

Cone

#3
I don't know of any near-term plans for lead bars, but they're essential for B&H comparisons and a true measure of performance. Customers need to call in feedback like this (features that you need) to Fidelity.
profile picture

wycan

#4
thx Eugene and Cone.

I'm surprised lead bars is not on the list. People will run into this especially if one is using any long term indicators like 200SMA. For me, gauging performance over defined time periods and comparing them to B&H is very important.

I'll provide feedback to Fidelity requesting the feature.

thx
profile picture

HappyLoser

#5
Regarding the lead bars: If you do not have it, the annualized gain will not be, what it really is. Imagine using a 200 day moving average and the first trade comes at bar 2001 ... So in my eyes, "Lead Bars" is a must for WL5!
profile picture

wycan

#6
Cone, Eugene,

I just looked at the home page on 5.3 and the patch mentions something about a fix with not having enough data for the 200 SMA (ie lead bars in V4). I called Fidelity and reported the lead bars issue last year and why it is so important. They completely understood and documented the issue. Do you know if lead bars is included, or something to that effect ?
profile picture

Cone

#7
Despite my lobbying for Lead bars, that feature is not included and was purposely left out of Version 5 due to a multitude of reasons ranging from the difficulty that many users had in understanding it to the complexity in its implementation, which was a source of many bugs in Version 4.

It appears there's little chance that Lead Bars will be added to Version 5 in the foreseeable future.
profile picture

wycan

#8
Wow. I'm really surprised. I can't believe a bug of this sort will be left open. It's beyond me. Many investors/traders may not realize that when they look at the results page, as "HappyLoser" points out, the performance figures for the dates specified are not accurate and do not align properly with buy and hold. I do appreciate you lobbying for it.

You may want to consider a write on the Wiki page for ALL your customers to see and understand... as well as a possible workaround. This is a real hidden bug folks, IMO.

profile picture

Eugene

#9
QUOTE:
You may want to consider a write on the Wiki page for ALL your customers to see and understand... as well as a possible workaround. This is a real hidden bug folks, IMO.

I've added a note to the Wiki FAQ so this important question is not overlooked:
FAQ
profile picture

Cone

#10
I wish Lead Bars were included too, but removing Lead Bars was a design decision. You can call it a missing feature that you really really like, but not a bug.

While Lead Bars may provide a slightly more accurate statement of performance over the test period, a bigger contributor to performance is the choice of the test period itself. Lead Bars has the effect of [usually] including additional trades at the beginning of the test period, and these may be winners or losers. Either way, the inability to trade during a small seed period at the beginning of the (with respect to the entire backtest) tends to have the effect of understating a strategy's performance slightly.

And, remember that a backtest is just one possibilty that will never repeat again. A far-more useful tool would be a Monte-Carlo simulation capability for Version 5, and that one we'll get.
profile picture

wycan

#11
Cone.. I've added my own datarange component which I include in all my scripts that keep the testing within the stated timeframe. For me it's very important to test from the beginning of a major downturn (ie Oct 08 etc) and really put the strategy thru the paces on drawdown from the getgo. The only thing I thought Lead Bars does (and it's probably a misleading name) is allow the program to pull in the extra data it needed up front to allow the calculations for the indicators.. since if you were trading real-time at that stated date, you would have the data. The "ideal" solution would really be for the program to internally "read" the program and identify the indicators with the largest timeframes and then automatically pull in the data behind the scenes.. in that way the user doesn't ever have to know about Lead bars. I do have a workaround for this, but I'm surprised it is being left open.

As far as the optimization and Monte-Carlo.. ABSOLUTELY ! I'm waiting for that one big time.. and of course it can't come soon enough :) That one is the TOP of my list.. Keep up the good work... thx
profile picture

Eugene

#12
QUOTE:
I can't believe a bug of this sort will be left open. It's beyond me. Many investors/traders may not realize that when they look at the results page, as "HappyLoser" points out, the performance figures for the dates specified are not accurate and do not align properly with buy and hold. I do appreciate you lobbying for it.


Probably this effect could be offset by focusing on performance metrics that are less sensitive to changes in start and stop dates.
profile picture

Eugene

#13
In case somebody stumbles onto this thread, a solution for Lead Bars has long been found:

FAQ | Strategies and WealthScript > How to start Buy&Hold from specific bar (not at bar #0)?
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).