Skip to content

Added support for backtesting fees in base currency#56

Merged
gbeced merged 7 commits into
developfrom
feature/backtesting-fees-in-base-currency
May 19, 2026
Merged

Added support for backtesting fees in base currency#56
gbeced merged 7 commits into
developfrom
feature/backtesting-fees-in-base-currency

Conversation

@gbeced

@gbeced gbeced commented May 19, 2026

Copy link
Copy Markdown
Owner

No description provided.

@gbeced gbeced self-assigned this May 19, 2026
@gbeced
gbeced requested a review from Copilot May 19, 2026 01:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR adds base-currency fee charging support to Basana’s backtesting fee model, expanding basana.backtesting.fees.Percentage beyond quote-currency-only fees while keeping quote as the default for backward compatibility.

Changes:

  • Introduced FeeCurrency and added a fee_currency parameter to fees.Percentage to support charging fees in base or quote.
  • Added unit tests covering base-currency fee charging behavior (including partial fills and minimum fee).
  • Updated Sphinx docs and the changelog to document the new capability.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
basana/backtesting/fees.py Adds FeeCurrency enum and extends Percentage fee strategy to compute fees in base or quote currency.
tests/test_backtesting_fees.py Adds test cases for base-currency fee calculation across partial fills and minimum-fee behavior.
docs/backtesting_fees.rst Documents the new FeeCurrency API in backtesting fees reference docs.
CHANGELOG.md Notes the new fee_currency parameter feature and default behavior for compatibility.

Comment thread basana/backtesting/fees.py
Comment thread basana/backtesting/fees.py
Agent-Logs-Url: https://github.com/gbeced/basana/sessions/edf8c93e-edb8-40c9-a6e1-8dff752b1acc

Co-authored-by: gbeced <1163917+gbeced@users.noreply.github.com>
Copilot AI and others added 3 commits May 19, 2026 01:40
Agent-Logs-Url: https://github.com/gbeced/basana/sessions/acf3ac86-53ec-4819-9c1e-0f7c2fe942dd

Co-authored-by: gbeced <1163917+gbeced@users.noreply.github.com>
Agent-Logs-Url: https://github.com/gbeced/basana/sessions/acf3ac86-53ec-4819-9c1e-0f7c2fe942dd

Co-authored-by: gbeced <1163917+gbeced@users.noreply.github.com>
Agent-Logs-Url: https://github.com/gbeced/basana/sessions/acf3ac86-53ec-4819-9c1e-0f7c2fe942dd

Co-authored-by: gbeced <1163917+gbeced@users.noreply.github.com>
Copilot finished work on behalf of gbeced May 19, 2026 01:42

@gbeced gbeced left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Looks good to me.

@gbeced
gbeced merged commit 34454ce into develop May 19, 2026
44 of 45 checks passed
@gbeced
gbeced deleted the feature/backtesting-fees-in-base-currency branch May 19, 2026 02:00
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

Successfully merging this pull request may close these issues.

3 participants