Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.55] TWAP: year and month calculation is not very precise #3591

Open
elena-zh opened this issue Jan 9, 2024 · 0 comments
Open

[1.55] TWAP: year and month calculation is not very precise #3591

elena-zh opened this issue Jan 9, 2024 · 0 comments
Labels
Bug Something isn't working Low Severity indicator for defects. It won't cause any major break-down of the system TWAP

Comments

@elena-zh
Copy link

elena-zh commented Jan 9, 2024

Related to #3568

Total duration counts a year as 365 days without consideration of the leap year.
Average month is also calculated as 30.3 days.
So when Total duration is converted into days, it is not very precise:

  1. leap year shows 1year+1 day, however, part duration shows a correct division. The warning says that duration is too long, however, '6 month' in the part time is less than '6 m 12 hours' in the warning
    discrep

  2. regular year: part is calculated as 6 months and 12h, when in fact it's 182d + 12h (or 6 months)
    8760

Expected: values should be precise, values on the warning should match the value in the Part duration field.

@elena-zh elena-zh added Bug Something isn't working Low Severity indicator for defects. It won't cause any major break-down of the system TWAP labels Jan 9, 2024
@elena-zh elena-zh changed the title TWAP: year and month calculation is not very precise [1.55] TWAP: year and month calculation is not very precise Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Low Severity indicator for defects. It won't cause any major break-down of the system TWAP
Projects
None yet
Development

No branches or pull requests

1 participant