Commit graph

43 commits

Author SHA1 Message Date
18f4f00516
remove unused fromString on portfolio 2026-08-28 10:38:54 -07:00
34d37e32a8
remove extra pre-multiply on manual snapshot price data
All checks were successful
Generic zig build / build (push) Successful in 5m35s
Generic zig build / publish-macos (push) Successful in 12s
Generic zig build / deploy (push) Successful in 20s
2026-08-27 15:43:36 -07:00
ad55d59f5c
fix option valuation in analysis 2026-08-27 08:14:18 -07:00
a14b1ba4bc
fix/document non-default benchmark stock/bond 2026-08-27 08:01:50 -07:00
77b5e38313
fix manual_price -> price ratio discriminator 2026-08-27 07:32:49 -07:00
6dea255377
fix bug with synthetic securities (with ratio) gain/loss miscalculation in rollups 2026-08-26 21:07:07 -07:00
cd053b9a78
watchlist, benchmark symbols, and portfolio symbols refreshed in all the places 2026-08-10 15:22:45 -07:00
48b422cba4
stock split handling 2026-07-06 12:29:50 -07:00
d619091831
full emdash (and other) scrub 2026-06-25 10:13:25 -07:00
c46d39a954
handle every hand-edited field in import command 2026-06-24 16:13:49 -07:00
cd2ccb4c43
add label field, let notes field be strictly for notes 2026-06-24 16:13:47 -07:00
be888069c0
split audit by broker 2026-06-24 16:06:23 -07:00
de19e3e760
add ability to detect missing accounts during audit 2026-06-24 14:42:12 -07:00
a48dc47837
use lot calculations instead of reinventing the wheel
All checks were successful
Generic zig build / build (push) Successful in 4m24s
Generic zig build / publish-macos (push) Successful in 12s
Generic zig build / deploy (push) Successful in 19s
2026-06-06 15:07:28 -07:00
4b5063e974 initial wells fargo parsing implementation 2026-05-21 16:14:38 -07:00
80a00009d8 land date refactor (similar to money) 2026-05-12 21:40:32 -07:00
53b807d12e upgrade to zig 0.16.0
IO-as-an-interface refactor across the codebase. The big shifts:
- std.io → std.Io, std.fs → std.Io.Dir/File, std.process.Child → spawn/run.
- Juicy Main: pub fn main(init: std.process.Init) gives gpa, io, arena,
  environ_map up front. main.zig + the build/ scripts use it directly.
- Threading io through everywhere that touches the outside world (HTTP,
  files, stderr, sleep, terminal detection). Functions taking `io` now
  announce side effects at the call site — the smell is the feature.
- date math takes `as_of: Date`, not `today: Date`. Caller resolves
  `--as-of` flag vs wall-clock at the boundary; the function operates
  on whatever date it's given. Every "today" parameter renamed and
  the as_of: ?Date + today: Date pattern collapsed.
- now_s: i64 (or before_s/after_s pairs) for sub-second metadata
  fields like snapshot captured_at, audit cadence, formatAge/fmtTimeAgo.
  Also pure and testable.
- legitimate Timestamp.now callers (cache TTL math, FetchResult
  timestamps, rate limiter, per-frame TUI "now" captures) gain
  `// wall-clock required: ...` comments justifying the read.

Test discovery: replaced the local refAllDeclsRecursive with bare
std.testing.refAllDecls(@This()). Sema-pulling main.zig's top-level
decls reaches every test file transitively through the import graph;
no explicit _ = @import(...) lines needed.

Cleanup along the way:
- Dropped DataService.allocator()/io() accessor methods; renamed the
  fields to drop the base_ prefix. Callers use self.allocator and
  self.io directly.
- Dropped now-vestigial io parameters from buildSnapshot,
  analyzePortfolio, compareSchwabSummary, compareAccounts,
  buildPortfolioData, divs.display, quote.display, parsePortfolioOpts,
  aggregateLiveStocks, renderEarningsLines, capitalGainsIndicator,
  aggregateDripLots, printLotRow, portfolio.display, printSnapNote.
- Dropped the unused contributions.computeAttribution date-form
  wrapper (only computeAttributionSpec is called).
- formatAge/fmtTimeAgo take (before_s, after_s) instead of io and
  reading the clock internally.
- parseProjectionsConfig uses an internal stack-buffer
  FixedBufferAllocator instead of an allocator parameter.
- ThreadSafeAllocator wrappers in cache concurrency tests dropped
  (0.16's DebugAllocator is thread-safe by default).
- analyzePortfolio bug surfaced by the rename: snapshot.zig was
  passing wall-clock today instead of as_of, mis-valuing cash/CDs
  for historical backfills.

83 new unit tests added due to removal of IO, bringing coverage from 58%
-> 64%
2026-05-09 22:40:33 -07:00
94494c60ee ai: merge multiple positions with price_ratio fields 2026-04-25 11:15:41 -07:00
bc7605d0c6 filter non-stock totals by open-as-of 2026-04-23 07:24:49 -07:00
6ec6bd634b skip price_ratio on avg_cost fallback 2026-04-23 06:55:27 -07:00
fc0b2d9334 centralize calculation of effective price and market value 2026-04-23 05:45:39 -07:00
d473179815 allow determining portfolio positions for a specific date 2026-04-23 00:36:22 -07:00
4b1989c91a clean up audit: centralize money market detection and load portfolio prices 2026-04-21 12:43:07 -07:00
323af8a351 clean up performance.zig 2026-04-21 12:34:10 -07:00
cbba12a9d6 add unit tests for account valuation 2026-04-11 10:22:03 -07:00
03fd64958b centralize portfolio value 2026-04-11 10:17:29 -07:00
a1aec7be6a add audit command (fidelity only for now) 2026-04-09 17:33:02 -07:00
5acce9d0bf refactor risk module/better sharpe ratios/adjust valuation for covered calls 2026-03-17 09:45:30 -07:00
71ec785e49 make price ratio non-null 2026-03-11 15:34:47 -07:00
31d18e28bd allow setting price ratio 2026-03-11 15:09:56 -07:00
868fcd98d3 move isCusipLike / deal with default risk rate 2026-03-10 15:53:51 -07:00
20c91deb3d store.zig refactored and reviewed 2026-03-09 16:58:12 -07:00
471c8639d8 utilize srf library from/to most concrete types 2026-03-04 17:10:01 -08:00
ecf3d71d97 update pnl -> gain_loss 2026-03-03 13:32:56 -08:00
8f8744d781 ai: skip fetch only if price:: set but no ticker:: alias 2026-03-01 13:09:06 -08:00
54c6af8d6d ai: add tests to tui 2026-03-01 11:22:37 -08:00
35982375da ai: add illiquid assets 2026-02-26 15:51:55 -08:00
8682575ed9 ai: display labels from notes if provided on CUSIP securities 2026-02-26 15:32:59 -08:00
28b6f004a6 ai: portfolio sorting 2026-02-26 14:10:19 -08:00
96cf54f269 ai: show failing stocks, include on portfolio 2026-02-26 12:57:17 -08:00
9beb32a329 ai: handle drip investments 2026-02-26 10:06:27 -08:00
5a4e12ca72 ai: options, cds, cash and bug fixes 2026-02-26 08:52:35 -08:00
47a8f4b600 ai generated, functional, no code review yet 2026-02-25 14:10:27 -08:00