Add ability to track options contracts with strike price, breakeven, and premium display#3
Add ability to track options contracts with strike price, breakeven, and premium display#3Copilot wants to merge 6 commits into
Conversation
Co-authored-by: benwyrosdick <1733+benwyrosdick@users.noreply.github.com>
Co-authored-by: benwyrosdick <1733+benwyrosdick@users.noreply.github.com>
Co-authored-by: benwyrosdick <1733+benwyrosdick@users.noreply.github.com>
|
@copilot I don't see the new fields in the output.
I have them setup as options in the config
|
…tion data present Co-authored-by: benwyrosdick <1733+benwyrosdick@users.noreply.github.com>
... Fixed in commit 354ca7f. The issue was that the asset class wasn't being set to The Fix: What you should see now: Left column:
Bottom left:
These fields replace the generic "Prev. Close:" and "Open:" that would normally show for stocks. The fix has been tested with:
Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot I want to add the premium to the output for options below Diff to Strike |
Co-authored-by: benwyrosdick <1733+benwyrosdick@users.noreply.github.com>
Added in commit 07445a6. The premium now displays below "Diff to Strike" in the bottom left section when viewing options with Display format: For your configuration, you'll see:
The premium value matches what you configured in your YAML file and is displayed in the same two-line format used for other option fields. |


Summary
This PR adds support for tracking options contracts in ticker, allowing users to monitor options positions with automatic calculation of breakeven prices and display of key option metrics.
Initial Implementation
Added options configuration support in groups with the following fields:
Bug Fix
Fixed issue where option-specific fields were not displaying in the UI. The asset class was being set to the quote's original class (e.g.,
AssetClassStockfor AAPL, TSLA) instead ofAssetClassOption, so the UI rendering logic that checksif asset.Class == c.AssetClassOptionnever triggered.UI Display
When using the
--show-fundamentalsflag, options now display:Left column (top):
Left column (bottom):
Changes Made
internal/common/common.go: AddedOptionandQuoteOptiondata structures, addedAssetClassOptionto asset class enuminternal/cli/cli.go: Extended group parsing to extract symbols from optionsinternal/asset/asset.go:AssetClassOptionwhen option data is presentinternal/ui/component/watchlist/row/row.go: Extended display logic to show option-specific fields including premiuminternal/asset/asset_test.go: Added comprehensive tests for option functionalityREADME.md: Added documentation with example configurationConfiguration Example
Testing
✅ All 21 asset tests pass including new assertions for asset class
✅ All test suites pass (19 suites)
✅ Build successful
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.