News Focus
News Focus
icon url

Tony G

05/01/09 4:51 PM

#78 RE: mattie633 #77

Yes I know exactly what your issue is. In real-time "live" trading, I have found that it only takes 1-2 seconds once your condition is met for Strategy desk to trigger and fire a trade.

If you are using a strategy that uses the current bar, such as Bar[Close,D] that value changes every second (or less) throughout the day as trades are taking place. But on a backtest scan, it will only look at the closing price of each Daily bar. So...if your condition was met sometime during the day, but was NOT true at the 4pm end of the day, it WILL trigger in live trading but NOT in backtesting. Does that make sense?

To have your backtest better represent live trading, check the box under the Backtesting dates that says "Test every 1 minute bar inside the interval bar" This will take alot longer, but will give you a better idea how your strategy would really work Live. It will check every 1 minute in your date range to see if your condition is met, without changing your formulas. It's not as perfect as testing every second, but I've found that it's good enough.
icon url

Tony G

05/01/09 5:47 PM

#79 RE: mattie633 #77

Mattie -

Just curious, are most of your strategies based on Daily bars and triggers, or more intraday?

Here is an example of one I entered last week. I hate trading oil, so I let the program do it.

On 4/23 my Daily strategy gave BUY triggers in DXO and CVX. The DXO chart looked the best so I let it buy that one. Stop loss is under 2.40. Volume was light so the trade is risky. Here's the chart I captured on 4/23 entry.



Model Backtesting:

BUY 12-29-08 9:31 am @ 2.22
SELL 01-07-09 10:31 am @ 3.20 (+44% gain)

BUY 02-19-09 1:02 pm @ 1.96
SELL 03-25-09 9:31 am @ 3.05 (+55% gain)

BUY 04-23-09 9:31 am @ 2.63

** I got bored watching this and wanted into something else, so I manually took profits yesterday at 2.75. I left money on the table as today it hit 3.00 ** oh well. Incidentally, the S&P 850 puts I bought with that money went down today. Should have left the computer alone.
icon url

FreshlyBlended

05/16/09 10:57 AM

#286 RE: mattie633 #77

Sounds like you really need this functionality too :-)

Why don't you find a system to work with your formula instead of a formula to work with your system?

This tick by tick data has to much noise and I am ok looking at closed bars. If your evaluating your formula tick by tick its like playing a game of whack-a-mole! LOL!

icon url

JohnPS

05/16/09 10:15 PM

#310 RE: mattie633 #77

Very interesting forum, it is pulling together a lot of talent and enthusiasm.
I hope this reply isn't too late to the game. This topic of writing the most incredible mouth watering backtests rings very true in me, I spent several months in this mind trap dreaming of $$'s. After perfecting my best formula, something that would be like a day trader, in and out of a stock several times a day, buying at the low and selling at the high, it was converted from backtest to real time by the advise of the SD people and all of the terms were set to 1 bar ago so that it would trigger on closed data. My big day on Wall Street had arrived!
I was new to running with saved orders to test in real time and it was very disappointing, the triggers were always 1 bar to late for entries and exits, in this case 12 minutes. This began the unraveling of my misconceived approach, Jason T at SD explained it all to me. I was writing the Strategy in a 12 min interval and back testing in a 1 min screen in SD. This is a big "no can do". A 12 min formula must be BT'd in a 12 min window in SD. Pages of explanation could be offered here to explain it all, let me say this; when I write a formula with a 1 min intervals and go thru the BT drill, get the results I am after, and then convert the formula to 1 bar ago it works perfectly in real time saved orders. I can run with saved orders during the day, come home from work at 5:00 pm, download the days results to Excel and run a backtest with the unconverted formula and it corresponds within seconds. I have done this several times with different formulas and stocks and on different days. It always corresponds within the minute. The same would be true with a formula written with a 10 min interval that was backtested in a 10 min SD window.
This is my rule #1, always BT in the same interval that the formula is written in.