The trades of a 'Buy&Hold strategy' are opened on multiple bars
Author: RickTg
Creation Date: 12/23/2015 5:25 PM
profile picture


I created a strategy
Please log in to see this code.

I used a pos size of 5% equity. I would have expected all the trades to have been opened on the same day. However, some were opened on one day and some were opened on another day. This happens everytime I execute the strategy.

profile picture


I don't like unproductive guesswork but there could be, for example, not enough capital to execute all signals on the first bar of trading. When equity increased, the rest of the signals was fired.

Otherwise please provide the settings:

1. DataSet, symbols, bar scale, data loading range, data provider
2. WL Preferences (from the Backtest and Slippage groups)

profile picture


expected all the trades to have been opened on the same day
Quick example why this wouldn't happen:
Assume the test range begins Dec 31, 1999. The code will create a trade for IBM on Jan 3, 2000, but not for GOOGL, whose first day of trading was 8/19/2004.
profile picture


Please log in to see this code.

Scale Daily
Data Range 1/1/2015 to 12/23/2015
Position Size 5% equity
Starting cap 100,000 1:1 margin
Data Set Russell 1000
Provider Yahoo
Backtest Preferences Apply dividends...
Benchmark Buy & Hold .spx
Slippage Preferences None selected

Position Symbol Quantity Entry Date Entry Price Exit Date
Long SLXP 36 1/30/2015 135.28 Open
Long RVBD 242 1/30/2015 20.62 Open
Long VMC 70 2/3/2015 71.69 Open
Long TXT 116 2/3/2015 43.32 Open
Long PRU 65 2/3/2015 76.29 Open
Long OCR 66 2/3/2015 75.38 Open
Long MIK 186 2/3/2015 26.94 Open
Long ALB 106 2/3/2015 47.59 Open
Long PACW 118 2/3/2015 42.51 Open
Long TWX 64 2/3/2015 77.47 Open
Long AIZ 78 2/3/2015 63.53 Open
Long DECK 72 2/3/2015 69.37 Open
Long FDX 29 2/3/2015 172.29 Open
Long HES 72 2/3/2015 70.05 Open
Long UHS 48 2/3/2015 102.02 Open
Long HBI 181 2/3/2015 27.54 Open
Long ATVI 238 2/3/2015 20.99 Open
Long DPS 65 2/3/2015 76.57 Open
Long ARW 90 2/3/2015 55.74 Open
Long IPG 252 2/3/2015 19.88 Open
profile picture


Can not reproduce. All trades were taken on 2/3/2015.

P.S. With "Use worst trades...", symbols will be randomly selected on each run with these script/settings.
profile picture


Long SLXP 36 1/30/2015 135.28 Open
Long RVBD 242 1/30/2015 20.62 Open

With Fixed 500 bars I can reproduce the effect although with different symbols fired prematurely i.e. FSL, CYT, AWAY vs. SLXP, RVBD. All these symbols stopped trading: AWAY on 12/15/2015, FSL on 12/08/2015 etc. Your delisted symbols are RVBD SLXP and this is explained by a difference in Russell 1000 composition on my and your PC. This is caused by synchronization.
profile picture


Thank you for the in depth research.
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).