Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

Buy_hold is always wrong #2764

Open
arthurwolf opened this issue Nov 27, 2021 · 0 comments
Open

Buy_hold is always wrong #2764

arthurwolf opened this issue Nov 27, 2021 · 0 comments

Comments

@arthurwolf
Copy link

Buy_hold changes from execution to execution (at least in simulations)

This is because the code that is used to remember the initial trade value is not always executed at the same time (in lolex/simulation terms), random amounts of time can have happened (due to the exchange's simulated latency) by the time we get to the code (in SyncBalance()) that takes note of the initial value (in s.start_capital).

I made a dirty fix by moving that code into initBuffer() but I doubt that's the right way to do this.

I'm looking for advice in how to fix this properly, will do a PR once I have a good enough solution.

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

No branches or pull requests

2 participants