Skip to content

Commit

Permalink
test update theme
Browse files Browse the repository at this point in the history
  • Loading branch information
United-Visions committed Feb 19, 2025
1 parent 40c33fc commit f9b1dd2
Show file tree
Hide file tree
Showing 13 changed files with 413 additions and 742 deletions.
16 changes: 7 additions & 9 deletions docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,19 @@ title: Trading Pal
description: An advanced AI-powered trading platform with multi-broker integration and comprehensive market analysis capabilities
baseurl: "/Trading_Pal-main"
url: "https://united-visions.github.io"
repository: United-Visions/Trading_Pal-main

# Theme settings
remote_theme: aksakalli/jekyll-doc-theme@gh-pages
bootwatch: slate

# Build settings
markdown: kramdown
theme: minima
plugins:
- jekyll-feed
- jekyll-seo-tag
- jekyll-sitemap

# Theme settings
minima:
skin: dark
social_links:
github: United-Visions/Trading_Pal-main

# Collections
collections:
docs:
Expand All @@ -29,12 +27,12 @@ defaults:
path: ""
type: "docs"
values:
layout: "default"
layout: "docs"
- scope:
path: ""
type: "pages"
values:
layout: "default"
layout: "page"

# Navigation
header_pages:
Expand Down
15 changes: 5 additions & 10 deletions docs/_data/docs.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
- title: Getting Started
- title: Documentation
docs:
- home
- themes
- customization

- title: Examples
docs:
- cheatsheet
- font-awesome
- bootstrap
- index
- data_server
- charts_display
- backtesting
96 changes: 96 additions & 0 deletions docs/_docs/backtesting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
---
title: Backtesting
permalink: /docs/backtesting/
---

# Trading Pal Backtesting Engine

Trading Pal's advanced backtesting engine combines natural language processing with sophisticated market analysis to test trading strategies across multiple asset classes. Our AI-powered system enables traders to define strategies in plain English while providing comprehensive performance metrics and risk analysis.

## Natural Language Strategy Definition

### Example Strategy Commands
```text
"Buy when the 20-day moving average crosses above the 50-day moving average and RSI is below 70"
"Sell if price drops below the lower Bollinger Band and volume is above the 20-day average"
"Long entry when MACD histogram turns positive and price is above 200-day MA"
"Place a buy order for 100 shares when RSI drops below 30"
"Execute short position if price breaks below support with increased volume"
```

## Multi-Market Testing

### Stocks (via Alpaca)
- US Equities
- Real-time data
- Historical prices
- Volume analysis

### Forex (via OANDA)
- Major pairs
- Minor pairs
- Tick data
- Spread analysis

### Crypto (via Alpaca)
- Major cryptocurrencies
- 24/7 trading
- Order book data
- Market depth

## AI-Powered Analysis

### Strategy Validation
Our AI agents validate trading strategies by analyzing:
- Historical performance
- Risk metrics
- Market conditions
- Correlation analysis

### Performance Metrics
```json
{
"totalReturn": "25.8%",
"sharpeRatio": 1.85,
"maxDrawdown": "12.3%",
"winRate": "62.5%",
"profitFactor": 1.75,
"averageTrade": "$245.50",
"tradeCount": 156
}
```

## Advanced Features

### Multi-Broker Testing
Test strategies across different brokers and markets simultaneously, with unified reporting and analysis.

### AI Strategy Optimization
Machine learning algorithms optimize strategy parameters based on historical performance.

### Risk Analysis
Comprehensive risk assessment including VaR, correlation analysis, and stress testing.

## Natural Language Commands

| Command Type | Example | Description |
|--------------|---------|-------------|
| Strategy Definition | "Buy when RSI is oversold and MACD crosses up" | Define trading rules in plain English |
| Performance Analysis | "Show me the strategy performance for last month" | Request specific performance metrics |
| Risk Management | "Set stop loss at 2% per trade" | Configure risk parameters |
| Portfolio Management | "Optimize position sizes for maximum Sharpe ratio" | Portfolio optimization commands |

## Integration with Trading Pal Agent

### AI Agent Capabilities
The Trading Pal AI agent enhances backtesting by:

- Validating strategy logic and parameters
- Suggesting optimizations based on historical performance
- Monitoring for potential risks and correlations
- Providing natural language insights and recommendations
- Automating strategy deployment across multiple brokers
121 changes: 121 additions & 0 deletions docs/_docs/charts_display.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
---
title: Charts Display
permalink: /docs/charts_display/
---

# Trading Pal Charts Display

Trading Pal's charting system provides a powerful visualization platform that integrates with our AI trading agent and multiple data sources. The system supports real-time data from both Alpaca and OANDA, enabling comprehensive market analysis across stocks, forex, and cryptocurrencies.

## Chart Types

### Candlestick
Japanese candlestick charts with customizable colors and styles for price action analysis.

### Line
Clean line charts ideal for trend analysis and price movement tracking.

### Bar
Traditional OHLC bar charts with optional volume indicators.

### Area
Filled area charts for visualizing cumulative data and volume analysis.

## Market Coverage

### Stocks (Alpaca)
- US Equities
- Real-time Level 2 Data
- Pre/Post Market Data
- Historical OHLCV

### Forex (OANDA)
- Major/Minor Pairs
- Tick-by-Tick Data
- Spread Information
- Position Book Data

### Crypto (Alpaca)
- Major Cryptocurrencies
- 24/7 Market Data
- Order Book Depth
- Trade History

## Technical Indicators

| Category | Indicators | Customization |
|----------|------------|---------------|
| Trend | Moving Averages (SMA, EMA, WMA), MACD, ADX, Parabolic SAR | Periods, Colors, Styles |
| Momentum | RSI, Stochastic, CCI, Williams %R | Overbought/Oversold Levels |
| Volatility | Bollinger Bands, ATR, Standard Deviation | Deviation Multiplier, Period |
| Volume | OBV, Volume Profile, Money Flow Index | Time Periods, Display Style |

## AI Integration

### Natural Language Chart Control
Control charts using natural language commands:

```text
"Show me a 1-hour candlestick chart for EUR/USD"
"Add Bollinger Bands with 20-period and 2 standard deviations"
"Display RSI in a separate panel below"
"Zoom to the last 5 trading days"
"Save this chart layout as 'Forex Analysis'"
```

## Interactive Features

### Chart Controls
- 🖱️ Mouse wheel zoom
- 👆 Click and drag to pan
- 📏 Drawing tools
- 📊 Multi-timeframe analysis
- 🎯 Price alerts

### Trading Integration
- 💼 One-click trading
- 📈 Position visualization
- ⚡ Real-time order updates
- 💰 P&L tracking
- 🎚️ Risk management overlays

## Chart Configurations

```javascript
// Example chart configuration
const chart = new Chart({
type: 'candlestick',
data: {
symbol: 'NASDAQ:AAPL',
timeframe: '1H',
indicators: [{
type: 'ema',
period: 20,
color: '#2196f3'
}, {
type: 'bollinger',
period: 20,
stdDev: 2,
fill: 'rgba(33, 150, 243, 0.1)'
}]
},
options: {
theme: 'dark',
autoScale: true,
volume: true,
crosshair: true
}
});
```

## Advanced Features

### Trading Pal Integration
The charting system integrates with Trading Pal's core features:

- AI-powered pattern recognition and alerts
- Automated strategy visualization
- Multi-broker order management
- Real-time position tracking
- Custom indicator development
- Chart-based backtesting
114 changes: 114 additions & 0 deletions docs/_docs/data_server.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
---
title: Data Server
permalink: /docs/data_server/
---

# Trading Pal Data Server

The Trading Pal data server is an experimental high-performance service that provides real-time market data to support various platform functionalities. This separate server architecture enables multi-functional capabilities including charting, algorithmic trading, AI analysis, and custom indicators.

## Server Architecture

### Core Features
- High-performance data processing
- Real-time market data streaming
- Historical data aggregation
- Multi-source data integration
- Custom data feed support

### Integration Points
- Interactive charting system
- AI trading algorithms
- Technical indicators
- Backtesting engine
- Real-time analytics

## API Endpoints

### GET `/data/{symbol}`
Returns real-time market data for the specified symbol.

#### Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| symbol | string | Trading symbol in format `exchange:symbol` (e.g., `NASDAQ:AAPL`, `OANDA:EUR_USD`) |

#### Example Response

```json
{
"symbol": "NASDAQ:AAPL",
"timestamp": "2025-02-13T10:32:00Z",
"price": 150.25,
"volume": 10000,
"bid": 150.20,
"ask": 150.30,
"high": 151.00,
"low": 149.50,
"indicators": {
"rsi": 45.67,
"macd": {
"line": 0.35,
"signal": 0.28,
"histogram": 0.07
}
}
}
```

### GET `/historical/{symbol}/{start}/{end}`
Returns historical market data for the specified symbol and date range.

#### Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| symbol | string | Trading symbol in format `exchange:symbol` |
| start | string | Start date in YYYY-MM-DD format |
| end | string | End date in YYYY-MM-DD format |

## Data Sources

### Alpaca Integration
- US Stock market data
- Cryptocurrency data
- Real-time updates
- Historical data

### OANDA Integration
- Forex market data
- CFD data
- Tick-by-tick data
- Historical rates

### Custom Data Feeds
- Alternative data
- Economic indicators
- Market sentiment
- News feeds

## Platform Integration

### Multi-Functional Support
The data server enables various Trading Pal features:

- Interactive charting with real-time updates
- AI-powered trading algorithms
- Custom technical indicators
- Backtesting simulations
- Market analysis tools
- Portfolio tracking
- Risk management systems
- Performance analytics

## Future Development

### Upcoming Features
The experimental data server is continuously evolving with planned enhancements:

- Enhanced real-time data processing
- Additional data sources and markets
- Advanced caching mechanisms
- Machine learning data preprocessing
- Custom indicator development API
Loading

0 comments on commit f9b1dd2

Please sign in to comment.