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

Position snapshots incorrect #719

Closed
cjdsellers opened this issue Jul 31, 2022 · 1 comment
Closed

Position snapshots incorrect #719

cjdsellers opened this issue Jul 31, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@cjdsellers
Copy link
Member

Bug Report

Expected Behavior

Position snapshots should accurately reflect the net positions state when persisted in the cache.

Actual Behavior

The snapshots appear to be cumulative for certain fields, and so are not accurate.

Steps to Reproduce the Problem

  • Run any backtest with the strategy OMSType.NETTING and accumulate some positions.
  • Then view the positions report or query the cache for cache.position_snapshots().

Specifications

  • OS platform: x86 Linux Ubuntu 18.04 LTS
  • Python version: 3.8.13
  • nautilus_trader version: 1.150.0
@cjdsellers cjdsellers added the bug Something isn't working label Jul 31, 2022
@cjdsellers cjdsellers self-assigned this Jul 31, 2022
@cjdsellers
Copy link
Member Author

Now fixed from c3abc88 by performing a full state reset for netted flat position which are then reopened.

Position reports now reflect accurate snapshots of the netted position.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

No branches or pull requests

1 participant