Portfolio Simulation - Single Open Position (per Symbol)
Author: hlh
Creation Date: 3/30/2012 5:52 AM
profile picture

hlh

#1
Hi

Had an interesting discussion yesterday in which one of my friends mentioned that he thinks that WL when in Portfolio Simulation mode does not enter some symbols even if there would be money enough. Hope I can explain his thoughts:

WL does run thru each symbol and assigns 1 share if there is an entry signal. But, if on the next day there would be still another entry signal it would not enter a new 1 share position if coded as singel position per symbol strategy, right or wrong?

So if on the day before other positions using up the equity would have been closed there would not have been entered a new position on that symbol (correct) but also not today as WL has "locked" it as it thinks it has one opened yesterday.

Hope I could make clear the thoughts behind it. As I do not know how WL works, I guess this is something to be taken into consideration if it would be done that way.

Thanks!
profile picture

Cone

#2
The strategy runs in a raw profit mode, and if you create a signal on a bar, you'll enter a Position on that bar. If you create 10 signals on a bar, then there will be 10 Positions. Holding a Position has nothing to do with Portfolio Equity because that concept does not exist in Raw Profit mode. So, the Positions are there.

Cash available comes in when sizing Positions. Positions are sized in order of Priority, which is random unless you assign it or select the Worst-case simulation in Backtest Preferences.
profile picture

hlh

#3
Not sure if that covers what I mean:

In a single pos strategy I only enter if there ist no position active in that symbol:
CODE:
Please log in to see this code.


So, even in raw profit mode I guess WL would not generate a signal on bar + 1 if there was one at bar (as on bar + 1 a position would be active).

In real world, one might not have entered a position on that day (bar + 1) as there was no equtiy available! So on the next day (bar + 1) the entry condition still might be true ( indicatorX < valueY ) and one would go and buy that symbol the next day (bar + 2).

WL would not to that, right? In raw profit mode because it has an active postion, and in portfolio because it thinks it would have one which it might not (as there was no equity to enter that position).
profile picture

Cone

#4
The answer was that if the script executes a signal on a bar, a Position will be created on that bar. Consequently, if a single Position script is already holding a Position, then no matter what the conditions to enter another Position, it won't because the script will no execute the signal. By definition, the logic is mutually exclusive.

QUOTE:
In real world, one might not have entered a position on that day (bar + 1) as there was no equtiy available! So on the next day (bar + 1) the entry condition still might be true ( indicatorX < valueY ) and one would go and buy that symbol the next day (bar + 2).
OK! This is the meat of the argument. You're precisely correct, and this case is covered in the User Guide: Strategy Window > Backtesting Strategies > Inside a Portfolio Simulation > Single-Position Strategies with multiple triggers
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).