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---2name: xauusd-trading-stack3description: Federation-wide gold (XAUUSD) trading capability. Python stack, OANDA broker, backtesting, macro signals, RSI strategy. Every organ has a role.4---56# XAUUSD Trading Stack — Federation Skill78> **DITEMPA BUKAN DIBERI** — Gold is wealth. The stack is forged. Trade with governance.9> **This skill wires the entire federation to think about gold.**1011## Quick Start (Any Agent)1213```python14import sys15sys.path.insert(0, "/root/trading")16from quickstart import get_oanda_client, get_gold_price, run_backtest1718# Check gold price now19price = get_gold_price()20print(f"XAUUSD: {price}")2122# Connect to OANDA (needs credentials in config/oanda.env)23client = get_oanda_client()24```2526## What Lives Where2728| Path | Purpose |29|------|---------|30| `${TRADING_HOME:-/root/trading}/` | Python venv + all trading code |31| `${TRADING_HOME:-/root/trading}/bin/python3` | Python interpreter with all packages |32| `${TRADING_HOME:-/root/trading}/config/oanda.env` | OANDA credentials (NEVER commit) |33| `${TRADING_HOME:-/root/trading}/strategies/` | Backtrader strategies |34| `${TRADING_HOME:-/root/trading}/data/` | Cached market data |35| `${TRADING_HOME:-/root/trading}/logs/` | Trade logs |36| `/root/XAUUSD_TRADING_RESEARCH.md` | Full research brief |37| `${AAA_HOME:-/root/AAA}/prompts/XAUUSD_RSI_UPGRADE_v1.0.md` | RSI upgrade prompt |3839## Installed Packages4041| Package | Version | Purpose |42|---------|---------|---------|43| backtrader | 1.9.78 | Backtesting engine |44| TA-Lib | 0.7.0 | Technical analysis (RSI, MACD, BB, etc.) |45| pandas-ta | 0.4.71 | Pure-Python TA fallback |46| yfinance | 1.5.1 | Market data (GC=F for gold futures) |47| ccxt | 4.5.65 | Exchange connectivity |48| oandapyV20 | 0.7.2 | OANDA broker API |49| fredapi | 0.5.2 | Federal Reserve macro data |50| pandas | 3.0.3 | Data manipulation |51| numpy | 2.2.6 | Numerical computing |5253## Organ Roles5455| Organ | Role | Tool/Action |56|-------|------|-------------|57| **arifOS** | Govern | Approve/block trades, F1-F13 floor checks, seal receipts |58| **A-FORGE** | Execute | Run backtests, place orders, manage positions |59| **WEALTH** | Think | Position sizing, portfolio optimization, EMV, risk parity |60| **GEOX** | Sense | Commodity supply signals, macro regime detection |61| **WELL** | Guard | Human readiness gate — no manual trades if fatigued |62| **AAA** | Display | Cockpit dashboard, trade journal, P&L tearsheets |63| **VAULT999** | Record | Immutable trade receipts, sealed strategies |6465## RSI Protocol (5 Phases)6667Every trading session follows RSI:68691. **TRACE** — What did we observe? (market data, signals, decisions)702. **DIAGNOSE** — What worked, what didn't? (backtest vs live, signal quality)713. **REMEDIATE** — Fix the bottleneck (strategy tweak, risk adjustment, new signal)724. **LEDGER** — Record the delta (append to cooling ledger)735. **SEAL** — Lock learnings into VAULT999 (if significant)7475## Safety Rails (F1-F13)7677- **F1 AMANAH** — All trades start as paper/demo. Live trading requires explicit F13 approval.78- **F2 TRUTH** — No fabricated P&L. All backtest results come from real data.79- **F5 PEACE** — No leveraged positions > 10:1 without F13 approval.80- **F7 HUMILITY** — Surface uncertainty. "I don't know" is valid.81- **F9 ANTIHANTU** — No fake signals, no pump-and-dump, no manipulation.82- **F13 SOVEREIGN** — Arif has final say on all live trades.8384## Agent Discovery8586Any agent can find this skill via:87- Path: `/root/.agents/skills/XAUUSD-trading-stack/SKILL.md`88- Trigger phrases: "trade gold", "xauusd", "backtest", "oanda"89- Federation registry: `FEDERATED_SKILLS_REGISTRY_V3.yaml`9091## For Hermes ASI9293Hermes can use this skill to:941. Run backtests via `${TRADING_HOME:-/root/trading}/bin/python3 strategies/xauusd_rsi_basic.py`952. Fetch live prices via the quickstart module963. Generate trade signals with RSI + macro overlay974. Route trade approval through arifOS (F1-F13)985. Seal successful strategies to VAULT999996. Run RSI cycle at session end (cooling-ledger-rsi integration)