Wrong? calculation of avg. Profit / #Trades per month, or per Year

Columns avg. trades per Year or per Month are calculated by quite confusingly way. Pls. see the attached screen, especially column Total Data Days in relative to the other columns.

1. Row: If we retest .STR on exactly 100 days (where is the issue easy visible), we have $243 profit, and column Avg. Profit per year indicates as well $243. Which is IMHO wrong, as 100 days is only half of the April. Same situation is with Avg. Trades Per Year.
2. Row: Here we have 1.5 of year = 18 months = 546 days = exactly 1.1.2020 - 31.6.2021. So clearly not just 1 year, but avg. Profit or #Trades per Year indicate stats like it's just 1 Year.

Similar situation is with Avg. #Trades or Net Profit per Month. It counts only complete months.
3. Row: We have here 15 days = half of the month, but stats are here like for whole month.
4. Row: Here we have range 1.1.2019 - 3.2.2019 = 60 Data Days = obviously 2+ whole months (beginning January - March), but stats here are like for only one month.
5. Row: 31 Data Days - finally, we're breached some magical barrier and with 31 Data Days we're starting act like we have exactly 2 months - which will hold until 92 Trading Days.

It looks like there is used some rounding function where Years and Months are counted as whole number until some magical constant is breached. 
Which cause everything from 1 - 729 Data Days is divided by 1. Since 730 Trading Days divided by 2 until I guess 3x 365 Trading Days.

I think It would be more logically and intuitive if we use some (Trading Days)/365 normalization than this non linear rounding. 
Attachments
Avg per month and year.png
(18.47 KiB)
  • Votes +15
  • Project StrategyQuant X
  • Type Bug
  • Status New
  • Priority Normal

History

JT
#1

TiNTa

02.02.2022 16:58

Task created

b
#2

bentra

02.02.2022 18:24
Voted for this task.
JT
#3

TiNTa

03.02.2022 12:35
Voted for this task.
E
#4

Emmanuel

04.02.2022 16:54
Voted for this task.
b
#5

bentra

05.02.2022 17:18
This is totally true. This is a weird calculation. I see R Expectancy Score uses avgTradesPerMonth within its own calculation too and now I wonder how many other column stats are utilizing a flawed avgTradesPerX.

Nice find TiNTa.
v
#6

vlada01

06.02.2022 15:17
Voted for this task.
HH
#7

Hans

30.03.2022 00:15
Voted for this task.
b
#8

bentra

07.05.2022 22:43

totalYearsOfTrading is an int. Fractions should be allowed to make these stats accurate.

int totalYearsOfTrading = stats.getInt("TotalDataYears");


CG
#9

Chris G

07.05.2022 23:43
Voted for this task.
DS
#10

polinices

21.05.2022 18:44
Voted for this task.
KB
#11

kbtech

22.05.2022 01:11
Voted for this task.
Cc
#12

Cyber

22.05.2022 02:31
Voted for this task.
KB
#13

Kevin

24.05.2022 13:12
Voted for this task.
KB
#14

Kevin

24.05.2022 13:41
I've found the same problem with the way in which Annual % Return is calculated.

It is misleading because it also uses:

int totalYearsOfTrading = stats.getInt("TotalDataYears");


So you get the same Annual % Return for the same return on, say 2 years as, say 2.4 years.

Fs
#15

Fortunate

25.05.2022 03:50
Voted for this task.
VH
#16

anttropus

05.10.2022 14:42
Voted for this task.
TT
#17

Tamas

05.10.2022 15:18
duplicate https://roadmap.strategyquant.com/tasks/sq4_9344
b
#18

binhsir

26.11.2022 05:42
Voted for this task.
VH
#19

anttropus

06.12.2022 16:23

Please, repaire databank column TotalDataDays for forst time as soon as possible. It is essential.


TT
#20

Tamas

10.02.2023 09:05
duplicate https://roadmap.strategyquant.com/tasks/sq4_9621
b
#21

binhsir

19.03.2023 13:51
It is considered that the time range of the full sample data and IS , OOS, Potfolio are arbitrary.  It is better to compute TotalDataYears and TotalDataMonths according to TotalDataDays. TotalDataYears and TotalDataMonth after conversion should be double type. inculding full sample, IS, OOS, Portfolio.  Then CAGR, Annual % return will be calculated more accurately, no matter what range of sample data we choose. Hopefully this will be fixed soon.
l
#22

Loonly

23.03.2023 02:38
Voted for this task.
b
#23

binhsir

25.06.2023 01:45

Please fix this bug as soon as possible, This is very meaningful for the standardized measurement and comparison of all statistical metric. It includes all annual, monthly and daily metric

TT
#24

Tamas

26.06.2023 12:26
Yes, we plan to look at it in the next major build 138

Votes: +15

Drop files to upload

or

choose files

Max size: 5MB

Not allowed: exe, msi, application, reg, php, js, htaccess, htpasswd, gitignore

...
Wait please