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 (7) |
Author: lizgdal   😊 😞
Number: of 6131 
Subject: Re: Coefficient of Determination
Date: 05/16/24 11:44 AM
Post New | Post Reply | Report Post | Recommend It!
No. of Recommendations: 11
The GTR1 function vol() is not R-squared. R-squared is between 0 and 1. vol() could be higher than 1.

R-squared = 1 - RSS/TSS
RSS = sum of squares of residuals
TSS = total sum of squares (proportional to the variance)

The GTR1 function vol() calculates the annualized standard deviation of the natural logarithms of total returns.

This could be checked in Excel using the functions:
n = A:A = 1,2,3...
PortValue = B:B = 1,2,1,2,1...
C:C = total return multipliers (always > 0)
D2 = ln(C2) ... fill formula down to apply to all return data
stdev(D:D)

rsq(A:A,B:B)

For example, alternating portfolio value of 1 and 2 have:
R-squared = 0
vol(ln(TRm)) = 0.71

n   PortValue  TRm  ln(TRm)
1 1
2 2 2 0.69
3 1 0.5 -0.69
4 2 2 0.69
5 1 0.5 -0.69
6 2 2 0.69
7 1 0.5 -0.69
8 2 2 0.69
9 1 0.5 -0.69
10 2 2 0.69
11 1 0.5 -0.69
12 2 2 0.69
13 1 0.5 -0.69
14 2 2 0.69
15 1 0.5 -0.69
16 2 2 0.69
17 1 0.5 -0.69
18 2 2 0.69
19 1 0.5 -0.69


vol() uses natural logarithms, and so should probably only be used with multiplication and division. Using some other base would change vol() by some multiple, but should not affect the screen picks. For example, the screen logic should be set up to pick the same stocks after vol() is multiplied by 10.
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,115 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 (7) |


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