Documentation
Everything you need to get started with Augy.
Getting Started
Writing Agents
Agents are Python classes that implement a simple interface:
from augy import Agent, Action, Context
class MyAgent(Agent):
def on_start(self, ctx: Context):
"""Called once at startup."""
self.short_period = 12
self.long_period = 26
def on_bar(self, bar, ctx: Context):
"""Called on each new candle."""
pass
def decide(self, ctx: Context) -> Action:
"""Return BUY, SELL, or HOLD."""
return Action.HOLD
The same agent code works across backtest, paper trading, and live mode. Only the execution layer changes.
Backtesting
Run your agent against historical market data to see how your strategy would have performed. Augy calculates key metrics:
- Total return and PnL
- Sharpe ratio
- Max drawdown
- Win rate
- Equity curves
Bring your own market data API key. Data is cached locally for fast re-runs.
Paper Trading
Paper trading runs your agent against live market data with simulated execution. No real capital at risk. Monitor your agent's decisions in real time and validate your strategy before going live.
Live Trading
Connect your broker API keys and let your agent trade with real capital. Built-in risk controls (position limits, max drawdown, daily loss limits) protect your account. Same agent code as backtest and paper trading -- no rewrites.
Alerts
Not ready to let an agent trade for you? Set up alerts instead. When your agent detects a trade matching your criteria, get notified via:
- Discord webhook
- Telegram bot
- SMS (via Twilio or similar)
Customize what triggers an alert and how it's delivered. You decide when to act on the signal.