
Amanah Trader is a fully autonomous Shariah-compliant options agent that trades 1-7 DTE cash-secured puts without human approval after deployment. The pipeline runs Ranker (candidates.py:139 filters 2-7% OTM, target 3%, $0.70 floor, cap 10) → Proposer (Featherless Qwen3-27B picks an index and writes a 1-3 sentence rationale, JSON only, fallback to top-ranked) → six fail-closed Gates with no LLM override: Shariah (15-symbol curated universe, MSCI-style 0-100 scoring, ≥70 PASS; a separate 688-record Malaysian SC-SAC databank is committed as governance evidence but not consulted at runtime, since it only covers Bursa Malaysia tickers), Structure (cash_required = strike × 100 × contracts ≤ uncommitted cash), Gharar (two-sided live quote, bounded spread, delivery capacity funded), Maysir (funded commitment to acquire a screened asset below market, not a wager), Riba (account holds no interest-bearing balance or broker credit), and Risk (40% per-trade cap, 10 orders/day) → Execution (Alpaca CLI order submit, client_order_id amanah-{hex12}) → Evidence Log (logs/decisions.jsonl, every decision including rejections). Live on PA3W2J1H6I3X the bot holds 4 open puts (NVDA, AAPL, 2×INTC; premium collected $817, unrealized MTM +$180, equity $100,418.59 +0.42%, collateral $98,050, ~$3k options buying power free, /api/metrics shows 40.5% gate pass) and sleeps outside 09:30-16:00 ET via systemd hackathon-scheduler; a separate cron job buys-to-close expiring legs at market open, so both sides of the position lifecycle run unattended. Prior work github.com/SalmonIsFish/Ai_Finance_Syariah was used as spec only; every file in this repo was authored Aug 28-Sep 4 in-window.
4 Sep 2026