jesse-ai / jesse

An advanced crypto trading bot written in Python
https://jesse.trade
MIT License
5.73k stars 732 forks source link

feat(backtest-optimization): reduce overhead of calls in Orders #472

Open yakir4123 opened 2 months ago

yakir4123 commented 2 months ago

IMPORTANT: Changes in Live-plugin is required

orders are used a lot, and each filed is an orm field which give an overhead for every setter / getter of the attributes.

refactor it to simple dataclass remove this overhead.

Here is an example of strategy that is always in position and has a lot of entry and exit orders Current state image

With these modification image

The numbers are getting bigger when there are more orders for longer times.

stale[bot] commented 1 week ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.