Skip to content

fix(risk-guard): leverage in USD for non-USD positions - #270

Merged
moremeds merged 2 commits into
masterfrom
fix/risk-guard-fx
Nov 8, 2026
Merged

moremeds merged 2 commits into
masterfrom
fix/risk-guard-fx

Conversation

@moremeds

@moremeds moremeds commented Nov 8, 2026

Copy link
Copy Markdown
Owner

Hotfix after the v0.21.0 deploy. The first live run (2026-11-08 17:00 UTC) reported leverage 18.29×: the TSEJ stock 6981 has entry_cost 1,224,646 in JPY, read as USD (15.86× of the 18.29×). Max loss and width are now multiplied by the payload fx_rates[currency]; a non-USD position without a rate is counted as undefined (never 1:1). Test: test_non_usd_position_converted_with_payload_fx_rates. Cushion and drawdown are unaffected.

🤖 Generated with Claude Code

@moremeds
moremeds merged commit 103e4a5 into master Nov 8, 2026
8 checks passed
@moremeds moremeds mentioned this pull request Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant