Enhance Commission Handling#14
Conversation
…toggle. Addresses issue MarkT1065#5. (MarkT1065#7) * Enhanced Monthly chart to display cumulative and monthly data via UI toggle * Enhanced Monthly chart to display cumulative and monthly data via UI toggle (code and screenshots) * Added screenshots * Update README.md, remove previous screenshots and add new screenshot * Remove test database from tracking and add to .gitignore
- Add commission field to options table (stored as total) - Implement automatic migration from per-contract to total storage - Add OPTION_COMMISSION_PER_CONTRACT setting (default: 0.65) - Update UI to display commission totals in red - Add $ signs to Strike, Premium, and Total Commission columns - Add Commission Total to Monthly Results section - Fix CalculatePercentOfProfit() bug - Update all tests for commission changes - Add database backup before migration - Update model.md documentation Addresses issue MarkT1065#10
- Add commission field to options table (stored as total) - Implement automatic migration from per-contract to total storage - Add OPTION_COMMISSION_PER_CONTRACT setting (default: 0.65) - Update UI to display commission totals in red - Add $ signs to Strike, Premium, and Total Commission columns - Add Commission Total to Monthly Results section - Fix CalculatePercentOfProfit() bug - Update all tests for commission changes - Add database backup before migration - Update model.md documentation Addresses issue MarkT1065#10
…com/antamy/wheeler into feature/enhance-commission-handling
- Added Commissions column to symbol page header (displayed in red) - Added $ signs to Strike, Premium, and Total Commission columns in Options table - Added Commission Total to Monthly Results section - Fixed Go idiom warnings (QF1003) by using tagged switch statements - Fixed unused parameter bug in index_test.go eztime() function - Updated model.md documentation for commission field - Improved .gitignore for database file handling
| @@ -0,0 +1,1403 @@ | |||
| # WHEELER - ENHANCE COMMISSION HANDLING | |||
There was a problem hiding this comment.
Doc/plan to implement the feature looks good (and verbose!). Think we still need this markdown?
There was a problem hiding this comment.
I will remove it. There also were some conflicts which surprised me, but Claude assures me they have been addressed!
The docs/ directory contains local development documentation that should not be tracked in the repository.
currentdb and test_db.db should remain in the repository as starting points for new users. Local modifications to these files should not be committed.
Resolved conflicts in: - .gitignore: Combined both versions, added .claude from upstream - schema.sql: Kept commission comment, added current_price field from upstream - symbol.html: Used upstream date format (01/02/2006), kept $ signs for Strike/Premium/Commission
antamy
left a comment
There was a problem hiding this comment.
Hi Mark, is there anything you need in order to accept and merge this PR?
|
everything looks good at first glance but I'd like to pull the branch and test first. |
|
@antamy sorry to have let this languish. I'm reviewing it again, I've made other improvements to wheeler, and I'd appreciate your feedback on working through a v2 API. some of the improvements I've made include a schema migration system so we can safely refactor/migrate to a new API over time while keeping existing stuff working. Please rebase? |
|
No problem, the past few weeks have been hectic for me. I am hoping next week to have time to get back into this and get v2 up and running. |
Fixes #10
Summary
This PR implements comprehensive commission tracking for options trades, addressing the requirements discussed in issue #10 with @MarkT1065.
Changes Made
Core Commission Handling
commissionfield to options table (stores total commission, not per-contract)OPTION_COMMISSION_PER_CONTRACTsetting (default: 0.65) configurable via Settings pageper_contract_rate × contractsper_contract_rate × contracts × 2UI Enhancements
Bug Fixes
CalculatePercentOfProfit()to use total commission instead of per-contracteztime()unused parameter in test helperTesting
CreateWithCommission()methodNewOptionServicecalls to includeSettingServiceparameterDocumentation
model.mdwith commission field documentation.gitignorerules for database files and backupsMigration Details
The migration:
data/backups/before migratingTesting