Help using !Portfolio

I am trying to minimize overlap between portfolios and to check it I am using the !Portfolio(“Name”) function, but I have noticed that often times it is not working as I expect it to.

To test it, I have used a simulation “Filips Super value 76 5stkS” https://www.portfolio123.com/port_summary.jsp?portid=1220625

and created a screener “FSVTest” - https://www.portfolio123.com/app/screen/summary/112710?mt=1

with the last line being: !Portfolio(“Filips Super value 76 5stkS”). Both are rebalanced weekly, and when I check the holdings for the same weeks/days many positions appear in both.

Am I doing something wrong?

Thank you.



Could someone from P123 help please?
Thank you.

I have used the screen(“”) function for screens but I have never tried the Portfolio(“”) function when using a screen. I assumed (wrongly I guess) that one was only for screens and one was only for portfolios - but didn’t think that you could use the portfolio function when using a screen.

I am not much help but wanted to throw in my 2 bits.

I would not expect it to work in a sim. I have not used it much so I could be wrong on this. Still, I would expect Portfolio(“”) to give you the present holdings today only (9/4/2014). I do not believe that it will cycle through the weeks (weekly sim) as the sim or screen progresses. So if you have 10 holdings today in the portfolio, then perhaps if you use !Portfolio(“”) the sim or screen will not buy those 10 stocks. It will not know what the holdings in the port were a year ago, say.

Could be wrong but if it is not working this could be why.

Thanks for your comments hemmerling and Jrinne, unfortunately, Potfolio is a function that does not work on a Simulation or Portfolio, so I assume it must be for Screener.
You are right Jrinne, it works fine on the last screen/portfolio date, but just does not iterate through the past. I dont see a great utility in it if it only looks at the last date though. I would have hoped there is a better way to check and avoid duplication in portfolios/books, instead of calculating it manually in excel comparing portfolios.

Marco, any thoughts on this please? :slight_smile: Thanks!

The Portfolio function is not truly point in time. It only returns true if a security is in the holdings of the given portfolio or simulation. “The holdings” is not retained point-in-time. This means that if a portfolio last traded 2 years ago, it is returning the holdings as it existed then, and if a simulation ran through the middle of this year and you run a screen with Portfolio in it as of last year, you’ll get this year’s holdings returned from the Portfolio function.

In other words, a given portfolio or simulation only ever has one set of holdings.

Hi Paul,

Could the Portfolio() command be made to work in a Book Sim or Port? It seems these must run somewhat simultaneously if weights are being adjusted.

Bill

iavanti,

!Portfolio does have at least 1 good use. I have a few Ports that frequently buy the same stock. Since I rebalance all my Ports manually, for those Ports, I rebalance one of them and then run the screen that is setup with all the same rules as the other Port, and with !Portfolio to get a list of stocks that are not in the rebalanced Port. The Screen now never lists a stock that is in the other Port. I could just reject the duplicate stocks in the Port, but that only gives me the next highest ranked stock. I set the screen to give be the top 10 stocks so I can review ones I am not already holding and chose the ones I think are best.

Denny :sunglasses: