feat(PORT-004C): seed workspace routes from portfolio settings
This commit is contained in:
@@ -66,6 +66,25 @@ def test_event_comparison_page_service_exposes_seeded_preset_options() -> None:
|
||||
)
|
||||
|
||||
|
||||
def test_event_comparison_page_service_keeps_fixture_window_while_using_caller_portfolio_inputs() -> None:
|
||||
service = EventComparisonPageService()
|
||||
|
||||
report = service.run_read_only_comparison(
|
||||
preset_slug="gld-jan-2024-selloff",
|
||||
template_slugs=("protective-put-atm-12m",),
|
||||
underlying_units=9680.0,
|
||||
loan_amount=222000.0,
|
||||
margin_call_ltv=0.80,
|
||||
)
|
||||
|
||||
assert report.scenario.start_date.isoformat() == "2024-01-02"
|
||||
assert report.scenario.end_date.isoformat() == "2024-01-08"
|
||||
assert report.scenario.initial_portfolio.entry_spot == 100.0
|
||||
assert report.scenario.initial_portfolio.underlying_units == 9680.0
|
||||
assert report.scenario.initial_portfolio.loan_amount == 222000.0
|
||||
assert report.scenario.initial_portfolio.margin_call_ltv == 0.80
|
||||
|
||||
|
||||
def test_event_comparison_page_service_resets_template_selection_to_preset_defaults() -> None:
|
||||
service = EventComparisonPageService()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user