I use a Screen to re-balance some live trading portfolios. Is there a way to force positions into a Screen, similar to the functionality that is available for a Strategy? Alternatively, is there a way to force a position into the underlying Universe being used by the Screen.
There is no way to force a ticker into the universe in the screener. But you can force tickers to pass the rules.
The screen rules are ‘AND’ conditions, so they all have to be true for a stock to pass. So you could add an OR condition to ALL your rules like this:
You could also write the rules on the same line like:
(EPSExclXorGr%5Y >= 15 And EPSExclXorGr%PQ > 25) OR @tickers
Another option would be to use Account() if you are using an Account in Manage to track your holdings and you wanted all of them to appear in the screen (if they are in the universe). You would use Account(xxxx,xxxx) instead of ticker(“ibm, nvda”) where xxxx in Account() are the ids shown in the URL when you are in that account.
Yes, good idea. I used InList() inside SetVar so that you only have to give the list name in one place in case you want to change to a different list later and you have a lot of rules - then you dont have to update InList() in multiple places.
I’m assuming that you just want to re-balance to equal weight and as a result there are no screener rules. If that’s true, just use Portfolio(####) in your screener rules, where #### is the portfolio ID found in the portfolio URL.
EDIT: on second thought, you’re probably already using Portfolio()
I actually do have buy rules. I suspect that some positions are falling out of the screen because they met the requisite volume requirements to enter the trade, but the volume has dropped off since the trade was entered.
Do the other solutions work for you? They seem to bypass the screener rules.
Ok, I’m still unsure about your requirements, but this setup will add your current portfolio holdings to your working universe.
- create a separate screen that references your working universe, name it something - workinguniverse, for example.
- create another screen with your rules and add this to the top of the rules list;
- set the universe of the rules screen to ‘US Stocks (All Listed Stocks)’. That is, make it very broad and inclusive.
Thanks! This worked for me. I imported the list into my Universe rules using the steps you showed above. I then intentionally added some bad stocks to the list, and it worked as expected
Walter - Thanks, as always, for your feedback and help.
The one thing I find odd with this approach … you actually have to manually run the Universe again after you update the list before the Screen recognize will the updates to the Universe. I really hope this is something particular to List, and not Universes.
I’m going to have to look at Danp’s solution again. It didn’t seem to work in my test case. What I’m seeing is that if a stock is missing from the Universe, then Ticker(“MissingStock”) doesn’t return anything. In other words, it doesn’t insert the tickers into the final result.
When using Screen() within a screener, it automatically runs the screen specified in the argument. It was easy-peasy to run. No manual updates required.