feat(BT-002): add historical snapshot provider
This commit is contained in:
@@ -135,6 +135,18 @@ class EventComparisonPageService:
|
||||
preset = self.event_preset_service.get_preset(preset_slug)
|
||||
return tuple(preset.scenario_overrides.default_template_slugs)
|
||||
|
||||
def derive_entry_spot(self, *, preset_slug: str, template_slugs: tuple[str, ...]) -> float:
|
||||
if not template_slugs:
|
||||
raise ValueError("Select at least one strategy template.")
|
||||
scenario = self.comparison_service.preview_scenario_from_inputs(
|
||||
preset_slug=preset_slug,
|
||||
template_slugs=template_slugs,
|
||||
underlying_units=1.0,
|
||||
loan_amount=0.0,
|
||||
margin_call_ltv=0.75,
|
||||
)
|
||||
return float(scenario.initial_portfolio.entry_spot)
|
||||
|
||||
def preview_scenario(
|
||||
self,
|
||||
*,
|
||||
|
||||
Reference in New Issue
Block a user