portal: daily EUR/USD spot check against the pricing FX, alert only (no reprice)
ci/woodpecker/push/woodpecker Pipeline was canceled
ci/woodpecker/push/woodpecker Pipeline was canceled
Reads the ECB reference rate in the sweep, compares to FX_POLICY_EUR_USD (1.16), and emails info@ only when the drift first crosses FX_ALERT_PCT (2%). Marker in portal_state keeps a steady breach from mailing daily and resets when inside the band.
This commit is contained in:
1 parent
6b46dfee90
commit
4af22ca4c4
2 files changed
+83
No files matched your search
@@ -0,0 +1,8 @@
|
||||
import os, sys
|
||||
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||
import app.main as m
|
||||
v=m._fx_verdict(1.16); assert v["alert"] is False, v
|
||||
v=m._fx_verdict(1.20); assert v["alert"] is True and v["drift_pct"] > 0, v
|
||||
v=m._fx_verdict(1.10); assert v["alert"] is True and v["drift_pct"] < 0, v
|
||||
v=m._fx_verdict(1.157); assert v["alert"] is False, v # 0.26% drift
|
||||
print("FX VERDICT OK: thresholds and signs behave")
|
||||
Reference in new issue
Block a user