Does Strategy Monitor action "xx to be completed" mean code not being executed?
Author: kelvinyip
Creation Date: 1/18/2018 2:09 AM
profile picture

kelvinyip

#1
Sometimes, I see comments like "xx to be completed" in the comment field. Does it mean the entire strategy monitor code won't be executed until all the symbols are updated ? Or it simply runs whatever has been updated ? If it means the entire code will be skipped, is there anything I can do in the code to skip whatever is not updated so the rest of the symbols can be scanned ?

thx
profile picture

Eugene

#2
There hasn't been a "Comment" field in the SM, and the message doesn't look familiar. How does the log look like? Right-click on the Strategy in the SM, choose "Enable logging for selected strategies", then copy and paste once you see it again.
profile picture

Cone

#3
He must be talking about the Action field. Generally the action text aren't very user friendly since they were added for non-production debugging, initially. Later they were enabled for production.

Anyway, the S. Monitor doesn't have to wait for all the symbols to be update because it never runs in a true Portfolio Mode. That's why we recommend Raw Profit sizing (see "Operational difference between the S. Monitor and Backtester" in User Guide > Strategy Monitor chapter).

Nonetheless, the User Guide indicates that the S. Monitor executes strategies with intervals 5 minutes and lower "as soon as updates are retrieved on a per-symbol basis". Higher intervals are executed "after all data are collected for the DataSet or after 90 seconds have elapsed".

QUOTE:
is there anything I can do in the code to skip
No. But make sure that...

1. your local clock is synchronized,
2. you update your DataSet with the Data Manager prior to the open.
2a. Check the DataSet's Details view after an update, reverse sort by date, and REMOVE any symbols that are no longer valid!. The Fidelity Data Management view can help with removing dead symbols too.
3. you start the S. Monitor prior to the open - especially for intervals below 5 minutes.
profile picture

kelvinyip

#4
I think my problem must be on 2a, what happens if it got symbols that are not valid ? Does it simply skip that symbol or the entire run aborts ?
I have this 15 min strategy and it gives say 5 alerts during the day and I see them on alert, order and email. If I run the strategy as a backtest at the end of the day after I manually updated my 15min universe, I get additional trades/alerts..... so I was guessing that somehow it skips some of the executions...

Any guess as to why it might skips some signals ?
profile picture

Eugene

#5
QUOTE:
Does it simply skip that symbol or the entire run aborts ?

Neither of the above. The SM tries to re-request a symbol that isn't up to date, wasting time on it.

QUOTE:
Any guess as to why it might skips some signals ?

No idea but they might emerge after providing the SM log (see above), and Strategy code and your SM settings.
profile picture

kelvinyip

#6
hmm sometimes, I see Fidelity symbols don't update till much later in the day , perhaps that's why.... thx
profile picture

kelvinyip

#7
What does this mean "28 symbols left"

1/18/2018 9:01:00 AM: Update Completed(2): FBR (28 symbols left)
1/18/2018 9:01:00 AM: Leaving Update Completed
profile picture

Eugene

#8
Have you already removed all the invalid symbols? If so, how does the DataSet composition look?
profile picture

kelvinyip

#9
better use that Fidelity feature to remove symbols then but what functional impact does it have when I get "Update Completed(2): FBR (28 symbols left)"
profile picture

Eugene

#10
Have you noticed any functional impact?
profile picture

kelvinyip

#11
I just assume that I am missing trades because of this but not sure... like I said before, if I run the same code EOD, I get additional signals. My guess is Fidelity didn't update all the quotes intraday so I am missing trades but ""Update Completed(2): FBR (28 symbols left)" sounds like it could be a problem.
profile picture

Eugene

#12
There's no need to assume, and I'm not a fan of guesswork. If you wish to get a move on with this then please provide what a technician (yours truly) asked for:
QUOTE:
No idea but they might emerge after providing the SM log (see above), and Strategy code and your SM settings.

I have no idea what "additional signals" there are so knowing the DataSet, data loading range and position sizing would be necessary. If Stop/Limit orders are in use then Wealth-Lab's Preferences which concern trading might also help. tia.
profile picture

kelvinyip

#13
no stop or limit, like buyAtMarket(bar+1)

1/19/2018 7:31:03 AM: Build Results: BMY Alerts: 0
1/19/2018 7:31:03 AM: Replace Alerts: BMY Alerts: 0
1/19/2018 7:31:03 AM: Update Completed(2): BMY (31 symbols left)
1/19/2018 7:31:03 AM: Leaving Update Completed
1/19/2018 7:31:03 AM: Build Results: HRS Alerts: 0
1/19/2018 7:31:03 AM: Replace Alerts: HRS Alerts: 0
1/19/2018 7:31:03 AM: Update Completed(2): HRS (30 symbols left)
1/19/2018 7:31:03 AM: Leaving Update Completed
1/19/2018 7:31:03 AM: Build Results: CNO Alerts: 0
1/19/2018 7:31:03 AM: Replace Alerts: CNO Alerts: 0
1/19/2018 7:31:03 AM: Update Completed(2): CNO (29 symbols left)
1/19/2018 7:31:03 AM: Leaving Update Completed
1/19/2018 7:31:03 AM: Build Results: EBS Alerts: 0
1/19/2018 7:31:03 AM: Replace Alerts: EBS Alerts: 0
1/19/2018 7:31:03 AM: Update Completed(2): EBS (28 symbols left)
1/19/2018 7:31:03 AM: Leaving Update Completed
1/19/2018 7:31:03 AM: Build Results: FOX Alerts: 0
1/19/2018 7:31:03 AM: Replace Alerts: FOX Alerts: 0
1/19/2018 7:31:03 AM: Update Completed(2): FOX (27 symbols left)
1/19/2018 7:31:03 AM: Leaving Update Completed
profile picture

kelvinyip

#14
Just buying 1 share with starting capital 1000000, trying to get a signal not caring about the actual sizing. hmm I better check that setting.
profile picture

Cone

#15
QUOTE:
Update Completed(2): FBR (28 symbols left)" sounds like it could be a problem.
Just the opposite. Update completed(2) indicates a successful update and all processing is complete. "n symbols left" tells you just that - how many symbols remain to be updated on that interval.