Skip to content

Align Docker support files and commands#22

Closed
felipeimpieri wants to merge 1 commit intocodex/clean-repo-and-fix-keyerror-close-kyrlsofrom
codex/resolve-merge-conflicts-and-update-files-to7tvd
Closed

Align Docker support files and commands#22
felipeimpieri wants to merge 1 commit intocodex/clean-repo-and-fix-keyerror-close-kyrlsofrom
codex/resolve-merge-conflicts-and-update-files-to7tvd

Conversation

@felipeimpieri
Copy link
Owner

Summary

  • update the Docker ignore rules to match the required cache and repository exclusions
  • refresh the README Docker instructions to use the specified build and run commands

Testing

  • python -m py_compile $(git ls-files '*.py')
  • python -m pytest -q

Codex Task

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +109 to +113
prev_pos = pos.shift(1).fillna(0.0)
entries = (pos != 0.0) & (pos != prev_pos)
# shift trade ids so the flip bar's return stays with the trade that held it
trade_ids = entries.shift(1).cumsum()
trade_ids = trade_ids.where(pos != 0.0)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Trade metrics ignore the closing bar

Trade returns are grouped with trade_ids derived from the current position (entries/pos) while per-bar returns use the previous position (strat_rets = pos.shift(1)…). When a signal turns flat, the return on that final bar still affects equity but is masked out of trade_returns, so per-trade stats under-report results (e.g., signals [1, 1, 0] on prices 100→110→121 yield 21% equity growth but the average trade return reports only 10%). Align the trade-id mask with the shifted position (e.g., use prev_pos or pos.shift(1) when deciding which bars belong to a trade) so closing bars are included in trade metrics.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant