Hi, Shrewd!        Login  
Shrewd'm.com 
A merry & shrewd investing community
Best Of MI | Best Of | Favourites & Replies | All Boards | Post of the Week!
Search MI
Shrewd'm.com Merry shrewd investors
Best Of MI | Best Of | Favourites & Replies | All Boards | Post of the Week!
Search MI


Investment Strategies / Mechanical Investing
Unthreaded | Threaded | Whole Thread (7) |
Author: lizgdal   😊 😞
Number: of 3959 
Subject: Re: Coefficient of Determination
Date: 05/16/2024 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
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