XAUUSD Trading Stack — Federation Skill
DITEMPA BUKAN DIBERI — Gold is wealth. The stack is forged. Trade with governance.
This skill wires the entire federation to think about gold.
Quick Start (Any Agent)
import sys
sys.path.insert(0, "/root/trading")
from quickstart import get_oanda_client, get_gold_price, run_backtest
# Check gold price now
price = get_gold_price()
print(f"XAUUSD: {price}")
# Connect to OANDA (needs credentials in config/oanda.env)
client = get_oanda_client()
What Lives Where
| Path |
Purpose |
${TRADING_HOME:-/root/trading}/ |
Python venv + all trading code |
${TRADING_HOME:-/root/trading}/bin/python3 |
Python interpreter with all packages |
${TRADING_HOME:-/root/trading}/config/oanda.env |
OANDA credentials (NEVER commit) |
${TRADING_HOME:-/root/trading}/strategies/ |
Backtrader strategies |
${TRADING_HOME:-/root/trading}/data/ |
Cached market data |
${TRADING_HOME:-/root/trading}/logs/ |
Trade logs |
/root/XAUUSD_TRADING_RESEARCH.md |
Full research brief |
${AAA_HOME:-/root/AAA}/prompts/XAUUSD_RSI_UPGRADE_v1.0.md |
RSI upgrade prompt |
Installed Packages
| Package |
Version |
Purpose |
| backtrader |
1.9.78 |
Backtesting engine |
| TA-Lib |
0.7.0 |
Technical analysis (RSI, MACD, BB, etc.) |
| pandas-ta |
0.4.71 |
Pure-Python TA fallback |
| yfinance |
1.5.1 |
Market data (GC=F for gold futures) |
| ccxt |
4.5.65 |
Exchange connectivity |
| oandapyV20 |
0.7.2 |
OANDA broker API |
| fredapi |
0.5.2 |
Federal Reserve macro data |
| pandas |
3.0.3 |
Data manipulation |
| numpy |
2.2.6 |
Numerical computing |
Organ Roles
| Organ |
Role |
Tool/Action |
| arifOS |
Govern |
Approve/block trades, F1-F13 floor checks, seal receipts |
| A-FORGE |
Execute |
Run backtests, place orders, manage positions |
| WEALTH |
Think |
Position sizing, portfolio optimization, EMV, risk parity |
| GEOX |
Sense |
Commodity supply signals, macro regime detection |
| WELL |
Guard |
Human readiness gate — no manual trades if fatigued |
| AAA |
Display |
Cockpit dashboard, trade journal, P&L tearsheets |
| VAULT999 |
Record |
Immutable trade receipts, sealed strategies |
RSI Protocol (5 Phases)
Every trading session follows RSI:
- TRACE — What did we observe? (market data, signals, decisions)
- DIAGNOSE — What worked, what didn't? (backtest vs live, signal quality)
- REMEDIATE — Fix the bottleneck (strategy tweak, risk adjustment, new signal)
- LEDGER — Record the delta (append to cooling ledger)
- SEAL — Lock learnings into VAULT999 (if significant)
Safety Rails (F1-F13)
- F1 AMANAH — All trades start as paper/demo. Live trading requires explicit F13 approval.
- F2 TRUTH — No fabricated P&L. All backtest results come from real data.
- F5 PEACE — No leveraged positions > 10:1 without F13 approval.
- F7 HUMILITY — Surface uncertainty. "I don't know" is valid.
- F9 ANTIHANTU — No fake signals, no pump-and-dump, no manipulation.
- F13 SOVEREIGN — Arif has final say on all live trades.
Agent Discovery
Any agent can find this skill via:
- Path:
/root/.agents/skills/XAUUSD-trading-stack/SKILL.md
- Trigger phrases: "trade gold", "xauusd", "backtest", "oanda"
- Federation registry:
FEDERATED_SKILLS_REGISTRY_V3.yaml
For Hermes ASI
Hermes can use this skill to:
- Run backtests via
${TRADING_HOME:-/root/trading}/bin/python3 strategies/xauusd_rsi_basic.py
- Fetch live prices via the quickstart module
- Generate trade signals with RSI + macro overlay
- Route trade approval through arifOS (F1-F13)
- Seal successful strategies to VAULT999
- Run RSI cycle at session end (cooling-ledger-rsi integration)
1---2id: xauusd-trading-stack3name: xauusd-trading-stack4version: 1.0.0-2026.07.145description: >6 Federation-wide gold (XAUUSD) trading capability. Python stack, OANDA broker,7 backtesting, macro signals, RSI strategy. Every organ has a role.8owner: A-FORGE (execution) / WEALTH (intelligence) / arifOS (governance)9risk_tier: high10floor_scope: [F1, F2, F4, F5, F6, F7, F8, F9, F11, F13]11autonomy_tier: T312trigger_phrases:13 - "trade gold"14 - "xauusd"15 - "gold trading"16 - "backtest gold"17 - "oanda"18 - "gold strategy"19 - "RSI gold"20dependencies:21 mcp_servers: [arifos, aforge, wealth, geox, well]22 skills: [ASI-cooling-ledger-rsi, wealth-collapse-signature]23 python_env: /root/trading/24 research: /root/XAUUSD_TRADING_RESEARCH.md25inputs:26 - market_data (OANDA / yfinance)27 - macro_signals (fredapi / GEOX)28 - human_readiness (WELL)29 - risk_limits (arifOS F1-F13)30outputs:31 - trade_signals32 - backtest_results33 - portfolio_metrics34 - sealed_trade_receipts (VAULT999)35capability_tier: fed-reasoning-heavy36ecology_state: WARM37---3839# XAUUSD Trading Stack — Federation Skill4041> **DITEMPA BUKAN DIBERI** — Gold is wealth. The stack is forged. Trade with governance.42> **This skill wires the entire federation to think about gold.**4344## Quick Start (Any Agent)4546```python47import sys48sys.path.insert(0, "/root/trading")49from quickstart import get_oanda_client, get_gold_price, run_backtest5051# Check gold price now52price = get_gold_price()53print(f"XAUUSD: {price}")5455# Connect to OANDA (needs credentials in config/oanda.env)56client = get_oanda_client()57```5859## What Lives Where6061| Path | Purpose |62|------|---------|63| `${TRADING_HOME:-/root/trading}/` | Python venv + all trading code |64| `${TRADING_HOME:-/root/trading}/bin/python3` | Python interpreter with all packages |65| `${TRADING_HOME:-/root/trading}/config/oanda.env` | OANDA credentials (NEVER commit) |66| `${TRADING_HOME:-/root/trading}/strategies/` | Backtrader strategies |67| `${TRADING_HOME:-/root/trading}/data/` | Cached market data |68| `${TRADING_HOME:-/root/trading}/logs/` | Trade logs |69| `/root/XAUUSD_TRADING_RESEARCH.md` | Full research brief |70| `${AAA_HOME:-/root/AAA}/prompts/XAUUSD_RSI_UPGRADE_v1.0.md` | RSI upgrade prompt |7172## Installed Packages7374| Package | Version | Purpose |75|---------|---------|---------|76| backtrader | 1.9.78 | Backtesting engine |77| TA-Lib | 0.7.0 | Technical analysis (RSI, MACD, BB, etc.) |78| pandas-ta | 0.4.71 | Pure-Python TA fallback |79| yfinance | 1.5.1 | Market data (GC=F for gold futures) |80| ccxt | 4.5.65 | Exchange connectivity |81| oandapyV20 | 0.7.2 | OANDA broker API |82| fredapi | 0.5.2 | Federal Reserve macro data |83| pandas | 3.0.3 | Data manipulation |84| numpy | 2.2.6 | Numerical computing |8586## Organ Roles8788| Organ | Role | Tool/Action |89|-------|------|-------------|90| **arifOS** | Govern | Approve/block trades, F1-F13 floor checks, seal receipts |91| **A-FORGE** | Execute | Run backtests, place orders, manage positions |92| **WEALTH** | Think | Position sizing, portfolio optimization, EMV, risk parity |93| **GEOX** | Sense | Commodity supply signals, macro regime detection |94| **WELL** | Guard | Human readiness gate — no manual trades if fatigued |95| **AAA** | Display | Cockpit dashboard, trade journal, P&L tearsheets |96| **VAULT999** | Record | Immutable trade receipts, sealed strategies |9798## RSI Protocol (5 Phases)99100Every trading session follows RSI:1011021. **TRACE** — What did we observe? (market data, signals, decisions)1032. **DIAGNOSE** — What worked, what didn't? (backtest vs live, signal quality)1043. **REMEDIATE** — Fix the bottleneck (strategy tweak, risk adjustment, new signal)1054. **LEDGER** — Record the delta (append to cooling ledger)1065. **SEAL** — Lock learnings into VAULT999 (if significant)107108## Safety Rails (F1-F13)109110- **F1 AMANAH** — All trades start as paper/demo. Live trading requires explicit F13 approval.111- **F2 TRUTH** — No fabricated P&L. All backtest results come from real data.112- **F5 PEACE** — No leveraged positions > 10:1 without F13 approval.113- **F7 HUMILITY** — Surface uncertainty. "I don't know" is valid.114- **F9 ANTIHANTU** — No fake signals, no pump-and-dump, no manipulation.115- **F13 SOVEREIGN** — Arif has final say on all live trades.116117## Agent Discovery118119Any agent can find this skill via:120- Path: `/root/.agents/skills/XAUUSD-trading-stack/SKILL.md`121- Trigger phrases: "trade gold", "xauusd", "backtest", "oanda"122- Federation registry: `FEDERATED_SKILLS_REGISTRY_V3.yaml`123124## For Hermes ASI125126Hermes can use this skill to:1271. Run backtests via `${TRADING_HOME:-/root/trading}/bin/python3 strategies/xauusd_rsi_basic.py`1282. Fetch live prices via the quickstart module1293. Generate trade signals with RSI + macro overlay1304. Route trade approval through arifOS (F1-F13)1315. Seal successful strategies to VAULT9991326. Run RSI cycle at session end (cooling-ledger-rsi integration)