sql-cli 1.73.1

SQL query tool for CSV/JSON with both interactive TUI and non-interactive CLI modes - perfect for exploration and automation
Documentation
# Financial Test Data

This directory contains realistic financial test data for SQL-CLI development and testing.

## VWAP Execution Example

**Files:**
- `vwap_example_orders.json` - Order hierarchy showing parent and child orders
- `vwap_example_fills.json` - Execution fills with venue details

**Description:**
A complete VWAP (Volume Weighted Average Price) algo execution for:
- Client: Blackrock Asset Management
- Ticker: ASML.AS (ASML Holding - Large Cap EU Equity)
- Quantity: 100,000 shares
- Side: Buy

The data shows:
1. Parent order from client
2. Child orders generated by VWAP algo throughout the day
3. SOR (Smart Order Router) child orders split across venues
4. Fills from multiple venues (NYSE, NASDAQ, BATS, ARCA, Dark Pools, IEX)

**Key fields for analysis:**
- `parent_order_id` - Links child orders to parent
- `order_state` - Order lifecycle (Pending → Accepted → Working → Filled)
- `venue` - Execution venue
- `filled_quantity` / `remaining_quantity` - Track execution progress

## Instrument Reference Data

**Files:**
- `instruments.json` - 200 financial instruments (JSON format)
- `instruments.csv` - Same data in CSV format

**Asset Classes:**
- Equities (stocks, ETFs, ADRs)
- Fixed Income (government & corporate bonds)
- Derivatives (options, futures, swaps)
- Commodities (energy, metals, agriculture)
- FX (spot, forwards, NDFs)

**Key fields:**
- Identifiers: ISIN, CUSIP, SEDOL, Bloomberg ticker
- Trading info: exchange, currency, tick_size, lot_size
- Market data: last_price, bid/ask, volume
- Risk metrics: VaR, duration, Greeks (for options)

## Sample Queries

```sql
-- Find all child orders for a parent
SELECT * FROM vwap_example_orders 
WHERE parent_order_id = 'ORD_1754985600_3449'

-- Analyze fills by venue
SELECT venue, COUNT(*) as fills, SUM(quantity) as total_qty 
FROM vwap_example_fills 
GROUP BY venue

-- Find high-value equity instruments
SELECT name, last_price, market_cap 
FROM instruments 
WHERE asset_class = 'Equity' AND market_cap > 100000000000

-- Get all active derivatives
SELECT * FROM instruments 
WHERE asset_class = 'Derivative' AND status = 'Active'
```

## File Sizes

All files are kept small for version control:
- vwap_example_orders.json: ~125KB
- vwap_example_fills.json: ~118KB  
- instruments.json: ~239KB
- instruments.csv: ~62KB

## Generation

To regenerate this data:
```bash
cd /home/me/dev/sql-cli/data

# VWAP execution
python3 ../scripts/generate_financial_data.py \
  --mode vwap \
  --ticker ASML.AS \
  --quantity 100000 \
  --side Buy \
  --client "Blackrock Asset Management" \
  --format json \
  --output vwap_example

# Instruments
python3 ../scripts/generate_financial_data.py \
  --mode instruments \
  --count 200 \
  --format json \
  --output instruments.json
```