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]
http://gtr1.net/2013/?~TR_functions2026::sp1500.a:...===================
===================
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.