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

Concerns about the calculation of return #964

Open
AtlantixJJ opened this issue Mar 11, 2022 · 3 comments
Open

Concerns about the calculation of return #964

AtlantixJJ opened this issue Mar 11, 2022 · 3 comments
Labels
bug good first issue

Comments

@AtlantixJJ
Copy link

@AtlantixJJ AtlantixJJ commented Mar 11, 2022

🐛 Bug Description

I found the calculation of return in backtest confusing. The return is defined on each day's basis here. The return on each day are summed up directly to obtain the annualized return here. Shouldn't the total return be a product of (1 + r_i) minus 1? What's the problem here?

To Reproduce

Steps to reproduce the behavior:

Expected Behavior

Screenshot

Environment

Note: User could run cd scripts && python collect_info.py all under project directory to get system information
and paste them here directly.

  • Qlib version: 2ed806c
  • Python version: 3.7
  • OS (Windows, Linux, MacOS): Linux
  • Commit number (optional, please provide it if you are using the dev version): 2ed806c

Additional Notes

@AtlantixJJ AtlantixJJ added the bug label Mar 11, 2022
@you-n-g
Copy link
Collaborator

@you-n-g you-n-g commented Mar 14, 2022

@AtlantixJJ

Can your question be answered by this PR?

https://github.com/microsoft/qlib/pull/980/files

@AtlantixJJ
Copy link
Author

@AtlantixJJ AtlantixJJ commented Mar 17, 2022

Thank you for your answer. I understand the intuition of using arithmetic summation. But I think people still expect geometric summation for the model performance. Would you consider adding an interface for using geometric summation?

@you-n-g
Copy link
Collaborator

@you-n-g you-n-g commented Apr 2, 2022

I think we can add an exponential mode in addition to summation mode in this function

I think this is a very good issue for starters.

Contributions are welcome!

@you-n-g you-n-g added the good first issue label Apr 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug good first issue
Projects
None yet
Development

No branches or pull requests

2 participants