How does the periodicity function work?

Questions directed to our Support Team. Responses can be expected within 24 hours.

How does the periodicity function work?

Postby mandelmus » Sat Oct 03, 2015 4:01 pm

I thought the 5DAY periodicity would act as a rolling 5 day window, but it seems to work more like the WEEKLY periodicity. In other words, it's only looking back to Monday of the same week rather than 5 days back from each day. Also, the 2DAY periodicity seems to be looking back more than 2 days and/or returning unexpected values. Is this intended? Can you explain how the periodicity function works?

For example, using the symbol AAPL:

I plugged this formula ... period(DAILY, LOW) ... into the "Calculations" tab and it returned the low of each day, as expected.
Image

When I plugged this formula .. period(2DAY,L) ... into the "Calculations" tab, it returned unexpected values.
Image

When I plugged this formula .. period(5DAY,L) ... into the "Calculations" tab, it returned unexpected values.
Image
mandelmus
 
Posts: 141
Joined: Fri Dec 23, 2011 1:51 pm

Re: How does the periodicity function work?

Postby Overload » Sun Oct 04, 2015 9:34 am

I thought the 5DAY periodicity would act as a rolling 5 day window, but it seems to work more like the WEEKLY periodicity.

I think you already answered the question. It is not a rolling 5-day window, but it is the WEEKLY periodicity. You might want to look at the StrataSearch Help for the Period formula where it is explained a bit better. In the help it explains the WEEKLY option as being weekly bars. From what I can tell, the Period formula is working properly and as expected.

If you want a rolling window, there may be other formulas for that. For example:

mov - gives a rolling average
ref - gives a rolling lookback
low - gives the rolling low value
high - gives the rolling high value

In your examples, it looks like you're expecting to see the 5-day low, which can be calculated with: low(low, 5). But that's not the same as the low of a weekly bar. A weekly bar only changes weekly, regardless of whether or not a new low was reached.

Hopefully that helps.

Pete
Overload
 
Posts: 2248
Joined: Wed Nov 30, 2005 12:14 pm


Return to Technical Support