Hi, Shrewd!        Login  
Shrewd'm.com 
A merry & shrewd investing community
Best Of MIBest OfAll BoardsThe Shrewd’m WeeklyLearn to InvestHow to Become Shrewd
Search
Shrewd'm.com Merry shrewd investors
Search
Best Of MIBest OfAll BoardsThe Shrewd’m WeeklyLearn to InvestHow to Become Shrewd


The week's question
In December 2024, in the thread "Re: BRK: Why Not XOM?", BreckHutHigh asked the members: "What about the long road trips with kids?" This week it is put to everyone again. The button below opens the small thread re-asking it - read what others have said so far, then give your own answer as an ordinary reply.
Answer this questionContinue to Shrewd'mThis note won't appear again
Investment Strategies / Mechanical Investing
Unthreaded | Threaded | Whole Thread (23) |
Author: lizgdal   😊 😞
Number: of 6131 
Subject: Re: NAS Consolodators
Date: 02/09/26 3:52 PM
Post New | Post Reply | Report Post | Recommend It!
No. of Recommendations: 5
hiphop wrote: "Can anyone else find the definition?"

tr(L,D) is the same as trm(L,D), and is the total return multiplier.

trm(1,5) = gprc:1 / gprc:6

as of 20251128:

    Ticker         NVDA
trp:1,5 -2.015054
tr:1,5 0.9798495
trm:1,5 0.9798495
aprc:1 / aprc:6 0.9798494

aprc 177
aprc:1 177
aprc:2 180.26
aprc:3 177.82
aprc:4 182.55
aprc:5 178.88
aprc:6 180.64
aprc:7 186.52


From the gtr1 Command Translation:
trp(1,5) is [Total Return % over 5 days; lag=0 days]
tr(1,5) is [Total Return Multiplier over 5 days; lag=0 days]
trm(1,5) is [Total Return Multiplier over 5 days; lag=0 days]

gtr1.net: GTR1 Backtester - TR_functions2026

===================
===================

From my copy of the gtr1 Glossary
Last Modified: 8:25:22 PM 11/19/2008

trm
A field function calculating retrospective total returns (as multipliers) for each investment over a specified interval of market dates. Its syntax is as follows:

trm:[<lag_days>|<param_ref_1>],[<rs_days>|<param_ref_2>]

As shown, the function trm takes two arguments, each of which can be either a number or a parameter reference. The value of lag_days must be a non-negative integer, the value of rs_days must be a positive integer, and their sum must not exceed the retrospective limit. For each investment, the function trm uses its unsigned closing g-prices to calculate its total return over the period consisting of rs_days (or the value referenced by param_ref_2 for the variant being tested) number of market days ending lag_days (or the value referenced by param_ref_1 for the variant being tested) number of market days before the current trading date; the result is assigned to the calling field.

Note that if lag_days is zero, then total returns are measured through the close of the current trading date, which corresponds to the same g-prices at which trades take place. Also observe that since total return is calculated by simply dividing unsigned closing g-prices, it can also be obtained using the field functions gprc and ratio. For example, in the command fragment

field0=trm:10,126
field1=gprc:10
field2=gprc:136
field3=ratio:field1,field2 ...,

field0 and field3 are equal. Furthermore, the field functions trm and trp can be related using the field function linear (see the latter function's glossary definition for details).

By default, a meaningful retrospective total return is always calculated for every investment on every market date, regardless of how recently the stock associated with an investment may have begun trading. This is possible because GTR1 Linearization defines each investment's daily g-prices indefinitely into the past using the history of parent companies and, when the latter does not exist, interpolation. However, to filter out investments with inadequate actual pricing history for a conventional total return computation, use the field functions dsio or dspo.

====================================
trp
A field function calculating retrospective total returns (as percentages) for each investment over a specified interval of market dates. Its syntax is as follows:

trp:[<lag_days>|<param_ref_1>],[<rs_days>|<param_ref_2>]

As shown, the function trp takes two arguments, each of which can be either a number or a parameter reference. The value of lag_days must be a non-negative integer, the value of rs_days must be a positive integer, and their sum must not exceed retrospective limit. For each investment, the function trp uses its unsigned closing g-prices to calculate its total return as a percentage over the period consisting of rs_days (or the value referenced by param_ref_2 for the variant being tested) number of market days ending lag_days (or the value referenced by param_ref_1 for the variant being tested) number of market days before the current trading date; the result is assigned to the calling field.

Note that if lag_days is zero, then total returns are measured through the close of the current trading date, which corresponds to the same g-prices at which trades take place. Also, note that the field functions trp and trm can be related using the field function linear (see the latter function's glossary definition for details).

By default, a meaningful retrospective total return is always calculated for every investment on every market date, regardless of how recently the stock associated with an investment may have begun trading. This is possible because GTR1 Linearization defines each investment's daily g-prices indefinitely into the past using the history of parent companies and, when the latter does not exist, interpolation. However, to filter out investments with inadequate actual pricing history for a conventional total return computation, use the field functions dsio or dspo.
Post New | Post Reply | Report Post | Recommend It!
Print the post
Members reply directly to lizgdal here — and replies get answered. Reading is free; so is joining the conversation. Join Shrewd'm »
This community has written 6,106 posts about Mechanical Investing. The article-length ones it recommended most:
Dividend investing · 52 recs · 2025
Non-Mag7 screen · 34 recs · 2025
OT - Div yields and returns · 32 recs · 2024
Using AI to generate backtesting programs · 30 recs · 2025
Rankings for 19Dec2022 · 29 recs · 2022
Unthreaded | Threaded | Whole Thread (23) |


Announcements
Mechanical Investing FAQ
Contact Shrewd'm
Contact the developer of these message boards.

Best Of MI | Best Of | Favourites & Replies | All Boards | Followed Shrewds | Open Questions | Moving a community