Streaming disabled for multi-symbol backtests
Author: mikegross99
Creation Date: 8/12/2010 8:10 AM
profile picture

mikegross99

#1
I noticed streaming is disabled for a multisymbol backtest. This prevents the backtest from showing trades that meet the criteria of the backtest from the past few days and skews the results. Is there any way to get recent trades to show in a backtest? Also, is there a delay in posting trading alerts for recent days trades due to the inability to retrieve the most current data?
profile picture

Eugene

#2
Streaming is disabled for multi-symbol backtests. Neither it prevents you from showing trades nor does it skew anything, if your data is up to date. That's a misconception. Note that streaming data (partial bar) doesn't have effect in backtesting because it's performed on complete bars only.

Please be specific about what you're doing, and what hides beneath "get recent trades to show" and "inability to retrieve the most current data" because it's too vague.
profile picture

mikegross99

#3
Hi,

I run the "RSI Agita" backtest on a dataset with multiple symbols. The first message I receive is "Streaming Mode will be disabled for strategy window. Continue?" I click "Yes". The backtest is run and I review the results. I also click on the individual symbol for HPQ and the chart only reflects bars through 8/9/10. I assume this means that because streaming is disabled when the backtest is run, I don't have the most recent data. If I click the "stream" button while focused on the HPQ symbol, the chart refreshes with data through 8/11 and I receive a buy alert for HPQ.

So my question is when I run the backtest, I don't think think any trades that met the RSI Agita criteria (ie the trade that was referred to in the buy alert) would be included as open trades in the backtest performance results. I am not sure what you are referring to when you say...Please be specific about what you're doing, and what hides beneath "get recent trades to show" and "inability to retrieve the most current data" as I did not refer to any messages like this in my original posting.

Thanks
profile picture

Cone

#4
Simple. You've got 2 options.

1. Turn on "Update Data on Demand" (in File menu and Data Manager). With this option on, Wealth-Lab will make sure you run with the most-recent static data bars. The bad thing about this option, however, is using it for MSBs - it updates the symbols one at a time, so it makes the backtest seem like it's running slowly.

2. Before running the backtest, perform an update on the DataSet using the Data Manager. Data Providers can usually update an entire DataSet faster than doing it one symbol at a time.
profile picture

mikegross99

#5
I checked and I had "Update Data on Demand" turned on in both places. Also, prior to running the backtest, I performed an update on the DataSet using DataManager. I checked the log and it had run successfully. I reran the backtest on the Dow 30 and accessed the HPQ chart and it still shows the last bar as 8/9 with the stream button disabled. The trades tab does not include the 8/12 trade for HPQ which should have been included because HPQ's RSI crossed below 35 (my oversold criteria) on 8/12. When I enable the stream button it shows bars as of today - 8/12/10 and HPQ shows the 8/12/10 trade based on HPQ meeting the oversold criteria (cross below 35).
profile picture

mikegross99

#6
I found the problem and it is an easy one to resolve. I forgot to change the end date in the date range for my backtest to 8/12. It was set at 8/9 for a backtest I ran on that day. I think I am all set. Thanks for your help.
profile picture

Cone

#7
The Streaming provider doesn't backfill historic bars, the Static provider does that. The Static provider backfills when requested in the above mentioned two cases AND when a Streaming chart is requested. So, it's difficult for me to determine why (or how) you can have this problem.

QUOTE:
When I enable the stream button it shows bars as of today - 8/12/10
I'm going to assume that you're using Daily bars. If so, the 8/12/10 bar during the trading day should have no effect on the script because that bar's data is (was) not complete and is not available to the script.

1. Who's the data provider?
2. What's the chart scale?
3. What are the symbols/Dataset?
profile picture

mikegross99

#8
To clarify my last email, the historical data issue was resolved when I changed the end date from 8/9 to 8/12. When I ran the backtest on 8/12 it picked up buy signals (as open trades) through 8/11. Ideally, if I run the backtest on 8/12 I would like to see buy alert signals as of 8/12 (the day I run the backtest), not 8/11. Is this possible?

I would like to receive an email alert the very moment the price of the stock meets my criteria for oversold (ie RSI = 35). Also I would also like to see these same alerts in Strategy Monitor on the day (preferably the very minute of the day) the oversold criteria is met. Is this possible?

1. Who's the data provider? Fidelity, MSN, Yahoo Finance
2. What's the chart scale? Daily
3. What are the symbols/Dataset?

AAPL ABC ABV ACL ACTL ADTN AER AGP AHGP AIXG AKAM ALB ALGN ALTR ALV ALXN AMMD AMT APEI APKT ARMH ARO AVGO AZO BAP BBD BCPC BIDU BMA BMRN BMY BOFI BRCM BVN CAAS CACC CAVM CBD CBRL CBT CHRW CIB CISG CLB CLF CMCSA CMCSK CMG CMI CNI CNK COLM CPLA CREE CRM CRUS CRVL CSFS CSTR CTL CTRP CTSH CTXS CXO CYT DD DECK DGIT DISCA DKS DLB DLTR DPS DRC DTV EDU EGO EL EMC EPB EW EZPW FCFS FDO FFIV FMX FNSR FOSL G GDI GIB GIL GMCR GWR HAS HDB HLF HMIN HMSY HRS HS HSP HUM HWK IACI IAG IDSA IDT IHS ILMN INFA IPGP ISLN IT ITUB JAS JKS JOBS KSU KWR LCAPA LEA LFL LFT LIHR LII LSTZA LULU LVS LXK LZ MANH MCHP MED MELI MGA MICC MMP MMS MRX MSB MTB NEM NETL NFLX NGLS NRGP NTAP NVO NZ OPEN ORLY OVTI PAY PCLN PCP PII PPO PRAA PRGO PTI PXD RBCN RES RHT RMD ROC ROVI RVBD SAM SAN SCL SFLY SFSF SHOO SHPGY SINA SLH SLW SOA SRCL STRI SUN SVR SWKS SYNT THOR TKR TNC TPX TRW TSCO TSL TSU TWC TWTC UA ULTA VECO VGR VIT VLTR VMW VOLC VQ VRSN VRX WBMD WCRX WPZ WRLD WYNN XEC XLNX

profile picture

Cone

#9
QUOTE:
the historical data issue was resolved when I changed the end date from 8/9 to 8/12.
Sure, if you don't allow the most-recent data to be loaded, then it won't!

QUOTE:
alert signals as of 8/12 (the day I run the backtest), not 8/11. Is this possible?
You'll see Alerts generated based on the most-recent bar data available. If it's 8/11, then it's generating Alerts for (ergo, "Actions to be taken on") 8/12. If the last bar is 8/12, then it's generating Alerts for the next trading day (bar), and so on. The same idea applies to intraday... always generating Alerts for the following bar.

QUOTE:
I would like to receive an email alert the very moment the price of the stock meets my criteria for oversold (ie RSI = 35). Also I would also like to see these same alerts in Strategy Monitor on the day (preferably the very minute of the day) the oversold criteria is met.
Either you're trading daily bars or intraday bars. If you want Alerts during the day, then you need to be using intraday bars. If RSI is based on Daily bars, then it's possible to create this daily RSI value during the day with intraday bars, but it will be changing all throughout the day and won't settle on the final value until the end of the day. So, taking action on a Daily-based indicator in the middle of the day somewhat invalidates a Daily strategy; but that's up to you, and it's definitely possible to shoot oneself in the foot.

Example: The Strategy buys when Daily RSI crosses under 35. During the day, based on the current price, RSI can cross below and above 35 many times, and let's say this happens but it settles at 38 at the end of the day. If you bought based on the first crossunder, then you're holding a Position in your live account that your Strategy does not "know about". In other words, you have a Position to exit, but your Strategy will be trying to buy again the next day.

Tip:
Check out the RevEngRSI (Reverse-Engineered RSI) in TASCIndicators. With it, you can determine the approximate price level required to reach a specified RSI value.

Re: 1, 2, 3
The questions were based on the inability to get the latest data from your static provider. Since you weren't requesting the latest data to be loaded, it's a "User error" ;) Lesson learned: Don't use a Date Range unless you really want that. Generally, 1000 Fixed bars, or Last 3 Months, etc. are the best selections to use to always request the most-recent data.
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).