RAR%
-
- Roundtable Knight
- Posts: 1436
- Joined: Mon Dec 22, 2003 12:24 pm
- Location: Des Moines, IA
- Contact:
RAR%
Since RAR% is the slope of the linear regression through an equity curve (typically an exponential curve), wouldn't using it as a measure of "goodness" unfairly weight good performance towards the end of the test period?
User damian asked the same question in 2005, about the coefficient of determination of a linear regression on the equity curve, namely, R squared.
The answer is disappointingly straightforward: viewtopic.php?p=16155&highlight=exponential#16155
The answer is disappointingly straightforward: viewtopic.php?p=16155&highlight=exponential#16155
Hi everyone,
As a compromise, in my calculation of RAR% I use the portfolio's starting equity as the start date value and the regressed end date equity value as the end date value. I did this because I found that the regressed start date value can be negative if the equity curve's slope is steep enough and therefore, I could not compute CAGR and/or ICAGR. However, according the image Faith provides in Way of the Turtle, it is technically correct to use the regressed start date value rather than the starting equity for the start date value in the RAR% calculation.
Also, does anyone happen to know which measure of compounded growth, CAGR or ICAGR (or any other), is used to compute RAR%?
Thanks!
As a compromise, in my calculation of RAR% I use the portfolio's starting equity as the start date value and the regressed end date equity value as the end date value. I did this because I found that the regressed start date value can be negative if the equity curve's slope is steep enough and therefore, I could not compute CAGR and/or ICAGR. However, according the image Faith provides in Way of the Turtle, it is technically correct to use the regressed start date value rather than the starting equity for the start date value in the RAR% calculation.
Also, does anyone happen to know which measure of compounded growth, CAGR or ICAGR (or any other), is used to compute RAR%?
Thanks!
-
- Roundtable Knight
- Posts: 2071
- Joined: Fri Apr 25, 2003 3:33 pm
- Location: London
- Contact:
I have often contemplated the void and was doing so only an hour ago when I drifted off in the middle of the Magnificat. I find the concept of an infinitely fertile emptiness much easier to swallow than that of an anthropomorphic creator. Much as I enjoy my native Anglo Catholicism and the rich liturgy of the Western Christian Church, in terms of metaphysics, if there are any answers at all (or even questions to be asked) I prefer the doctrines of our Eastern brethren.
Interestingly of course East and West meet in unison in the likes of Meister Eckhart on the one hand and the Eastern contemplatives on the other.
If I were Sunyata, I don’t think I would concern myself with RAR%. As it is however, like most of the rest of us, I have to keep the home fires burning.
Interestingly of course East and West meet in unison in the likes of Meister Eckhart on the one hand and the Eastern contemplatives on the other.
If I were Sunyata, I don’t think I would concern myself with RAR%. As it is however, like most of the rest of us, I have to keep the home fires burning.
When winter returns, I will need to light the coal stove as well.AFJ Garner wrote:I have often contemplated the void and was doing so only an hour ago when I drifted off in the middle of the Magnificat. I find the concept of an infinitely fertile emptiness much easier to swallow than that of an anthropomorphic creator. Much as I enjoy my native Anglo Catholicism and the rich liturgy of the Western Christian Church, in terms of metaphysics, if there are any answers at all (or even questions to be asked) I prefer the doctrines of our Eastern brethren.
Interestingly of course East and West meet in unison in the likes of Meister Eckhart on the one hand and the Eastern contemplatives on the other.
If I were Sunyata, I don’t think I would concern myself with RAR%. As it is however, like most of the rest of us, I have to keep the home fires burning.
Which is why I concern myself with RAR%.
Could you provide an example of this (ideally, with a plot or graph of some kind)?sunyata wrote:I found that the regressed start date value can be negative if the equity curve's slope is steep enough
I'm surprised and here's why. If the regression line equity on the ending date is a positive number "E", and if the regression line (on semilog axes of course) has a positive slope "S percent per year", then
- The regression equity on the end date is E dollars
- The regression equity one year before the end date is (E/(1+S)) dollars
- The regression equity two years before the end date is (E/(1+S)^2) dollars
- The regression equity three years before the end date is (E/(1+S)^3) dollars
- The regression equity four years before the end date is (E/(1+S)^4) dollars
- And in the general case, the regression equity "N" years before the end date is (E/(1+S)^N)
Hi,
I've attached an example, the one actually that has caused me trouble. The details are:
System: EXPONENTIAL MA CROSSOVER
Side: BOTH
Markets: GOLD, S&P 500
Test Dates: 1975 - 2005
Heat: 10% portfolio risked each trade
Starting Equity: $1M
RAR% = .131 (Calculated using starting equity & regressed end date value)
Upon rereading Sluggo's initial post, I realize that I am using a Linear scale and not a Log scale. If I change the Y-axis to log scale, then the starting regressed equity is, in fact, positive. I will attach that graph as well. However, two things are intriguing about the log scale. First, visually it is not linear (which makes sense) and therefore, does not coincide with the very limited example provided in Way of the Turtle. Secondly, despite using the log scale, the underlying regression equation (y = mx + b) remains unchanged so that there is still a negative y-intercept (b). At least, this is according to Excel and since I am not too knowledgeable of the subtleties of this subject, I do not know whether to trust Excel or not.
Would appreciate your insights!
I've attached an example, the one actually that has caused me trouble. The details are:
System: EXPONENTIAL MA CROSSOVER
Side: BOTH
Markets: GOLD, S&P 500
Test Dates: 1975 - 2005
Heat: 10% portfolio risked each trade
Starting Equity: $1M
RAR% = .131 (Calculated using starting equity & regressed end date value)
Upon rereading Sluggo's initial post, I realize that I am using a Linear scale and not a Log scale. If I change the Y-axis to log scale, then the starting regressed equity is, in fact, positive. I will attach that graph as well. However, two things are intriguing about the log scale. First, visually it is not linear (which makes sense) and therefore, does not coincide with the very limited example provided in Way of the Turtle. Secondly, despite using the log scale, the underlying regression equation (y = mx + b) remains unchanged so that there is still a negative y-intercept (b). At least, this is according to Excel and since I am not too knowledgeable of the subtleties of this subject, I do not know whether to trust Excel or not.
Would appreciate your insights!
- Attachments
-
- Linear regression example
- Linear regression example.jpg (47.38 KiB) Viewed 10260 times
-
- Linear regression Log Scale.jpg (45.92 KiB) Viewed 10260 times
Good, you are one-third of the way to enlightenment; there are two more conceptual leaps to be madesunyata wrote:I realize that I am using a Linear scale and not a Log scale.
- You need to ask and answer the question "What function plots as a straight line on semilog axes?". Once you know this answer, you will realize - Eureka! - this is one of the functions that Excel will fit for you, as a regression trendline.
- You need to figure out the transformation from native Excel scale, to "Percent Per Year" scale (which traders prefer for RAR). Brother levijean struggled with, and eventually solved, this exact problem, a few posts ago in this very discussion.
Hey sluggo,sluggo wrote:Good, you are one-third of the way to enlightenment; there are two more conceptual leaps to be made
- You need to ask and answer the question "What function plots as a straight line on semilog axes?". Once you know this answer, you will realize - Eureka! - this is one of the functions that Excel will fit for you, as a regression trendline.
- You need to figure out the transformation from native Excel scale, to "Percent Per Year" scale (which traders prefer for RAR). Brother levijean struggled with, and eventually solved, this exact problem, a few posts ago in this very discussion.
Thanks for your help. Attached is the same equity curve on a semi-log scale with an exponential regression curve. The associated exponent is .00056. In trying to solve for the compounded annual return using ln(i + 1) however, I get .00056, that is, the same as the exponent simply because the sum 1 + .00056 lies so closely to 1. Seems I am still doing something incorrect via that avenue.
However, I can simply use the equation Excel provides to determine the end date value for the regression curve. I then plug that value into the CAGR equation and yield .1518. This is much closer to the normal CAGR for the equity curve.
- Attachments
-
- Exponential regression on log scale.jpg (55.02 KiB) Viewed 10199 times
Yes you are using daily equity data, whereas Brother levijean was horsing around with some examples using annual equity data. In effect you have calculated "RDR" - the Robust Daily Return - which is the linear regression slope of the equity curve plotted on semilog axes - expressed in percent per day.
Now you need to figure out how to incorporate the fact that there are an average of 365.25 days per year (over a thirty year backtest which will include some leap-years), in order to calculate "RAR" - the Robust Annual Return.
Eyeballing your plot there, it appears the thin black line increased about 70X to 75X in approx 30 years, for a Robust Annual Return of approx 15.2 to 15.5 percent per year. (Doublecheck: 1.152^30 = 69.8x). So I suspect you will ultimately wind up with the result that your RAR is somewhere between 15% and 16% per year. There is a way to make Excel print its fitted equation with lots more digits of precision; maybe that would help you out.
AND, as if by magic, the left hand endpoint of the regression line -- the regressed Start Equity -- is not negative.
Now you need to figure out how to incorporate the fact that there are an average of 365.25 days per year (over a thirty year backtest which will include some leap-years), in order to calculate "RAR" - the Robust Annual Return.
Eyeballing your plot there, it appears the thin black line increased about 70X to 75X in approx 30 years, for a Robust Annual Return of approx 15.2 to 15.5 percent per year. (Doublecheck: 1.152^30 = 69.8x). So I suspect you will ultimately wind up with the result that your RAR is somewhere between 15% and 16% per year. There is a way to make Excel print its fitted equation with lots more digits of precision; maybe that would help you out.
AND, as if by magic, the left hand endpoint of the regression line -- the regressed Start Equity -- is not negative.
Calculating RAR% using the exponential regression equation
First, you start with the coefficient of the exponent in the derived exponential regression equation, which for the example issluggo wrote: Now you need to figure out how to incorporate the fact that there are an average of 365.25 days per year (over a thirty year backtest which will include some leap-years), in order to calculate "RAR" - the Robust Annual Return.
y = 1091970.513 * e^(0.000555451x)
The coefficient in question is .00055545. This is the "RDR" that sluggo speaks of. The first step in annualizing this number is to multiply it by the ratio
(# trading days in backtest / total # of days in timespan of backtest)
This allows for compounding on days when there is no trading. There were 7751 trading days in 30.7 years or roughly 11,213.175 days. So,
(7751 / 11213.175) * .00055545 = .00038395
So, on each day, including non-trading days, the system returned a steady .00038395 or .038%. This is overly hyphenated non-trading-day-adjusted regressed daily return.
But what would you return in a year at this daily rate? The equation to use is:
(1 + x)^365.25 - 1
which, upon plugging in .00038395 in for x, you get .15053 or 15.053%, the fabled RAR%.
I did a study in Excel starting with $1 and compounding .00038395 for 366 days, which returned .1504, likely a rounding anomaly.
Good. Beware that there are two ways to run the regression; some people will make choice (1) and others will make choice (2):
- (1) using the actual (Julian) dates as the X-values for the regression fitted line;
(2) using the integers 1 thru N as the X-values for the regression fitted line, where N is the number of trading days {N=7751}.