Stock sells without creating an Alert
Author: superticker
Creation Date: 6/18/2016 2:47 PM
profile picture

superticker

#1
As shown in the attachment, ININ has sold on Friday, 6/17/2016, without ever flagging an attachment the day before. I'm trying to figure out what to do about these occurrences, which happen about once out of 40 trades.

Some have suggested the EMA/IIR-type indicators are unstable with their precision. Well, that's true of course. They will return different results for the N-1 bar verses the Nth bar for the most recent (i.e. most highly weighted) bars. But an error like this would typically only lead to this behavior in about one in 300 trades (i.e. an inconsistency in the 2.5 decimal place). And this is happening more often than that (i.e. inconsistency in the 0.5 decimal place).

I also thought the price of ININ might have changed between midnight (when I do my updating) and when there's trading on the following day. And that can indeed happen, but that wasn't the in this case here.

So I'm asking, how are users living with this weird behavior?

1) Do you add a hysteresis effect (or "gap offset") to the bar+1 case in your strategies to allow them to trigger 0.5 decimals earlier than they would with any other bars? If so, how is that working for you?

2) Do you have a mechanism to flag out-of-sync stocks at the end of each trading day? If so, how are you doing that?

3) Are you handling this in a more creative way?
profile picture

superticker

#2
Here's the attachment for the original post.
profile picture

Eugene

#3
Although I'm not arguing the effect of unstable indicators, the topic title sounds confusing to me. It's not (and can not be) clear from the screenshot if the Strategy instance has held ININ in the Strategy Monitor at all. ININ was sold in the Strategy Window (SW) after creating a valid Alert. Remember, SM and SW are independent in many ways i.e. the SM runs its own compiled copy and won't pick up changes unless the tool is restarted, operational difference (see the User Guide), they can run with different settings (position sizing, PVs applied or not) etc. Moreover, there may exist a subtle coding error. And like you said, the data may have been adjusted overnight - what if you re-run it in the SM via "Run this strategy now"?
profile picture

superticker

#4
QUOTE:
Remember, SM and SW are independent in many ways i.e. the SM runs its own compiled copy and won't pick up changes unless the tool is restarted,...
Correct. This was observed in production code, which hasn't been recompiled in over a month. And all the settings are the same for both SM and SW cases; both are using Preferred Values for all parameters.

Yes, overnight price adjustments can explain some of these cases. That might be why I'm seeing one in 40 missed Alerts rather than one in 250. That's why I'm thinking you just have to learn to live with this problem. I'm just wondering how best to do so.

Also, I kind of misspoke in my 1) suggestion above. Rather than the bar+1 case, I meant to say the off-the-chart case, which would be generating the anticipated Alert. For example, when a strategy hits the off-the-chart bar (final pass in the trading loop), does temporarily reducing the sell threshold by 3% (or even 5%) eliminate this missed-sell problem for you? And yes, this can only prevent unstable EMA/IIR-based indicators from missing a sell in their highest-weighted final bar. It won't prevent out-of-sync problems caused by after-midnight price adjustments (which do occur).

I'm thinking suggestion 2) is the only full-proof choice, but I would like to hear what others have tried before trying to code this solution (out-of-sync position detector) in a Performance Visualizer tab.
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).