Add PnL fee comparison tool with dual-plot visualization#45
Closed
devin-ai-integration[bot] wants to merge 2 commits intomainfrom
Closed
Add PnL fee comparison tool with dual-plot visualization#45devin-ai-integration[bot] wants to merge 2 commits intomainfrom
devin-ai-integration[bot] wants to merge 2 commits intomainfrom
Conversation
- Creates time-series PnL comparison showing 0% fees vs 0.05% taker fees - Identifies taker trades using is_maker_ask field from Trade model - Generates dual-plot visualization with matplotlib in dark theme - Configurable time ranges and output file options - Includes summary statistics and fee impact analysis - Uses sample trade data generation for testing - Updates requirements.txt with matplotlib, pandas, numpy dependencies - Adds comprehensive README documentation with usage examples Co-Authored-By: andrei@lighter.xyz <aonut17@gmail.com>
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
- Lower matplotlib requirement from >=3.10.0 to >=3.5.0 for Python 3.9 compatibility - Lower pandas requirement from >=2.3.0 to >=1.3.0 for broader compatibility - Lower numpy requirement from >=2.3.0 to >=1.21.0 for broader compatibility - Ensures CI builds pass on all supported Python versions (3.8, 3.9, 3.10, 3.11) Co-Authored-By: andrei@lighter.xyz <aonut17@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add PnL fee comparison tool with dual-plot visualization
Summary
Adds a new standalone script
pnl_fee_comparison.pythat generates dual-plot time-series visualizations comparing cumulative PnL with 0% fees (current) vs 0.05% taker fees. The tool creates professional dark-themed charts showing the impact of taker fees on trading performance over time.Key features:
is_maker_askfield from Trade modelReview & Testing Checklist for Human
Risk Level: 🟡 Medium - Core functionality works but uses sample data and simplified logic
is_maker_askfield correctly identifies taker vs maker sides in real trade dataget_sample_trades()- needs integration with actual data fetching system from provided attachmentsTrade.additional_properties- verify this works with your real Trade objectsNotes