I have downloaded the TASC 2026 Portfolio diversification strategy code Parts 1 and 2.
In part 1 I am getting NaN values in Backtest Results/By Symbol report:
Symbol Profit Positions "% Winners" "Avg Profit %" "Avg Bars Held" "Max Drawdown" "Profit Factor"
EFA 77164.1947745912 1 100 58.68 156 -18838.82 NaN
GBTC 931868.5639448166 1 100 350.156 -988018.83 NaN
GLD 1078454.5482788086 1 100 165.39 156 -80579.05 NaN
QQQ 833968.358 1 100 105.788 156 -309403.07 NaN
SHY 14406.784 1 100 11.076 156 -1629.749 NaN
SPY 399004.055 1 100 76.115 156 -138703.572 NaN
In Part 2 I am receiving error messages in line 38:
PreExecute Exception (7/5/2024) Line 38 - Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
PreExecute Exception (7/12/2024) Line 38 - Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
PreExecute Exception (7/19/2024) Line 38 - Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
PreExecute Exception (7/26/2024) Line 38 - Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
PreExecute Exception (1/3/2025) Line 38 - Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
PreExecute Exception (1/10/2025) Line 38 - Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
PreExecute Exception (1/17/2025) Line 38 - Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
PreExecute Exception (1/24/2025) Line 38 - Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
PreExecute Exception (1/31/2025) Line 38 - Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
PreExecute Exception (7/3/2025) Line 38 - Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
PreExecute Exception (7/11/2025) Line 38 - Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
PreExecute Exception (7/18/2025) Line 38 - Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
PreExecute Exception (7/25/2025) Line 38 - Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
PreExecute Exception (1/2/2026) Line 38 - Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
PreExecute Exception (1/9/2026) Line 38 - Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
PreExecute Exception (1/16/2026) Line 38 - Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
PreExecute Exception (1/23/2026) Line 38 - Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
PreExecute Exception (1/30/2026) Line 38 - Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
at WealthScript2.MyStrategy.PreExecute(DateTime dt, List`1 participants) in :line 38
at WealthLab.Backtest.UserStrategyExecutor.CreateIdentifier(List`1 lst, DateTime dt)
In part 1 I am getting NaN values in Backtest Results/By Symbol report:
Symbol Profit Positions "% Winners" "Avg Profit %" "Avg Bars Held" "Max Drawdown" "Profit Factor"
EFA 77164.1947745912 1 100 58.68 156 -18838.82 NaN
GBTC 931868.5639448166 1 100 350.156 -988018.83 NaN
GLD 1078454.5482788086 1 100 165.39 156 -80579.05 NaN
QQQ 833968.358 1 100 105.788 156 -309403.07 NaN
SHY 14406.784 1 100 11.076 156 -1629.749 NaN
SPY 399004.055 1 100 76.115 156 -138703.572 NaN
In Part 2 I am receiving error messages in line 38:
PreExecute Exception (7/5/2024) Line 38 - Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
PreExecute Exception (7/12/2024) Line 38 - Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
PreExecute Exception (7/19/2024) Line 38 - Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
PreExecute Exception (7/26/2024) Line 38 - Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
PreExecute Exception (1/3/2025) Line 38 - Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
PreExecute Exception (1/10/2025) Line 38 - Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
PreExecute Exception (1/17/2025) Line 38 - Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
PreExecute Exception (1/24/2025) Line 38 - Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
PreExecute Exception (1/31/2025) Line 38 - Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
PreExecute Exception (7/3/2025) Line 38 - Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
PreExecute Exception (7/11/2025) Line 38 - Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
PreExecute Exception (7/18/2025) Line 38 - Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
PreExecute Exception (7/25/2025) Line 38 - Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
PreExecute Exception (1/2/2026) Line 38 - Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
PreExecute Exception (1/9/2026) Line 38 - Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
PreExecute Exception (1/16/2026) Line 38 - Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
PreExecute Exception (1/23/2026) Line 38 - Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
PreExecute Exception (1/30/2026) Line 38 - Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
at WealthScript2.MyStrategy.PreExecute(DateTime dt, List`1 participants) in :line 38
at WealthLab.Backtest.UserStrategyExecutor.CreateIdentifier(List`1 lst, DateTime dt)
Rename
Let's get you going starting with Part One first.
Let's try creating a new DataSet called "TASC Feb 2025" and add these symbols:
AGG EFA GBTC GLD QQQ SHY SPY
Now, select this DataSet in Part 1 in the "Select Backtest DataSet" drop down of the Strategy Settings tab.
Run the backtest. Do you see some results now?
Let's try creating a new DataSet called "TASC Feb 2025" and add these symbols:
AGG EFA GBTC GLD QQQ SHY SPY
Now, select this DataSet in Part 1 in the "Select Backtest DataSet" drop down of the Strategy Settings tab.
Run the backtest. Do you see some results now?
Your Response
Post
Edit Post
Login is required