Usage Examples¶
Real-world examples for common use cases.
Stock Research¶
Get a company overview¶
Check analyst recommendations¶
View earnings¶
Check insider holdings¶
Price Monitoring¶
Track multiple stocks¶
Stream live prices¶
Compare stock performance¶
# Get 1-year charts for comparison
fq chart AAPL -r 1y -o csv > aapl_1y.csv
fq chart MSFT -r 1y -o csv > msft_1y.csv
# Then compare in your preferred tool
Set price alerts¶
# Open alerts TUI
fq alerts
# Alert when Apple hits $200
fq alerts add AAPL price-above:200
# Alert when Tesla drops below $150
fq alerts add TSLA price-below:150
# Alert on 5%+ change
fq alerts add AAPL change-above:5
# Check all alerts
fq alerts list
# Monitor continuously in background
fq alerts watch
Technical Analysis¶
Calculate indicators for a stock¶
# Interactive TUI (choose indicators)
fq indicator AAPL
# Single indicator (non-interactive)
fq indicator AAPL --indicator rsi:14 --no-tui
# Multiple indicators
fq indicator AAPL --indicator sma:20,50,200 -i 1d -r 6mo --no-tui
fq indicator AAPL --indicator macd:12,26,9 --no-tui
# Bollinger Bands
fq indicator AAPL --indicator bollinger:20,2 -i 1d -r 3mo --no-tui
Export indicator data¶
fq indicator AAPL --indicator rsi:14 -i 1d -r 1y -o csv --no-tui > aapl_indicators.csv
fq indicator AAPL --indicator sma:20,50,200 -o csv --no-tui > sma_analysis.csv
Get latest indicator values¶
Backtesting¶
Test a simple strategy¶
# Interactive backtest TUI
fq backtest AAPL
# Use swing trading preset
fq backtest AAPL --preset swing
# Use trend following preset
fq backtest AAPL --preset trend
# Mean reversion strategy
fq backtest AAPL --preset mean-reversion
Export results¶
# Get backtest results as JSON
fq backtest AAPL --preset swing --json > backtest_results.json
# Run without TUI
fq backtest AAPL --no-tui --preset aggressive
Market Analysis¶
Market overview¶
# Check if markets are open
fq hours
# View market summary
fq market
# Check technology sector performance
fq sector technology
# Healthcare sector with companies
fq sector healthcare --companies
# Top gainers/losers
fq screener day-gainers
fq screener day-losers
# Most active symbols
fq screener most-actives -l 50
Trending analysis¶
# Trending stocks (US)
fq trending
# By region
fq trending --region ca # Canada
fq trending --region gb # UK
Economic indices¶
# Major indices
fq indices
# S&P 500
fq quote ^GSPC
# Dow Jones
fq quote ^DJI
# Nasdaq
fq quote ^IXIC
Options Trading¶
Explore options¶
# View options chain (interactive TUI)
fq options AAPL
# Specific expiration
fq options AAPL --expiration 2024-12-20
Dividend tracking¶
Data Export¶
Export to CSV¶
# Historical price data
fq chart AAPL -r 1y -o csv > aapl_historical.csv
# Quote data
fq quote AAPL MSFT GOOGL -o csv > quotes.csv
# Indicator data
fq indicator AAPL --indicator rsi:14 -o csv --no-tui > indicators.csv
fq indicator AAPL --indicator sma:20,50,200 -o csv --no-tui > sma.csv
Export to JSON¶
# Backtest results
fq backtest AAPL --preset swing --json > backtest_results.json
# Company info
fq info AAPL -o json > aapl_info.json
Pipe to other tools¶
# Use jq to parse JSON
fq quote AAPL -o json | jq '.price'
# Use grep to filter CSV
fq chart AAPL -r 1y -o csv | grep "2024"
# Count lines in CSV
fq chart AAPL -r 1y -o csv | wc -l
Dashboard Usage¶
Launch and navigate¶
In the dashboard:
- View market summary - See indices, futures, crypto
- Manage watchlist -
+to add,-to remove symbols - View details - Press Enter on a symbol for details
- Refresh - Press
rto refresh data - Search - Press
/to search - Quit - Press
qto exit
Automation¶
Check alerts periodically¶
# Run alert check every 5 minutes
watch -n 300 'fq alerts check'
# Or use system service
fq alerts service install
Generate daily reports¶
#!/bin/bash
# daily-report.sh
DATE=$(date +%Y-%m-%d)
# Quotes
fq quote AAPL MSFT GOOGL -o csv > reports/quotes_${DATE}.csv
# Market summary
fq market -o json > reports/market_${DATE}.json
# Top movers
fq screener day-gainers -o csv > reports/gainers_${DATE}.csv
fq screener day-losers -o csv > reports/losers_${DATE}.csv
echo "Daily report generated: reports/"