Test for Peeking?
Author: swuzy
Creation Date: 5/6/2009 4:51 PM
profile picture

swuzy

#1
I have impression that there was some way to test a WL5 strategy for peeking. I tried to search for it, on the net version, but cannot find it.

Is there some way to test a WL5 strategy for peeking?

Thanks.
profile picture

DrKoch

#2
For WL4 I created a script called "PeekChecker". At that time I hoped WL staff would pick it up and add this functionality to the WL core because I consider this a very important feature given the fact that there are many ways to peek into the future with the current design of WL4.

They didn't however.

I hoped that WL5 would make the best of the new .Net architecture and change the internal architecture a bit to make peeking impossible (which is rather simple).
They decided to keep the basic architecture as it is with all its danger for (even unintended) peeking.

So I keep on hoping that something along the lines of "PeekChecker" find its way into WL5's code base.
profile picture

Cone

#3
If you follow a few simple rules, there's no reason to write code that peeks - especially now that you can't mix AutoStops with manual exits in V5.

See WealthScript Programming Guide: Programming Trading Strategies > Peeking

The topic I thought I had included, but didn't, is the one about "good peeking". There are a handful of reasons to peek in code (like checking if a limit order hits on the next bar to manage a Split position), and these are perfectly valid for trading in real life.
profile picture

swuzy

#4
I do request that some means of peek testing could be implemented for WL5.

Or alternatively, having a "walk forward mode" whereby the strategy could be run in a restricted way, such that a "future bar" could not be loaded or utilized until it is the current bar. Sure it will probably run a lot slower, but it is a validation or confirmation mode.

I feel that many WL users might at some point of time, voice the words and thoughts below, or similar words and thoughts, while backtesting their various strategies.

"I don't trust some of my back test results, and I don't trust being able to analyze what I have put together to ferret out any peeking exposure. The results are fishy, or don't smell right, or are too good to be true. Yet at this time, I would rather not share or publicize my neophyte codes, just in case of the unlilkely and improbable event the codes actually are valid. I would prefer not to have to waste several months or quarters papertrading several strategies, just to determine the promises were false and invalid or not achievable in real trading."






profile picture

Cone

#5
Peek checking isn't on the radar. If you're a Fidelity customer, call them and tell them you want it.

Anyway, there's a pretty easy way to verify if it's peeking or not - paper trade it for a few weeks. If one or more signals (test them all) aren't popping up when they should, or Alerts do not pop up at all yet there are trades on the chart, it's peeking.

Also, if you don't want to post your code, we'll debunk it in Support (consider it added to "what we support"), where we promise not to disclose.
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).