YURI Dual Momentum Engine

Dual momentum was developed by Gary Antonacci and published as Global Equities Momentum in Dual Momentum Investing (2014). Rank two equity sleeves by their trailing return, and require the winner to clear a cash rate before it counts. The method is his, and none of it is claimed here. What this engine adds is a record of how that ranking has behaved: every month the leading sleeve is written down, and when the lead changes hands, the length of the spell that just ended is stored. Today's open spell is then compared against that list, with the count of spells behind it and, where there is one to give, the standard error attached to it. The same ranking is also computed at three lookbacks at once, so the table can show whether the choice of lookback changes the answer.
HOW TO USE IT
Put it on a daily chart of any symbol that keeps a US exchange calendar. The chart's own price is not read. The four series are requested by the script and compared month by month, so the reading updates once a month and holds steady in between.
Read the status line first. The ranking wants twelve months of both sleeves at the default lookback, and the tenure reading then waits for 8 completed spells. The default funds give about twenty spells over their whole history, so load all of it.
Then read the table. Leads shows which sleeve has the higher trailing return and by how many points. The two sleeve rows give those returns and mark each against the hurdle, which is the absolute momentum half of the method. Open spell shows how many months the current leader has led. Tenure is the reading this script adds: the share of finished spells that were no longer than this one, with the number of spells and the standard error beside it. With twenty or so spells that error is close to ten points, and the table prints it so the percentile is not read as finer than it is.
Lookbacks shows whether the 3, 9 and 12 month rankings name the same leader. When they do not, a red cross is drawn in the pane for that month, showing that the choice of lookback is deciding the answer.
To run the ranking on other sleeves, change the four symbol inputs. Keep all four on one exchange calendar, or the status line will report that they are not on the same month.
WHY A RANKING NEEDS A LEDGER
Working out which of two sleeves has the higher trailing return is one subtraction, and it is the same subtraction on every chart that computes it. But it says nothing about whether a lead of this age is ordinary for the pair. A lead three months old and a lead three years old read identically in a ranking, yet they are not the same situation.
Answering that requires a list built up as the chart advances, since no single bar holds that history. That list is the ledger: one entry per completed spell, in months. Today's ranking does not carry it, which is why this engine is more than a line showing which sleeve is ahead.
WHAT THE READINGS ARE
The lead shows which sleeve has the higher trailing return over the main lookback, and by how many percentage points. Both sleeve returns are printed beside it so the subtraction can be taken apart by eye.
Tenure shows where the open spell sits among the completed spells in the ledger. If it reads 71 percent of 21 spells, then 15 of the 21 spells the ledger holds were no longer than the one now running. It counts at or below, so a spell exactly as long as one in the ledger counts as having reached it.
The lookback reading is the leader computed at all three lookbacks at once, reported as agreed or split, naming which sleeve each one picks. Which lookback a reader chooses is a decision that moves the headline, so it is printed as a reading rather than left in a setting. Agreement is not a strength rating. It says that three windows happened to rank the pair the same way on this bar, and three windows that overlap as heavily as these do will land the same way often enough on their own.
The bond series and the cash proxy are two further trailing returns, reported for reference. Neither takes any part in the ranking.
The absolute momentum hurdle is a number you set. Each sleeve's return is marked as above it or at or below it.
WHAT THE MEASUREMENT SAYS, AND WHERE IT STOPS
Everything quoted below came out of this engine's own series, computed over daily bars of a US equity fund against a world ex-US fund from 2007-05-31 to 2026-09-18, 4857 bars, at the default twelve month lookback. A longer pair, the same US fund against a developed markets ex-US fund starting 2003-09-30, is quoted next to it. What these characterise is the readout itself. No position is taken anywhere in them.
The ledger holds 21 completed spells on the default pair. The median is 4 months, the longest is 52, and the full contents in months are 12, 9, 11, 3, 17, 1, 52, 4, 2, 6, 36, 1, 18, 2, 1, 2, 5, 1, 19, 1, 3. Five of the 21 are a single month.
Before any of it can be read, there is a fact about how long the wait is. On the default pair, the tenure reads on 2253 of the 4857 daily bars loaded, 46.4 percent, and the first reading arrives on 2017-10-02, which is the chart's tenth year. Until then, the pane is empty and the status line counts the ledger up. A chart with only a few years on it produces no tenure reading at all, and that is the normal state of this engine rather than a fault.
Twenty one is a small ledger, and this is the most important thing in this description. A percentile near the middle of 21 spells carries a standard error of 10.9 points, so the middle half of the scale is about one error wide. The percentile is a rough position, not a measurement, and the table prints the spell count and the error beside it on every bar rather than under it. At the minimum of 8 spells the error is 17.7 points, which covers most of the scale, and that is why 8 is a floor rather than a recommendation.
At the two ends of the scale, no error is printed at all. When the open spell is longer than every spell in the ledger the percentile reads 100, and when it is shorter than all of them it reads 0; in both cases, every entry sits on one side of the reading and the binomial error collapses to zero by arithmetic. Printing that zero would claim a reading with no error in it, so the cell says in words that every spell is on one side instead. On the default pair at the default lookback this does not arise, but on other pairs and other lookbacks it is common: across nine pair and lookback combinations measured, 4097 readable bars sat at one of the two ends.
Neither reading is the size of the lead expressed another way. That was tested as an identity before it was tested as a correlation, because a rank correlation cannot detect a folded relationship: two readings related by a V shape can correlate near zero and still be the same number. Put both on their own rank scale and the largest gap between them is 78.2 points on the default pair and 74.4 on the longer one, which no formula relation between them could produce. Only then were the correlations checked: the tenure percentile against the size of the lead is +0.29 and +0.50, and the folded comparison of the same pair is -0.15 and -0.01.
The lookback reading correlates -0.40 and -0.41 with the size of the lead. The largest correlation anywhere in this description is the +0.50 above; this is the next one, and both are stated here: the three lookbacks tend to disagree when the lead is narrow, which is what they ought to do, and a reader who already has the size of the lead has part of this reading. What it adds is which of the three is out of step. They disagree on 39.2 percent of the 222 months read on the default pair and 38.4 percent of 276 on the longer one.
THE LOOKBACK IS THE SETTING THAT MOVES EVERYTHING
The effect is large. On the default pair, the ledger holds 53 completed spells at a three month lookback, 26 at six, 29 at nine, 21 at twelve, 10 at eighteen and 6 at twenty four. The tenure of the open spell on the last bar reads 23, 15, 76, 71, 80 percent and then nothing at all, because at twenty four months the ledger no longer holds the minimum. The median spell runs 3, 6, 2, 4, 2 and 7 months across the same grid.
A reading that moves from 15 to 80 across ordinary settings of one input measures the pair and the setting together. The three lookback reading exists because of this, and the whole grid is printed here rather than one column of it.
WHY THE CASH LEG IS A HURDLE YOU SET
A chart carries a price series. A Treasury bill fund pays out nearly everything it earns, so its price series stays close to flat whatever the rate is, and a trailing return computed on it is not the cash return. Measured over twelve month windows on the default cash proxy, the price series return runs below the distribution adjusted one by a median of 0.25 points and by as much as 5.38 in a high rate stretch. On a short Treasury fund the median gap is 1.83 points and on an aggregate bond fund it is 3.17.
So the absolute momentum line here is an input in percent that you set by hand, defaulting to zero, and the cash proxy's figure is printed beside it labelled price only. Antonacci's absolute momentum is excess return over Treasury bills; a zero line is the simpler variant of the same idea and is not his. Setting the hurdle to a bill rate by hand is the closer reading, and it is left as a decision rather than computed from a series that would understate it.
HOW THE TIMING WORKS
The chart is daily, and every series is requested from the monthly timeframe with a one bar offset. That pairing is what keeps a historical bar and a live bar looking at the same monthly bar: the offset moves the read back to the last month that has closed, so neither is served a month that is still forming.
In plain terms, the August close becomes visible on the first chart bar of September and holds for the whole of September. A reading settles when its month closes and is not rewritten afterwards. That was checked two ways: every one of six readings holds a single value per calendar month across the whole run, and three truncations of the chart reproduce the full run's bar exactly, across twelve series.
The four series are requested with their own month stamps on the same one bar shift, and the four stamps are compared. If they do not agree, the engine refuses by name rather than reading across a mismatch, because the default behaviour on a bar a series has no data for is to repeat its previous value, which in price alone looks exactly like a fresh one.
READING IT
One purple line in a pane on a nought to one hundred scale shows the tenure percentile of the open spell. A dotted line at 50 marks half the ledger. A red cross near the top marks a month where the three lookbacks do not agree. The pane tints by which sleeve leads.
The size of the lead is deliberately not drawn. It is one subtraction between two figures that are both in the table, and drawing it would make the pane look like a ranking chart with a percentile added, when it is a percentile with its inputs listed.
The table carries the data month, which sleeve leads and by how much, both sleeve returns marked against the hurdle, the hurdle itself, the bond series, the cash proxy marked price only, the age of the open spell, the tenure with its spell count and its standard error where one exists, the three lookback reading, the ledger's size, median, and longest spell with what was set aside, and a status line.
The data window carries both sleeve returns, the size of the lead, the bond and cash figures, the age of the open spell, the number of completed spells, and the standard error of the tenure.
Where there is no reading, the status line gives the reason by name instead of substituting a number that would look reasonable. Seven messages sit behind ok, tested in this sequence: that the chart is not a standard one; that it is not one day a bar; that one of the four series returned nothing here; that the four are not on the same month; that the ranking is still warming up and how many months it wants; that the two sleeves are exactly level this month; and how far through the ledger is, in completed spells. On a refused chart, all ten plotted series are empty, the tint is off, and all eleven value cells read as a dash; the twelve row labels stay, and the status line is the only cell with a message. The three fixed horizontal lines at nought, 50 and one hundred are drawn at constants and stay on a refused chart as well, since they carry no reading of their own.
SETTINGS THAT MATTER
The lookback is the headline setting, and the grid above is what moving it does. Every stored spell was measured under it, so moving it does not adjust a view; it rebuilds what the ledger is a record of.
The second and third lookbacks feed only the agreement reading. They are a control rather than a setting to tune.
Completed spells before the tenure reads is a floor on how thin a ledger may be before a percentile is printed at all. Raising it delays the reading and does not sharpen it, since the error comes from the number of spells the history actually produced.
The two sleeves are symbol inputs, and the choice of pairing belongs to the reader. The published method pairs a domestic equity sleeve against a world ex-domestic one, which is what the defaults are. If you pair two sleeves that do not compete for the same role, the ranking still computes, but the spells it records will not be describing a rotation.
WHAT IT WILL NOT DO
It does not say which sleeve to hold, or whether to hold anything. There is no entry, no exit, no stop, no position, no allocation, and no alert in it. The bond series is reported as a third trailing return and is not offered as somewhere to go. Nothing here is a signal.
The tenure percentile is not a probability, and the ledger is small. Twenty one spells on the default pair is few enough that the printed standard error is the main thing to read with it, and the spells are treated as independent draws when that error is computed, which they are not: consecutive spells come from the same stretch of one relationship between two funds. Treat the printed error as a lower bound.
The open spell is not in the ledger, and its tenure can only rise while it stays open. So the printed percentile is a floor for that spell, and the direction of that bias is up. The first spell on the chart is set aside as well, because it was already running when the history began and its length is whatever the chart starts at; the table counts it as set aside rather than dropping it silently.
Only what the chart loaded is in the ledger. Scroll back further and it is a different ledger. A monthly rotation between two funds produces spells in the tens over two decades, so a longer chart is worth more here than on almost any intraday reading, and the figures above will not be the figures on a shorter one.
The cash figure is price only and understates the cash return, by a median of 0.25 points and as much as 5.38 on the measured history. It is printed for reference, and the hurdle is set by hand for that reason.
It needs a standard chart of one day a bar. A chart built from synthetic prices is refused by name, because its close is not a price anything traded at while every other test in the file would pass on it. Intraday, weekly and monthly charts are refused by name, as are charts of two, three or five days to a bar.
No cost, tax or spread is deducted anywhere, and no allowance is made for the fact that a rotation would have to be acted on. These are gross trailing returns on closing prices.
A trailing return carries whatever its window contains. When the relationship between two sleeves shifts, the reading goes on describing the older one until the window has cleared it. Every trailing return lags in this way.
Any decision based on this readout is the reader's to make.
HOW TO USE IT
Put it on a daily chart of any symbol that keeps a US exchange calendar. The chart's own price is not read. The four series are requested by the script and compared month by month, so the reading updates once a month and holds steady in between.
Read the status line first. The ranking wants twelve months of both sleeves at the default lookback, and the tenure reading then waits for 8 completed spells. The default funds give about twenty spells over their whole history, so load all of it.
Then read the table. Leads shows which sleeve has the higher trailing return and by how many points. The two sleeve rows give those returns and mark each against the hurdle, which is the absolute momentum half of the method. Open spell shows how many months the current leader has led. Tenure is the reading this script adds: the share of finished spells that were no longer than this one, with the number of spells and the standard error beside it. With twenty or so spells that error is close to ten points, and the table prints it so the percentile is not read as finer than it is.
Lookbacks shows whether the 3, 9 and 12 month rankings name the same leader. When they do not, a red cross is drawn in the pane for that month, showing that the choice of lookback is deciding the answer.
To run the ranking on other sleeves, change the four symbol inputs. Keep all four on one exchange calendar, or the status line will report that they are not on the same month.
WHY A RANKING NEEDS A LEDGER
Working out which of two sleeves has the higher trailing return is one subtraction, and it is the same subtraction on every chart that computes it. But it says nothing about whether a lead of this age is ordinary for the pair. A lead three months old and a lead three years old read identically in a ranking, yet they are not the same situation.
Answering that requires a list built up as the chart advances, since no single bar holds that history. That list is the ledger: one entry per completed spell, in months. Today's ranking does not carry it, which is why this engine is more than a line showing which sleeve is ahead.
WHAT THE READINGS ARE
The lead shows which sleeve has the higher trailing return over the main lookback, and by how many percentage points. Both sleeve returns are printed beside it so the subtraction can be taken apart by eye.
Tenure shows where the open spell sits among the completed spells in the ledger. If it reads 71 percent of 21 spells, then 15 of the 21 spells the ledger holds were no longer than the one now running. It counts at or below, so a spell exactly as long as one in the ledger counts as having reached it.
The lookback reading is the leader computed at all three lookbacks at once, reported as agreed or split, naming which sleeve each one picks. Which lookback a reader chooses is a decision that moves the headline, so it is printed as a reading rather than left in a setting. Agreement is not a strength rating. It says that three windows happened to rank the pair the same way on this bar, and three windows that overlap as heavily as these do will land the same way often enough on their own.
The bond series and the cash proxy are two further trailing returns, reported for reference. Neither takes any part in the ranking.
The absolute momentum hurdle is a number you set. Each sleeve's return is marked as above it or at or below it.
WHAT THE MEASUREMENT SAYS, AND WHERE IT STOPS
Everything quoted below came out of this engine's own series, computed over daily bars of a US equity fund against a world ex-US fund from 2007-05-31 to 2026-09-18, 4857 bars, at the default twelve month lookback. A longer pair, the same US fund against a developed markets ex-US fund starting 2003-09-30, is quoted next to it. What these characterise is the readout itself. No position is taken anywhere in them.
The ledger holds 21 completed spells on the default pair. The median is 4 months, the longest is 52, and the full contents in months are 12, 9, 11, 3, 17, 1, 52, 4, 2, 6, 36, 1, 18, 2, 1, 2, 5, 1, 19, 1, 3. Five of the 21 are a single month.
Before any of it can be read, there is a fact about how long the wait is. On the default pair, the tenure reads on 2253 of the 4857 daily bars loaded, 46.4 percent, and the first reading arrives on 2017-10-02, which is the chart's tenth year. Until then, the pane is empty and the status line counts the ledger up. A chart with only a few years on it produces no tenure reading at all, and that is the normal state of this engine rather than a fault.
Twenty one is a small ledger, and this is the most important thing in this description. A percentile near the middle of 21 spells carries a standard error of 10.9 points, so the middle half of the scale is about one error wide. The percentile is a rough position, not a measurement, and the table prints the spell count and the error beside it on every bar rather than under it. At the minimum of 8 spells the error is 17.7 points, which covers most of the scale, and that is why 8 is a floor rather than a recommendation.
At the two ends of the scale, no error is printed at all. When the open spell is longer than every spell in the ledger the percentile reads 100, and when it is shorter than all of them it reads 0; in both cases, every entry sits on one side of the reading and the binomial error collapses to zero by arithmetic. Printing that zero would claim a reading with no error in it, so the cell says in words that every spell is on one side instead. On the default pair at the default lookback this does not arise, but on other pairs and other lookbacks it is common: across nine pair and lookback combinations measured, 4097 readable bars sat at one of the two ends.
Neither reading is the size of the lead expressed another way. That was tested as an identity before it was tested as a correlation, because a rank correlation cannot detect a folded relationship: two readings related by a V shape can correlate near zero and still be the same number. Put both on their own rank scale and the largest gap between them is 78.2 points on the default pair and 74.4 on the longer one, which no formula relation between them could produce. Only then were the correlations checked: the tenure percentile against the size of the lead is +0.29 and +0.50, and the folded comparison of the same pair is -0.15 and -0.01.
The lookback reading correlates -0.40 and -0.41 with the size of the lead. The largest correlation anywhere in this description is the +0.50 above; this is the next one, and both are stated here: the three lookbacks tend to disagree when the lead is narrow, which is what they ought to do, and a reader who already has the size of the lead has part of this reading. What it adds is which of the three is out of step. They disagree on 39.2 percent of the 222 months read on the default pair and 38.4 percent of 276 on the longer one.
THE LOOKBACK IS THE SETTING THAT MOVES EVERYTHING
The effect is large. On the default pair, the ledger holds 53 completed spells at a three month lookback, 26 at six, 29 at nine, 21 at twelve, 10 at eighteen and 6 at twenty four. The tenure of the open spell on the last bar reads 23, 15, 76, 71, 80 percent and then nothing at all, because at twenty four months the ledger no longer holds the minimum. The median spell runs 3, 6, 2, 4, 2 and 7 months across the same grid.
A reading that moves from 15 to 80 across ordinary settings of one input measures the pair and the setting together. The three lookback reading exists because of this, and the whole grid is printed here rather than one column of it.
WHY THE CASH LEG IS A HURDLE YOU SET
A chart carries a price series. A Treasury bill fund pays out nearly everything it earns, so its price series stays close to flat whatever the rate is, and a trailing return computed on it is not the cash return. Measured over twelve month windows on the default cash proxy, the price series return runs below the distribution adjusted one by a median of 0.25 points and by as much as 5.38 in a high rate stretch. On a short Treasury fund the median gap is 1.83 points and on an aggregate bond fund it is 3.17.
So the absolute momentum line here is an input in percent that you set by hand, defaulting to zero, and the cash proxy's figure is printed beside it labelled price only. Antonacci's absolute momentum is excess return over Treasury bills; a zero line is the simpler variant of the same idea and is not his. Setting the hurdle to a bill rate by hand is the closer reading, and it is left as a decision rather than computed from a series that would understate it.
HOW THE TIMING WORKS
The chart is daily, and every series is requested from the monthly timeframe with a one bar offset. That pairing is what keeps a historical bar and a live bar looking at the same monthly bar: the offset moves the read back to the last month that has closed, so neither is served a month that is still forming.
In plain terms, the August close becomes visible on the first chart bar of September and holds for the whole of September. A reading settles when its month closes and is not rewritten afterwards. That was checked two ways: every one of six readings holds a single value per calendar month across the whole run, and three truncations of the chart reproduce the full run's bar exactly, across twelve series.
The four series are requested with their own month stamps on the same one bar shift, and the four stamps are compared. If they do not agree, the engine refuses by name rather than reading across a mismatch, because the default behaviour on a bar a series has no data for is to repeat its previous value, which in price alone looks exactly like a fresh one.
READING IT
One purple line in a pane on a nought to one hundred scale shows the tenure percentile of the open spell. A dotted line at 50 marks half the ledger. A red cross near the top marks a month where the three lookbacks do not agree. The pane tints by which sleeve leads.
The size of the lead is deliberately not drawn. It is one subtraction between two figures that are both in the table, and drawing it would make the pane look like a ranking chart with a percentile added, when it is a percentile with its inputs listed.
The table carries the data month, which sleeve leads and by how much, both sleeve returns marked against the hurdle, the hurdle itself, the bond series, the cash proxy marked price only, the age of the open spell, the tenure with its spell count and its standard error where one exists, the three lookback reading, the ledger's size, median, and longest spell with what was set aside, and a status line.
The data window carries both sleeve returns, the size of the lead, the bond and cash figures, the age of the open spell, the number of completed spells, and the standard error of the tenure.
Where there is no reading, the status line gives the reason by name instead of substituting a number that would look reasonable. Seven messages sit behind ok, tested in this sequence: that the chart is not a standard one; that it is not one day a bar; that one of the four series returned nothing here; that the four are not on the same month; that the ranking is still warming up and how many months it wants; that the two sleeves are exactly level this month; and how far through the ledger is, in completed spells. On a refused chart, all ten plotted series are empty, the tint is off, and all eleven value cells read as a dash; the twelve row labels stay, and the status line is the only cell with a message. The three fixed horizontal lines at nought, 50 and one hundred are drawn at constants and stay on a refused chart as well, since they carry no reading of their own.
SETTINGS THAT MATTER
The lookback is the headline setting, and the grid above is what moving it does. Every stored spell was measured under it, so moving it does not adjust a view; it rebuilds what the ledger is a record of.
The second and third lookbacks feed only the agreement reading. They are a control rather than a setting to tune.
Completed spells before the tenure reads is a floor on how thin a ledger may be before a percentile is printed at all. Raising it delays the reading and does not sharpen it, since the error comes from the number of spells the history actually produced.
The two sleeves are symbol inputs, and the choice of pairing belongs to the reader. The published method pairs a domestic equity sleeve against a world ex-domestic one, which is what the defaults are. If you pair two sleeves that do not compete for the same role, the ranking still computes, but the spells it records will not be describing a rotation.
WHAT IT WILL NOT DO
It does not say which sleeve to hold, or whether to hold anything. There is no entry, no exit, no stop, no position, no allocation, and no alert in it. The bond series is reported as a third trailing return and is not offered as somewhere to go. Nothing here is a signal.
The tenure percentile is not a probability, and the ledger is small. Twenty one spells on the default pair is few enough that the printed standard error is the main thing to read with it, and the spells are treated as independent draws when that error is computed, which they are not: consecutive spells come from the same stretch of one relationship between two funds. Treat the printed error as a lower bound.
The open spell is not in the ledger, and its tenure can only rise while it stays open. So the printed percentile is a floor for that spell, and the direction of that bias is up. The first spell on the chart is set aside as well, because it was already running when the history began and its length is whatever the chart starts at; the table counts it as set aside rather than dropping it silently.
Only what the chart loaded is in the ledger. Scroll back further and it is a different ledger. A monthly rotation between two funds produces spells in the tens over two decades, so a longer chart is worth more here than on almost any intraday reading, and the figures above will not be the figures on a shorter one.
The cash figure is price only and understates the cash return, by a median of 0.25 points and as much as 5.38 on the measured history. It is printed for reference, and the hurdle is set by hand for that reason.
It needs a standard chart of one day a bar. A chart built from synthetic prices is refused by name, because its close is not a price anything traded at while every other test in the file would pass on it. Intraday, weekly and monthly charts are refused by name, as are charts of two, three or five days to a bar.
No cost, tax or spread is deducted anywhere, and no allowance is made for the fact that a rotation would have to be acted on. These are gross trailing returns on closing prices.
A trailing return carries whatever its window contains. When the relationship between two sleeves shifts, the reading goes on describing the older one until the window has cleared it. Every trailing return lags in this way.
Any decision based on this readout is the reader's to make.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.