stripe-projects
stripe projects
alpaca-algo-plus-data
Use Alpaca Algo Trader Plus for 4+ years of historical data. Trigger when: (1) increasing lookback, (2) data source selection, (3) yfinance comparison.
Full skill instructions
| Item | Details |
|---|---|
| Date | 2024-12-29 |
| Goal | Leverage Algo Trader Plus subscription for extended historical data |
| Environment | training notebook, DataFetcher, Alpaca API |
| Status | Success |
Default Alpaca free tier limits historical data to ~2 years. The Algo Trader Plus subscription ($99/month) provides:
This enables training on 4 years of data (1460 days) for more robust models.
# Data configuration
LOOKBACK_DAYS = 1460 # 4 years of data (Algo Trader Plus subscription)
# LOOKBACK_DAYS = 730 # 2 years (free tier limit)
from alpaca_trading.data.fetcher import DataFetcher
# Initialize with API keys
fetcher = DataFetcher(keys_file='API_key.txt')
# Fetch extended history
df = fetcher.get_bars(
symbol='AAPL',
timeframe='1Hour',
lookback_days=1460, # 4 years
use_cache=True
)
# Expected: ~10,000 1Hour bars (6.5 hours/day * ~252 days/year * 4 years)
print(f'Fetched {len(df):,} bars')
# Set in environment or notebook
import os
os.environ['APCA_API_KEY_ID'] = 'your_key_id'
os.environ['APCA_API_SECRET_KEY'] = 'your_secret_key'
# Or use keys file
os.environ['ALPACA_KEYS_FILE'] = 'API_key.txt'
# Google Drive cache for Colab
DRIVE_DATA_DIR = '/content/drive/MyDrive/Colab_Projects/training_data'
SELECTION_CACHE_EXPIRY_DAYS = 3 # Shorter for fresh rankings
TRAINING_CACHE_EXPIRY_DAYS = 7 # Longer for stability
# Save 4 years of data to cache
save_to_cache(symbol, df, timeframe, lookback_days=1460)
# Check date range
print(f'Date range: {df.index[0]} to {df.index[-1]}')
# Expected for 4 years:
# Start: ~2021-01-XX
# End: 2024-12-XX
# Verify bar count
expected_bars = 6.5 * 252 * 4 # ~6,552 for 1Hour
print(f'Expected ~{expected_bars:,.0f} bars, got {len(df):,}')
| Feature | yfinance (Free) | Alpaca Free | Algo Trader Plus |
|---|---|---|---|
| Equity History | 5+ years | ~2 years | 5+ years |
| Crypto History | Limited | ~2 years | Extended |
| Intraday Bars | Limited | 1Hour+ | 1Min+ |
| API Rate Limit | Low | 200/min | Higher |
| Data Quality | Inconsistent | Clean | Clean |
| Zero-Volume Bars | Common | Rare | Rare |
| Cost | Free | Free | $99/month |
| Attempt | Why it Failed | Lesson Learned |
|---|---|---|
| yfinance for crypto training | Zero-volume bars, gaps | Alpaca required for crypto |
| 5 years lookback | Some symbols have <5 years | 4 years is safe for most |
| No cache for 4-year data | API timeouts, rate limits | Always cache large fetches |
| Assuming all symbols available | Some delisted/missing | Check bar count after fetch |
# Recommended settings for Algo Trader Plus
lookback_days: 1460 # 4 years
min_bars_required: 500 # For selection
min_bars_training: 2000 # For training
cache_expiry_days: 7 # Weekly refresh
timeframe: '1Hour' # Base timeframe
# Expected bar counts (1Hour, equities)
1_year: ~1,638 bars
2_years: ~3,276 bars
4_years: ~6,552 bars
5_years: ~8,190 bars
| Tier | Historical Data | Best For |
|---|---|---|
| Free | ~2 years | Testing, paper trading |
| Algo Trader Plus | 5+ years | Production training |
| Market Data Pro | Real-time | Live trading optimization |
notebooks/training.ipynb: LOOKBACK_DAYS configurationalpaca_trading/data/fetcher.py: DataFetcher classstripe projects
Harvest every `ponytail:` comment in the codebase into a debt ledger, so the deliberate shortcuts and deferrals ponytail leaves behind get tracked instead of rotting into "later means never". One-shot report, changes nothing.
okx dex market
okx agentic wallet
gmgn portfolio
okx dapp discovery
okx agent payments protocol
Stripe payment processing with checkout sessions, subscriptions, webhooks, and customer management.
Build comprehensive 3-5 year financial models with revenue projections, cost structures, cash flow analysis, and scenario planning for early-stage startups. Use this skill when creating financial projections, calculating burn rate or runway, modeling fundraising scenarios, or preparing investor-r...
Stock and cryptocurrency analysis with portfolio management and multi-dimensional scoring.
Real-time crypto derivatives positioning, whale tracking, liquidations, and institutional ETF flows across 37 specialized tools.
Master dbt (data build tool) for analytics engineering with model organization, testing, documentation, and incremental strategies. Use when building data transformations, creating data models, or implementing analytics engineering best practices.
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Stay Ahead with Finalle.ai: The Ultimate Financial News and Tools Platform
AI-powered Pine Script code generator for TradingView
Research stocks at the speed of thought.
Empower your investment strategies with AI signals, option flow data, and advanced chart patterns.
Danelfin review covering its AI stock and ETF scores, rankings, portfolio tools, current pricing, strengths, risks, and alternatives for investors.
A software for comprehensive market sentiment analysis.
'Stock Correlations' App by Freshly.ai: Reveal Stock Patterns and Trends