Index | Recent Threads | Who's Online | Search

Posts: 116    Pages: 12    Prev 1 2 3 4 5 6 7 8 9 10 Next
Last Post
This topic has been viewed 4838 times and has 115 replies
InmanRoshi
Re: Factor and data series importing

Could someone clarify something for me? (in return I'll give you a market timing indicator)

So I downloaded the data for the Chemical Activity Barometer here ...

https://www.americanchemistry.com/Industry-Impact/Jobs-Economy/Overview/

It's monthly data, released on the 1st day of every month. I cleaned it up and fed it into a data series.

Now I run it in this sim ...

https://www.portfolio123.com/port_summary.jsp?portid=1596278

monthly (4 week rebalance) with this buy rule...

EVAL(IsNA(SMA(2,0, GetSeries("CAB")) >= SMA(4,0, GetSeries("CAB")),True),TICKER("SPY"),TICKER("SHV"))

Sell rule:
1=1

So with 4 week reblancing, this buy rule is essentially comparing the SMAs of 2 months vs. 4 months for the CAB? Up to this point I've always run SMAs on a daily time period, so I'm unsure how it works on monthly..

Attachment cab.JPG (128398 bytes) (Download count: 172)


Attachment CAB2.JPG (55368 bytes) (Download count: 172)


Attachment CAB3.JPG (90864 bytes) (Download count: 169)


Jan 10, 2020 2:48:04 PM       
Edit 5 times, last edit by InmanRoshi at Jan 10, 2020 2:55:41 PM
yuvaltaylor
Re: Factor and data series importing

SMA(2 . . .) always calculates the SMA over the last two bars, no matter how many or which dates are specified in the series. You'll want to use SMA(42 . . .) or higher if you want two months and SMA(84 . . .) for four months.

Yuval Taylor
Product Manager, Portfolio123
invest(igations)
Any opinions or recommendations in this message are not opinions or recommendations of Portfolio123 Securities LLC.

Jan 10, 2020 3:21:52 PM       
wwasilev
Re: Factor and data series importing

SMA(2 . . .) always calculates the SMA over the last two bars,

That's true. I think some of the confusion comes from Custom Series where weekly update frequency makes weekly bars. P123 isn't always clear about issues like that.

Walter

Jan 10, 2020 3:35:12 PM       
SpacemanJones
Re: Factor and data series importing


It's monthly data, released on the 1st day of every month.


Hi Cary, just a note in case you're going for point in time data -- unless they've changed recently - and can't speak to release dates of historicals, but recently they've been releasing the CAB update data mid to late in the month. I follow this in an xls sheet and usually for the month in question it's release anywhere from the 19th to 25th or so + or -. Below are the expected release dates I have recorded for 2020.

Expected CAB Release Dates for 2020
1/21/2020 (this would be for the January datapoint)
2/25/2020
3/24/2020
4/21/2020
5/19/2020
6/23/2020
7/21/2020
8/25/2020
9/22/2020
10/20/2020
11/24/2020
12/22/2020

Jan 10, 2020 8:30:29 PM       
geov
Re: Factor and data series importing

....just a note in case you're going for point in time data -- unless they've changed recently - and can't speak to release dates of historicals, but recently they've been releasing the CAB update data mid to late in the month.

That is correct. Dec data gets released end of Dec. So point-in-time would require the dates not to be the first day of the month, but the 25th day to be safe.

Also one should transfer the data to a growth series, similar to the ECRI WLI.

How to Calculate the Growth series from the Weekly Leading Index

ECRI's weekly Excel spreadsheet includes the WLI and the Growth series, but the latter is a series of values without the underlying calculations. After a collaborative effort by Franz Lischka, Georg Vrba, Dwaine van Vuuren and Kishor Bhatia to model the calculation, Georg discovered the actual formula in a 1999 article published by Anirvan Banerji, the Chief Research Officer at ECRI: " The three Ps: simple tools for monitoring economic cycles - pronounced, pervasive and persistent economic indicators."

Here is the formula:

"MA1" = 4 week moving average of the WLI
"MA2" = moving average of MA1 over the preceding 52 weeks
"n"= 52/26.5
"m"= 100
WLIg = [m*(MA1/MA2)^n] - m

Also one can combine indicators. The 2nd Figure is a sim with the growth rate of the iMarketSignals BCI and the Chemical Barometer CABg.

Attachment Chem Barom Growth.png (130916 bytes) (Download count: 163)


Attachment Stocks or Bonds with BCIg & CABg.png (212386 bytes) (Download count: 164)


Jan 10, 2020 8:45:29 PM       
Edit 3 times, last edit by geov at Jan 10, 2020 8:57:20 PM
superelastic
Re: Factor and data series importing

Thanks so much for this idea, I didn't know I needed it :-) , but it should help keep me from jerking my ports out of the market when things get ugly.

I'm not going to worry about running this on a live port, I think I'll just update a sim with the hedge every weekend, and see if the hedge gets activated.

I tried not to do too much rule futzing here, but after a weekend of playing around with it, I convinced myself I needed rules based on benchmark performance, market breadth, macro conditions and the port's own performance. I used 100% TLT as the hedge, but I will probably experiment with other forms of hedging.

Criticism welcome, don't assume I know what I am doing.

Thanks P123 folks for the data series feature and the hedging module. These are the kind of things that make me embrace the whole platform more strongly.

Russ

Attachment 2020-01-12 16_10_38-Presentation1 - PowerPoint.png (442306 bytes) (Download count: 143)


Jan 12, 2020 3:24:17 PM       
Edit 1 times, last edit by superelastic at Jan 12, 2020 4:46:01 PM
RTNL
Re: Factor and data series importing

..

Attachment ScapTest.csv (1101 bytes) (Download count: 5) (test file to import)


Jan 13, 2020 1:12:24 PM       
Edit 1 times, last edit by RTNL at Jan 13, 2020 3:18:28 PM
RTNL
Re: Factor and data series importing

No worries, found the error!

Jan 13, 2020 3:19:02 PM       
InmanRoshi
Re: Factor and data series importing

Just wanted to send kudos to the P123 staff for implementing these two new features. Though I'm still just scratching the surface on what we can accomplish with them, I'm excited about the possibilities.

Jan 21, 2020 9:35:13 AM       
RTNL
Re: Factor and data series importing

I have only got the holdings from 10/1/2012 of USMV in the CSV input file for Stock Factor $$USMV.

First I ran the screen.
Second I ran a sim to verify the screen.

You can never underperform USMV, if there are at least 3 positions you hold in the sim.

Only one buy rule: $$USMV=1
Only one sell rule: rank<95 & NoDays>12
Universe is All Fundamentals
Ranking= Greenblatt
Slippage = variable
Reconst. and Rebal.= weekly
Max Position Drift= 10

Below are screenshots for 5 and 50 positions. Note the low turnover.

What else should I try?


Hi Georg and others:

I am still trying to get a hang of this. I was successfully able to make the file (the stock factor) aggregate series. How do i now input this to make this my universe for the SIM?

Please clarify

Jan 21, 2020 2:54:39 PM       
Posts: 116    Pages: 12    Prev 1 2 3 4 5 6 7 8 9 10 Next
 Last Post