I need help figuring out the following formula:

enter image description here


CTLy = yesterdays CTL

TSS = current Training Stress Score

TC_c = your CTL Time Constant

Now I have TSS, thats a number between 20-500

About the CTL they say:

CTL is calculated as an exponentially-weighted moving average of daily TSS values, with the default time constant set to 42 days. CTL can therefore be viewed as analogous to the positive effect of training on performance in the impulse-response model, i.e., the first integral term in Eq. 1, with the caveat that CTL is a relative indicator of changes in performance ability due to changes in fitness, not an absolute predictor (since the gain factor, ka (or k1), has been eliminated).

Can anyone make an example with lets say a TSS = 100 ?

So let's say every day from today on I have TSS = 100

 CTL_day_1 = 100 * (1-CTL_exp) + (CTL_start * CTL_exp)
 CTL_day_2 = 100 * (1-CTL_exp) + (CTL_day_1 * CTL_exp)
 CTL_day_3 = 100 * (1-CTL_exp) + (CTL_day_2 * CTL_exp)

But I'm not sure what exactly will CTL_exp and CTL_start be in numbers and how will they change?


So I figured out that I can get the desired result like so:

public function ctlFilter($tss, $constant, $start){
    return $tss * (1-(exp(-1/$constant))) + $start * exp(-1/$constant);

calling the function like:

$day1 = $this->ctlFilter(100, 42, 0);
$day2 = $this->ctlFilter(100, 42, $day1);

But the question remains: I would like to know what is going on "behind the scene". So if anyone can explain, like Alfred Einstein sayd to a 6 year old, that would be much appreciated. Thank you.

  • $\begingroup$ Welcome to Mathematica.SE. Are you sure you are posting on the right site? There is nothing in your question making it clear that it is concerned with Mathematica software. $\endgroup$
    – m_goldberg
    Jan 30, 2016 at 13:59
  • $\begingroup$ I'm voting to close this question as off-topic because this question belongs on another site in the Stack Exchange network. It is not about using Mathematica. $\endgroup$
    – Michael E2
    Jan 30, 2016 at 14:15
  • $\begingroup$ @m_goldberg I thought so, but obviously I was at the wrong place. I just wanted some Mathematical knowledge. I didn't know about the Mathematica software till now .. :) thank you! $\endgroup$
    – caramba
    Jan 30, 2016 at 16:00
  • $\begingroup$ @caramba The weighting multiplier CTL_exp can be calculated by (2/(Time periods + 1)). For example for a 42 Day Weighting Multiplier = (2/(42+1) = 0.0465. And for a 7 Day Weighting Multiplier = (2/(7+1) = 0.25 $\endgroup$ Aug 24, 2022 at 9:26

2 Answers 2


As you correctly mentioned, Chronic Training Load (CTL) is an exponential moving average (EMA) of the daily Training Stress Score (TSS). Your TSS can vary a lot with time so you need to average it (for example, with EMA) in order to see the trend. The equation for CTL would look like this

$CTL_t = \alpha \cdot TSS_t - (1-\alpha) \cdot TSS_{t-1}$

Now let's generate some random TSS data (between 25 and 100) for 100 days and apply ExponentialMovingAverage[] to it. I have chosen low alpha for large smoothing of the data. High alpha will result in small smoothing.

TSS = RandomInteger[{25, 100}, 100];
alpha = 0.1;
CTL = ExponentialMovingAverage[TSS, alpha];
ListLinePlot[{TSS, CTL}, PlotLegends -> {"TSS", "CTL"}]

enter image description here

  • $\begingroup$ Thank you Pavlo! This looks very nice. Where/how did you programm this? Which environment, which coding language? And can you explain alpha in this case? $\endgroup$
    – caramba
    Jan 30, 2016 at 13:22
  • 2
    $\begingroup$ @caramba Are you aware this site is about the software Mathematica by Wolfram Reseach and not about general math? $\endgroup$
    – Sascha
    Jan 30, 2016 at 13:37
  • $\begingroup$ @caramba This code was written in the Wolfram Language and executed in the program Mathematica. When using EMA, the calculation of each point takes into account the values of all previous points. The degree to which previous points are accounted is defined by alpha. High alpha neglects previous points (decreases their weight) while low alpha takes them into account (increases their weight). $\endgroup$
    – Pavlo Fesenko
    Jan 30, 2016 at 13:45

using your CTL equation: assuming CTL_start = 10

here is some Mathematica code visualising the accumulation over 42 days with stress = 100

I'm not familiar with CTL yet but It looks like it works like compound interest or the Golden ratio?

CTL[CTLday1_] := CTLday1 + (100 - CTLday1)/42

accumulatingCTL = N[NestList[CTL, CTLstart, 42]]

CTLstart = 10


enter image description here

hope this is some use to you

Note: I just learned on Kahn academy that functions which take their previous output as their input: CTLday2 = CTLday1 + (100 - CTLday1)/42 are called "recursive functions". A famous example is Newton's Method. They usually produce a sequence in which element n+1 is generated from element n. We start with a base case. Every term is defined in terms of the term before it.

Sometimes an "explicit function" can be found which will give you any element you like if you know its index.

  • $\begingroup$ Thank you, that looks very good. I still don't understand the equation really. Will post my working solution in a bit $\endgroup$
    – caramba
    Jan 30, 2016 at 12:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .