feat(DATA-003): calculate live option greeks
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from datetime import UTC, datetime
|
||||
from datetime import datetime, timezone
|
||||
|
||||
from nicegui import ui
|
||||
|
||||
@@ -20,7 +20,7 @@ def _format_timestamp(value: str | None) -> str:
|
||||
timestamp = datetime.fromisoformat(value.replace("Z", "+00:00"))
|
||||
except ValueError:
|
||||
return value
|
||||
return timestamp.astimezone(UTC).strftime("%Y-%m-%d %H:%M:%S UTC")
|
||||
return timestamp.astimezone(timezone.utc).strftime("%Y-%m-%d %H:%M:%S UTC")
|
||||
|
||||
|
||||
def _build_live_portfolio(config: PortfolioConfig, quote: dict[str, object]) -> dict[str, float | str]:
|
||||
|
||||
Reference in New Issue
Block a user