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

Calculation error of yearlyProfit #44

Open
xerviami opened this issue Apr 25, 2018 · 1 comment
Open

Calculation error of yearlyProfit #44

xerviami opened this issue Apr 25, 2018 · 1 comment

Comments

@xerviami
Copy link

Hi,

It seems that gekkoga computes the yearlyProfit value with this formula:
yearlyProfit=profit * year_duration / backtest_duration

This formula is not correct.
I think the correct one is:
yearlyProfit (in %)=(end_balance/start_balance) ^(year_duration / backtest_duration) -1
Duration can be in days, hours or minutes, as you prefer.

Xavier

@stereohelix
Copy link
Contributor

Hi Xavier,

This calculation happens in gekko performance analyzer, before gekkoga gets a hold of it.

Many gekko users prefer a linear extrapolation. I suppose it could do both. I've been working on the performance analyzer and will try running this past people on gekko.

James

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants