Hi,
Wondering if anyone here has tried coding a rolling return indicator on PRT ? Any help would be appreciated, couldn’t see anything in the search results. Basic calculation is eg :
1yr rolling return % as of today = (Today’s price (T) – (T-365 days price)) / (T-365 days price) x 100
1yr rolling return % as of yesterday would be = (T-1 price) – (T- 366 price) / (T-366 price ) x 100 etc etc
Editable fields would be rolling period to look back over ie 1yr, 1 month, 1 week, 1 hour etc
The use for this is varied. Returns generally ebb and flow in cycles and each instrument has its own pattern eg if xyz stock goes up 20% over a priod of a month then it usually stalls/corrects regardless of technicals, index correlation etc It can be a useful indicator of momentum tops and bottoms and it works over multiple timeframes. So if a stock shows an increase in a rolling return from 5% to 20% on a monthly basis and stays there for a few months, it doesn’t mean its stalling (it’s still returning 20%/mth) but that the initial sharp momentum that took it from 5% to 20% has dissipated.
It’s also very useful in viewing rolling annualised returns for an index/stock over time as well and can also be used as a screener.
Please ask if you have any questions. There is something like this on trading view but its not quite as accurate functionally.
Many thanks in advance !