Commit Graph

48 Commits

Author SHA1 Message Date
Bu5hm4nn
887565be74 fix(types): resolve all mypy type errors (CORE-003)
- Fix return type annotation for get_default_premium_for_product
- Add type narrowing for Weight|Money union using _as_money helper
- Add isinstance checks before float() calls for object types
- Add type guard for Decimal.exponent comparison
- Use _unit_typed and _currency_typed properties for type narrowing
- Cast option_type to OptionType Literal after validation
- Fix provider type hierarchy in backtesting services
- Add types-requests to dev dependencies
- Remove '|| true' from CI type-check job

All 36 mypy errors resolved across 15 files.
2026-03-30 00:05:09 +02:00
Bu5hm4nn
dc4ee1f261 feat(CONV-001): add GLD launch date validation, feat(DATA-DB-003): add cache CLI
CONV-001:
- Add GLD_LAUNCH_DATE constant (November 18, 2004)
- Validate reference_date in gld_ounces_per_share()
- Raise ValueError for dates before GLD launch
- Update docstring with valid date range
- Add comprehensive test coverage for edge cases

DATA-DB-003:
- Create scripts/cache_cli.py with three commands:
  - vault-dash cache stats: Show cache statistics
  - vault-dash cache list: List cached entries
  - vault-dash cache clear: Clear all cache files
- Add Makefile targets: cache-stats, cache-list, cache-clear
- Integrate with DatabentoHistoricalPriceSource methods
2026-03-29 12:00:30 +02:00
Bu5hm4nn
9a3b835c95 feat(DATA-DB-004): add Databento settings UI and independent scenario config
- Updated backtests page with Data Source card
  - Data source selector (databento/yfinance/synthetic)
  - Dataset dropdown (XNAS.BASIC, GLBX.MDP3)
  - Resolution dropdown (ohlcv-1d, ohlcv-1h)
  - Cost estimate display (placeholder for now)

- Added Scenario Configuration card
  - Underlying symbol selector (GLD/GC/XAU)
  - Start/end date inputs
  - Start price input (0 = auto-derive)
  - Underlying units, loan amount, margin call LTV

- BacktestPageService updates:
  - get_historical_prices() with data_source parameter
  - get_cost_estimate() for Databento cost estimation
  - get_cache_stats() for cache status display
  - Support for injected custom provider identity
  - DataSourceInfo for provider metadata

- BacktestSettingsRepository integration:
  - Load/save settings per workspace
  - Default values from BacktestSettings.create_default()

- Test update: TLT validation message changed to reflect
  new multi-symbol support (GLD, GC, XAU)
2026-03-29 11:12:11 +02:00
Bu5hm4nn
bf13ab5b46 feat(DATA-DB-001): add Databento historical price source for backtesting
- Add DatabentoHistoricalPriceSource implementing HistoricalPriceSource protocol
- Smart caching with Parquet storage and metadata tracking
- Auto symbol-to-dataset resolution (GLD→XNAS.BASIC, GC=F→GLBX.MDP3)
- Cache management with age threshold invalidation
- Cost estimation via metadata.get_cost()
- Add databento>=0.30.0 to requirements.txt
- Add DATABENTO_API_KEY to .env.example
- Full test coverage with 16 tests
2026-03-29 09:58:02 +02:00
Bu5hm4nn
bb06fa7e80 feat(PORTFOLIO-003): add premium and spread for physical gold positions 2026-03-28 23:53:46 +01:00
Bu5hm4nn
0e972e9dd6 feat(PORTFOLIO-002): add position storage costs 2026-03-28 23:48:41 +01:00
Bu5hm4nn
3b98ebae69 feat(DATA-004): add underlying instrument selector 2026-03-28 16:40:18 +01:00
Bu5hm4nn
9d06313480 feat(PRICING-002): add GLD/GC=F basis display on overview 2026-03-28 09:18:26 +01:00
Bu5hm4nn
4620234967 feat(EXEC-001): add hedge strategy builder 2026-03-27 22:33:20 +01:00
Bu5hm4nn
554a41a060 refactor(BT-001C): share historical fixture provider 2026-03-27 21:41:50 +01:00
Bu5hm4nn
477514f838 feat(BT-002): add historical snapshot provider 2026-03-27 18:31:28 +01:00
Bu5hm4nn
1a6760bee3 feat(PORT-003): add historical ltv charts 2026-03-27 16:39:33 +01:00
Bu5hm4nn
3c9ff201e1 feat(BT-003B): add event comparison drilldown 2026-03-26 22:05:31 +01:00
Bu5hm4nn
bdf56ecebe fix(CORE-001D): close boundary review gaps 2026-03-26 17:34:09 +01:00
Bu5hm4nn
94f3c1ef83 feat(CORE-001D): close remaining boundary cleanup slices 2026-03-26 17:27:44 +01:00
Bu5hm4nn
ff76e326b1 feat(CORE-001D3B): surface alert history degraded state 2026-03-26 15:12:04 +01:00
Bu5hm4nn
753e9d3146 fix(CORE-001D3A): accept decimal boundary inputs 2026-03-26 13:19:18 +01:00
Bu5hm4nn
bb557009c7 feat(CORE-001D3A): normalize alerts and settings service boundaries 2026-03-26 13:10:30 +01:00
Bu5hm4nn
91f67cd414 fix(pre-alpha): preserve injected provider identity 2026-03-26 12:32:52 +01:00
Bu5hm4nn
52d943e614 fix(pre-alpha): preserve injected template services 2026-03-26 12:26:38 +01:00
Bu5hm4nn
d7117bb6a3 fix(pre-alpha): preserve injected backtest services 2026-03-26 12:18:39 +01:00
Bu5hm4nn
18fd0681ca refactor(pre-alpha): align preview and runtime fixture validation 2026-03-26 12:11:45 +01:00
Bu5hm4nn
68275c4d18 refactor(pre-alpha): fail closed on historical fixture bounds 2026-03-26 12:04:42 +01:00
Bu5hm4nn
f38d0a53a9 refactor(pre-alpha): fail closed on historical preview fallbacks 2026-03-26 11:55:45 +01:00
Bu5hm4nn
695f3d07ed fix(CORE-002C): explain undercollateralized historical seeds 2026-03-25 21:44:30 +01:00
Bu5hm4nn
bfb6c71be3 fix(pricing): correct relative hedge payoff calculations 2026-03-25 19:27:26 +01:00
Bu5hm4nn
5217304624 feat(CORE-001D2B): normalize options cache boundaries 2026-03-25 19:05:00 +01:00
Bu5hm4nn
442a0cd702 feat(CORE-001D2A): tighten quote provider cache normalization 2026-03-25 17:10:11 +01:00
Bu5hm4nn
f0d7ab5748 feat(CORE-002): add GLD share quote conversion seam 2026-03-25 14:52:48 +01:00
Bu5hm4nn
40f7e74a1b feat(SEC-001): protect workspace bootstrap with turnstile 2026-03-25 10:02:10 +01:00
Bu5hm4nn
c7c8654be7 feat(CORE-001C): type historical unit materialization 2026-03-24 22:30:36 +01:00
Bu5hm4nn
7c2729485c feat(CORE-001B): migrate overview and hedge math to unit types 2026-03-24 21:57:40 +01:00
Bu5hm4nn
ff4e565ee6 feat(BT-003A): add event comparison page 2026-03-24 19:20:35 +01:00
Bu5hm4nn
d2d85bccdb feat(BT-001A): add backtest scenario runner page 2026-03-24 19:00:22 +01:00
Bu5hm4nn
8566cc203f feat(BT-003): add event preset backtest comparison 2026-03-24 17:49:58 +01:00
Bu5hm4nn
d4dc34d5ab feat(BT-001): add synthetic historical backtesting engine 2026-03-24 16:14:51 +01:00
Bu5hm4nn
2161e10626 feat(EXEC-001A): add named strategy templates 2026-03-24 12:27:39 +01:00
Bu5hm4nn
d0b1304b71 feat(PORT-002): add alert status and history 2026-03-24 11:04:32 +01:00
Bu5hm4nn
140a21c0b6 chore: enforce linting as part of build 2026-03-24 00:26:36 +01:00
Bu5hm4nn
de03bd0064 feat(DATA-003): calculate live option greeks 2026-03-23 23:46:40 +01:00
Bu5hm4nn
133908dd36 feat: prioritize lazy options loading and live overview wiring
- queue OPS-001 Caddy route for vd1.uncloud.vpn
- lazy-load options expirations/chains per expiry
- wire overview to live quote data and persisted portfolio config
- extend browser test to verify live quote metadata
2026-03-23 23:23:59 +01:00
Bu5hm4nn
d51fa05d5a test: add Playwright browser tests and document test loop
- add real browser test for overview and options pages
- document engineering learnings in AGENTS.md
- commit NiceGUI header layout fix
- limit options initial expirations for faster first render
2026-03-23 23:11:38 +01:00
Bu5hm4nn
70ec625146 feat(DATA-002): add live GLD options chain data via yfinance 2026-03-23 22:53:08 +01:00
Bu5hm4nn
21878bf7ff feat(DATA-001): Add live GLD price feed service with Redis caching
- Create PriceFeed service using yfinance
- Cache prices in Redis with 60s TTL
- Add PriceData dataclass for type safety
- Support concurrent price fetching for multiple symbols
2026-03-23 22:25:09 +01:00
Bu5hm4nn
e727f216ae Fix: Remove invalid 'show' param from ui.run_with(), fix mypy errors in cache.py, fix docker-compose volume mount 2026-03-23 19:56:19 +01:00
Bu5hm4nn
7dc5b3d734 Fix type hints and dependency issues for CI
- Add -r requirements.txt to requirements-dev.txt
- Fix mypy errors:
  - Remove slots=True from Settings dataclass
  - Add explicit list[float] type annotations in hedge.py
  - Add type ignore comments for optional QuantLib imports
  - Use Sequence instead of list in GreeksTable for covariance
  - Fix dict type annotation in options.py
  - Add type ignore for nicegui attr-defined errors
- Disable attr-defined error code in mypy config
2026-03-22 10:36:58 +01:00
Bu5hm4nn
874b4a5a02 Fix linting issues: line length, import sorting, unused variables
- Set ruff/black line length to 120
- Reformatted code with black
- Fixed import ordering with ruff
- Disabled lint for UI component files with long CSS strings
- Updated pyproject.toml with proper tool configuration
2026-03-22 10:30:12 +01:00
Bu5hm4nn
00a68bc767 Initial commit: Vault Dashboard for options hedging
- FastAPI + NiceGUI web application
- QuantLib-based Black-Scholes pricing with Greeks
- Protective put, laddered, and LEAPS strategies
- Real-time WebSocket updates
- TradingView-style charts via Lightweight-Charts
- Docker containerization
- GitLab CI/CD pipeline for VPS deployment
- VPN-only access configuration
2026-03-21 19:21:40 +01:00