Factor and data series importing

Wunderbar, Yuval!

There has been a lot of discussion and it has me interested.

It will be nice to thoroughly test how piggybacking off of ETFs works.

Thank you.

-Jim

Yuval that will be great having all those ETF holdings in P123.
You can even charge a few $ extra for this add-on.

As you may know I have had this idea already almost 6 years ago when I periodically downloaded the holdings of USMV and VDIGX. At that time it was difficult to decide what ranking system and rules to use, for obvious reasons.

Now, I have all the stocks for USMV in a stock factor and can check on how a port would have performed with various number of stocks from USMV , and different ranking systems and rules.

I can confirm that I can always outperform the ETF easily. Attached is a screen of the Top25 from USMV since approx. date of inception of USMV.

We can also contemplate running shadow ETFs this way, that would be very annoying to the ETF providers, but there is nothing they can do about it because they have to publish their holdings every day.


I thought this was the correct syntax for stock factors series. But i am getting some errors
2020-01-25 INTC 1
2020-01-25 CRM 1
2020-01-25 NOW 1
2020-01-25 BLK 1
2020-01-25 BMY 1

can someone help me out?
I did the same thing before for a different series and that worked fine

Your date syntax is wrong.
Should be
2020/01/25 INTC 1

You’re missing the commas.

The comma’s are there.

this is the error i get
Line 5: Third column must specify a value

Do you have spaces after the tickers?

You don’t need commas.
In the excel file:
1st col is the date
2nd col is the symbol
3rd col is 0 or 1

Interesting. I’ve been using commas and if there’s a space within the ticker field, I get an error;

2020-01-27,IBM ,1

let me check that. Thanks Walter

Folks, you’re not reading the specs.

So Georg, the date format you’re using is fine because we support it, but we recommend YYYY-MM-DD. CSV files all have commas (CSV stands for comma-separated-values). If you save an Excel file as a CSV file it will show commas instead of tabs or boxes. Walter is right: 2020-01-27,IBM,1 will work fine, but if there’s a space in there, it won’t.

Also, RTNL, if you’re using Excel and putting the values in different cells, don’t put the commas in, they’re put in automatically when you convert the file from Excel to CSV.

Oh, so that’s why spaces make an error;

2020-01-27,IBM ,1 becomes 2020-01-27,IBM,1

Walter

thanks guys - spaces were the issue

I really like this feature. This is the top quartile of a blackrock ETF using one of the stock p123 ranking systems. The annualized return of the ETF is <10%


Aaron, it does not look as if this has been implemented yet?

What works now:
Sell on weekday= 5
Buy on weekday= 6

Georg, it looks like your data set doesn’t implement Walter’s approach. The data should have inserted on Saturday and Sunday in order for the data to be observed at the same time. For the date in question, it should either be on 2012-12-29 & 2012-12-30 to be observed on 2012-12-31 or on 2013-01-05 & 2013-01-06 to be observed on 2013-01-07.

An alternative approach would be to use a single date for each holding period (e.g. 2012-12-31) and import a “0’s” spreadsheet followed by a “1’s” spreadsheet, where the second import would overwrite the 0’s for the symbols which don’t drop out with 1’s. As always, the “0’s” data derived from the “1’s” data by shifting the dates forward by one holding period (without subtracting a day this time) and replacing the 1’s with 0’s.

Aaron, thank you for looking at this.

I checked and found that using Walter’s method and your rules:
Sell on weekday= 7 (Saturday)
Buy on weekday= 1 (Sunday)

gives identical returns to:
Sell on weekday= 5 (Thursday)
Buy on weekday= 6 (Friday)

Both rules result in trading on Monday.
That is good to know because I am getting excellent results by using the “piggy-back” strategy on various base funds with the excellent Ranking Systems from P123.

Also, it would help a lot when uploading a csv-file into a stock factor that the duplicate entries are automatically deleted while parsing the data.

P123 Team,
Stock Factors are a tool to import historic holdings of an ETF or other fund into P123 and use this in stock strategies.

The problem is that P123 only recognizes ticker symbols which are current and delisted symbols which are designated as TICKER^year when they became delisted.

So when a delisted stock is in a CSV upload file without the appended “^year” one gets an error message “Security could not be mapped: TICKER”
Then one has to search for the year when this stock got delisted. I recently tried to upload a file and got over 100 such error messages. Now I have to find the ticker symbols that P123 recognizes for those stocks.

That is just too much work to make the Stock Factors useful. I suggest that P123 posts an excel file of all delisted stock symbols since 1999, together with the historic symbol under which the stock traded. This surely cannot be too difficult to do?

If we had such an excel file one could quickly do a VLOOKUP to find the correct symbol that P123 recognizes now.

Here is a list, good to Aug-06, which I found on the internet, but we need a listing to 2020.
https://web.archive.org/web/20120211024956/http://www.codehappy.net/charts/delisted_stocks.txt

Does this help? It’s a list of all delisted stocks along with their current symbols. Almost all the time the previous symbol will be in there if your lookup tool is smart enough.

You can get this list by going to https://www.portfolio123.com/stocklookup.jsp, typing ^ in the symbol box, and checking Any in the Status line.

  • Yuval

inactive stocks.xlsx (1.21 MB)