New technical factors: Pct from Hi/Lo/SMA and Regression End Value

Dear All,

The following factors & functions are now available. All of these could be coded before but the formulas would be quite involved and error prone. These should be much easier to use.

TECHNICAL →PERFORMANCE

Percent From Period High

HighPct(bars [,series]) Percent from high in the period (incl div)
HighPct_W(bars [,series]) Percent from high in the period using weekly series (incl div)
Pct52WH Percent from 52 week high using weekly series (incl div)
Pct3MH Percent from 3 month high using weekly series (incl div)
Pct4WH Percent from 4 week high using weekly series (incl div)

Percent From Period Low

LowPct(bars [,series]) Percent from low in the period (incl div)
LowPct_W(bars [,series]) Percent from low in the period using weekly series (incl div)
Pct52WL Percent from 52 week low using weekly series (incl div)
Pct3ML Percent from 3 month low using weekly series (incl div)
Pct4WL Percent from 4 week low using weekly series (incl div)

Percent From Average

SMAPct(bars[,series]) Percent from SMA (incl div)
SMAPct_W(weeks [,series]) Percent from SMA using the weekly series (incl div)

TECHNICAL →TRENDING

Linear Price Regression End Value

PrcRegEst(bars [,series]) Returns the ending value of a regression of the prices (incl div)
PrcRegEst10 Returns the ending value of a 10 bars regression of the prices (incl div)
PrcRegEst20 Returns the ending value of a 20 bars regression of the prices (incl div)
PrcRegEst50 Returns the ending value of a 50 bars regression of the prices (incl div)

PrcRegEst_W(weeks[,series]) Returns the ending value of a regression of the weekly prices (incl div)
PrcRegEst10W Returns the ending value of a 10 week regression of the weekly prices (incl div)
PrcRegEst20W Returns the ending value of a 20 week regression of the weekly prices (incl div)
PrcRegEst50W Returns the ending value of a 50 week regression of the weekly prices (incl div)

See Fidelity’s Regression Line for chart examples

The above can be calculated using the regression functions, for example

PrcRegEst_W(10) = Eval(LinReg(“Close_W(CTR)”,10),EstimateY(0), NA)

Let us know what you think.

Thanks.

2 Likes

I am assuming that the PrcRegEstxx factors should follow the price similar like an moving average.

But using the Fundamental Editor for displaying it, I see a huge gap in previous prices and only the last few monthes are following the price closely (as I expected). Is this is a bug or do I miss something here?

I like the price regressions. But why use naming convention Prc instead of Pr? Like PrRegEst().

Something doesn’t fit
For example, SEDG

Price = 71.15
PriceH = 204.88

Pct52WH = 100 * (204.88 - 71.15) / 204.88 = 65.27%

And in P123 for some reason Pct52WH = 36.23%

Pct52WH is actually doing the 52 bar high or HighPct(52). It’s not using the weekly series.

Looks like all weekly versions are in fact using bar series. You’ll see the correct series using HighPct(251)

Thanks for reporting it. Should have it fix soon.

Can you please also check the PrcRegEstxx factors? I guess there could be a bug, too (see my previous post).

That issue is limited to the fundamental chart, where historical values are supposed to be presented as fully adjusted for splits and dividends. If you compare the Price and PrcRegEst10W historically in a screen, you will not find this divergence. I’ve added a task to the backlog to correct this.

I corrected my post to “251” instead of “52”

You’ll see the correct series using HighPct(251)

Sorry about that. HighPct(251) should be very similar to HighPct_W(52) but it’s not. Still investigating…

Everything should work now. I’ll do a more detailed post soon since anything using the weekly series of these factors was basically broken. But there were other problems with FX in Europe as well.

Not sure when it broke. We think there’s a hotfix for something else that broke these.

Very sorry about this.

Here’s AAP Pct52WH (% from 52 weeks high instead of 52 bars)

Here’s AAPL PrcRegEst20W around the time of the 4:1 split (line is smooth)