Exporting positions, or strategy monitor?
Author: heech
Creation Date: 10/29/2008 11:23 AM
profile picture

heech

#1
Hi there,

Is there any way to export all of the data from the strategy monitor, for continued execution on a different system? (As backup?)

The only reason I don't just copy the strategies over and copy by hand... well, it took me a while to get my head around this, but I better understand now that the strategy monitor is essentially state-less. It remembers nothing from previous runs, and reruns all of the activate strategies with specified parameters on data. The only state that seems to be carried over would be positions (and perhaps alerts?).

But as it happens, positions is one of those things that I look at, in order to calculate a "total strategy performance" parameter. ... I guess I could re-run the strategy over *all* of the bars again to regenerate... and maybe that's the recommended approach?
profile picture

Cone

#2
You can export any data that you program to export. A Strategy is C# code. Anything that the Strategy has access to, you can export.

When the SM executes, it's always a fresh "theoretical" execution over the data range and symbol(s) specified. The reaults won't change except for those that correspond to the new bar entering the range.
profile picture

heech

#3
Cone,

I think I might have just had an epiphany on this point...

Does "ActivePositions" have any real meaning in the Strategy Monitor? I was working on the assumption that it did, that the system was logging all of the actual executions (generated by the strategy), and that I could pull out their entry/exit values for some analysis.

Or, is "ActivePositions" only a hypothetical set of *possible* positions, generated by running my code over historical data every time a new bar arrives?

I saw a mention in one of the documents about "synchronizing" portfolios, and that it wouldn't be available until a future version of WL5. Is that what I'm missing here, if I want to see actual executions?
profile picture

heech

#4
I must be missing something here... if ActivePositions was only hypothetical set of possible positions, then LastActivePosition would be as well, and then we wouldn't even know if our Sell/Close calls made sense.

Can someone give me the view from 35,000 sq ft on how auto-trading and positions work together? Thank you.
profile picture

Cone

#5
QUOTE:
Does "ActivePositions" have any real meaning in the Strategy Monitor?
Active positions are those that the Strategy thinks are active theoretically.


QUOTE:
I was working on the assumption that it did, that the system was logging all of the actual executions
Bad assumption. Version 5 does not do this at all. However, there will be more support in 5.3 (later this year) to "synch" to Positions in your portfolio with respect to exit Alerts.

For example, in 5.3, if a Strategy creates an Alert for a Position that does not exist in your account, that Alert won't be Staged or Placed to avoid the back-end error.

QUOTE:
Or, is "ActivePositions" only a hypothetical set of *possible* positions, generated by running my code over historical data every time a new bar arrives?
Precisely.

QUOTE:
we wouldn't even know if our Sell/Close calls made sense.
Right, but it won't matter in 5.3. Those Alerts will be "eaten" and never Staged or Placed.
profile picture

heech

#6
That's definitely a bad assumption on my part. I need to go back to the drawing board on this.

I guess one intermediate approach is to dump my actual trades into an external file... but that's only assuming I have *some way* of knowing whether trades actually closed. Is there any mechanism at all for getting access to "official" execution confirmation (doesn't even have to be actual portfolio balance) from inside WL?
profile picture

Cone

#7
The only way of knowing is to manually check either the Orders or Accounts tools for fills. There isn't any feedback to the script.
profile picture

heech

#8
I guess this explains Fidelity's advertising (top of this page), suggesting this platform be used for back-testing.

I'm more looking for an always-on automated trading tool, and without a real-time look at actual trading results... whatever I kludge together will be pretty crippled.

I don't mean to be critical. The application is giving me an opportunity to do much more than I thought was possible (without hooking up my own framework)... so I'm appreciative. But can I get an updated timeframe of when a version with live position support (and ideally more order choices, like OCO) will be available? I wouldn't mind being a beta tester, if the job's available.
profile picture

Cone

#9
The only real concern that I see is if you're using a stop/limit Strategy. For these order types, it's possible that price "touches" your order in which case you'd be filled theoretically, but not actually. Consequently, your strategy would process the exit logic for a Position that you don't own, and in 5.3 and up, those Alerts would be "eaten" and never placed. Also, it may be the source of a missed opportunity if prices would have eventually reached your entry price.

You should call Fidelity (we're not Fidelity) and express your concerns. As far as I know there are no plans to feedback account information to scripting.