AI + New Chat
KlickAnalytics CLI Playground
No API Key — Register free
KlickAnalytics CLI Playground
Type ka help to see available commands. Use ↑↓ for history.
────────────────────────────────────────────────────────────────
⚠ No API key found. Commands will not run until you register.
Quick:
$ ka
Documentation
Quick Start
▶
help ?
How to use the ka commands
Company Profile ?
Full company profile including business description, sector, industry, CEO, employees, IPO date, exchange, country, and website. Output includes a structured summary with key company identifiers and a narrative business overview.
ka profile -s TSLA
▶ Run
ka profile -s AAPL
▶ Run
Latest Quote ?
Real-time or latest market quote for any symbol. Returns bid, ask, open, high, low, close, volume, 52-week high/low, market cap, P/E ratio, and day change percentage. Output is a formatted market snapshot.
ka quote -s TSLA
▶ Run
ka quote -s AAPL
▶ Run
Screener ?
Multi-field stock screener — filter across 100+ fields: returns, RSI, ADX, MAs, sector, marketcap and more. Supports >, <, =, IN, LIKE operators and AND combinations.
ka screener -filter "return_1m > 10 AND rsi14 < 70 AND adx14 > 20"
▶ Run
ka screener -filter "exchange = NASDAQ AND return_1m > 5 AND adx14 > 25"
▶ Run
ka screener -filter "exchange = NYSE AND marketcap_type = Large AND total_ma_buy_signals >= 7" -sort "return_1m:desc,adx14:desc"
▶ Run
ka screener -filter "exchange IN NASDAQ,NYSE AND rsi14 < 35 AND return_1m < -10"
▶ Run
ka screener -filter "exchange = LSE AND sector = Technology AND return_3m > 10" -sort return_3m
▶ Run
ka screener -filter "exchange = TSX AND sector = Basic Materials AND adx14 > 30"
▶ Run
ka screener -filter "exchange = ASX AND return_1y > 20 AND adx14 > 25" -sort "return_1y:desc,adx14:desc"
▶ Run
ka screener -filter "is_us_exchange = Y AND return_ytd > 20 AND total_ma_buy_signals >= 7"
▶ Run
ka screener -filter "exchange IN LSE,EURONEXT,XETRA AND sector = Financials AND return_1y > 10"
▶ Run
ka screener -filter "exchange = HKSE AND return_3m > 10 AND rsi14 < 65" -sort "return_3m:desc"
▶ Run
ka screener -filter "sector = Technology AND marketcap_type = Large AND exchange IN NASDAQ,NYSE" -sort "marketcap:desc,return_1m:desc"
▶ Run
ka screener -filter "pct_from_52w_high > -5 AND return_1y > 20 AND exchange = NASDAQ" -sort return_1y
▶ Run
ka screener -filter "currency = USD AND return_ytd > 15 AND adx14 > 30 AND rsi14 < 70" -sort "return_ytd:desc,adx14:desc"
▶ Run
ka screener -filter "marketcap_type IN Large,Very Large AND return_1m < -10 AND rsi14 < 40" -sort "return_1m:asc"
▶ Run
ka screener -fields
▶ Run
Price & Market Data
▶
Historical Prices ?
Historical OHLCV (Open, High, Low, Close, Volume) price data with split and dividend adjustments. Supports custom date ranges and result limits. Output includes adjusted and unadjusted close prices for each trading day.
ka prices -s TSLA
▶ Run
ka prices AAPL -sd 2024-01-01 -ed 2024-12-31
▶ Run
ka prices -s SPY -l 252
▶ Run
ka prices -s MSFT -sd 2023-01-01
▶ Run
ka prices -s NVDA -l 60
▶ Run
ka prices -s BTCUSD -l 365
▶ Run
ka prices -s TSLA -output json
▶ Run
ka prices -s AAPL -sd 2020-01-01 -ed 2020-12-31
▶ Run
Best & Worst Days ?
Top N best and worst single-day return events in a symbol's history. Shows date, return percentage, and surrounding market context. Useful for understanding tail risk, volatility events, and how the stock behaves during extreme market moves.
ka bestdays -s TSLA
▶ Run
ka bestdays -s AAPL
▶ Run
ka bestdays -s SPY
▶ Run
ka bestdays -s NVDA
▶ Run
ka bestdays -s BTCUSD
▶ Run
ka bestdays -s AMZN -l 20
▶ Run
ka bestdays -s TSLA -output json
▶ Run
ka bestdays -s GME
▶ Run
Seasonal Patterns ?
Monthly and quarterly seasonal return patterns based on full price history. Shows average return, win rate, and best/worst months for each calendar period. Useful for timing entries and exits based on historical tendencies.
ka seasonality -s TSLA
▶ Run
ka seasonality -s AAPL
▶ Run
ka seasonality -s SPY
▶ Run
ka seasonality -s TSLA -output json
▶ Run
Price Distribution ?
Statistical price distribution analysis showing where a stock has spent most of its time. Includes frequency histogram, percentile ranking of current price, mean, median, standard deviation, and skewness of the price distribution. Useful for understanding price ranges and current price context.
ka price-dist -s TSLA
▶ Run
ka price-dist -s AAPL
▶ Run
ka price-dist -s SPY
▶ Run
Up/Down Rally Analysis ?
Analyzes historical rally and pullback cycles. Shows average rally duration (days), average rally magnitude (%), average pullback duration, average pullback magnitude, and current cycle status. Useful for estimating how long and how far typical moves last for a given symbol.
ka updown -s TSLA
▶ Run
ka updown -s AAPL
▶ Run
ka updown -s SPY
▶ Run
Gap Analysis ?
Statistical analysis of historical price gaps. Categorizes gaps by type (gap-up / gap-down), shows fill rate (how often gaps close), average gap size, median time to fill, and frequency. Useful for gap trading strategies and understanding price behavior after gaps.
ka gap-analysis -s TSLA
▶ Run
ka gap-analysis -s AAPL
▶ Run
ka gap-analysis -s NVDA
▶ Run
ka gap-analysis -s TSLA -output json
▶ Run
Earnings & Fundamentals
▶
Earnings History ?
Quarterly and annual earnings data including EPS (actual vs estimate), revenue (actual vs estimate), surprise percentage, and reporting date. Useful for tracking earnings trends and beat/miss history over time.
ka earnings -s TSLA
▶ Run
ka earnings -s AAPL
▶ Run
ka earnings -s MSFT -l 12
▶ Run
ka earnings -s TSLA -output json
▶ Run
dividends ?
Get historical dividends of a symbol
ka dividends -s AMZN
▶ Run
splits ?
Get historical splits of a symbol
ka splits -s AMZN
▶ Run
Earnings Reaction Moves ?
Historical earnings reaction analysis: how much the stock moved in the trading session immediately after each earnings report. Shows pre-earnings implied move vs actual move, gap direction, and trend over recent quarters. Useful for options traders and earnings event strategies.
ka earnings-moves -s TSLA
▶ Run
ka earnings-moves AMZN -l 12
▶ Run
ka earnings-moves -s TSLA -output json
▶ Run
Earnings Summary ?
Summary of recent earnings performance trends. Shows EPS and revenue trajectory over the last 8-12 quarters, growth rates, beat/miss streak, and forward estimates if available. Provides a quick fundamental health check through the earnings lens.
ka earnings-summary -s TSLA
▶ Run
ka earnings-summary -s AAPL
▶ Run
ka earnings-summary -s NVDA
▶ Run
ka earnings-summary -s MSFT
▶ Run
ka earnings-summary -s AMZN
▶ Run
ka earnings-summary -s TSLA -output json
▶ Run
ka earnings-summary -s META
▶ Run
ka earnings-summary -s GOOGL
▶ Run
Post-Earnings Drift ?
Post-earnings price drift analysis: how the stock performs in the 1, 5, 10, 20, and 60 days after each earnings report. Shows average drift by beat/miss/in-line outcome, and cumulative drift chart. Based on the academic Post-Earnings Announcement Drift (PEAD) effect.
ka earnings-drift -s TSLA
▶ Run
ka earnings-drift -s AAPL
▶ Run
ka earnings-drift -s NVDA
▶ Run
Technical Analysis
▶
Candlestick Patterns ?
Detected candlestick patterns in recent price history. Identifies reversal and continuation patterns including Doji, Hammer, Shooting Star, Engulfing, Morning/Evening Star, and Harami. Each pattern shows detection date, direction (bullish/bearish), and signal strength.
ka candle_patterns -s TSLA
▶ Run
ka candle_patterns -s AAPL
▶ Run
ka candle_patterns -s SPY
▶ Run
ka candle_patterns -s NVDA
▶ Run
ka candle_patterns -s MSFT -l 60
▶ Run
ka candle_patterns -s TSLA -output json
▶ Run
Fibonacci Levels ?
Fibonacci retracement and extension levels calculated from the most significant recent swing high and low. Shows key levels at 23.6%, 38.2%, 50%, 61.8%, 78.6%, and extension levels at 127.2% and 161.8%. Useful for identifying potential support, resistance, and price targets.
ka fib -s NVDA
▶ Run
ka fib -s BTCUSD
▶ Run
ka fib MSFT -tf 6m
▶ Run
ka fib -s TSLA -output json
▶ Run
Price Action Strategies ?
Price action signal analysis including breakout detection, support/resistance tests, trend line breaks, and inside/outside bar patterns. Shows recent signals with date, pattern type, direction, and historical success rate for each pattern type.
ka price-actions -s TSLA
▶ Run
ka price-actions -s AAPL
▶ Run
ka price-actions -s TSLA -output json
▶ Run
Technical Analysis Report ?
Full technical analysis report combining price data with key indicators. Includes RSI (9/14/20), MACD line/signal/histogram, Bollinger Bands, ATR, ADX/+DI/-DI, all moving averages (SMA/EMA 20/50/100/200), and a composite signal summary. Best for a quick complete technical picture of any symbol.
ka ta -s TSLA
▶ Run
ka ta -s AAPL
▶ Run
Technical Analysis Signals ?
Comprehensive technical signal pack covering 15+ indicators. Includes MA crossover signals (SMA/EMA 20/50/200), RSI overbought/oversold, MACD crossover, Bollinger Band squeeze/breakout, Stochastic, ADX trend strength, and CCI signals. Output: signal table with direction (buy/sell/neutral) and strength.
ka ta-signals -s TSLA
▶ Run
ka ta-signals -s AAPL
▶ Run
ka ta-signals -s SPY
▶ Run
ka ta-signals -s NVDA
▶ Run
ka ta-signals -s MSFT
▶ Run
ka ta-signals -s TSLA -output json
▶ Run
ka ta-signals -s QQQ
▶ Run
ka ta-signals -s BTCUSD
▶ Run
Technical Rank ?
Multi-symbol 0-100 composite score leaderboard. Ranks symbols across 6 components: Momentum (25%), Trend Quality (20%), Relative Strength (15%), RSI Positioning (15%), Volume Confirmation (15%), and ATH Distance (10%). Outputs a ranked leaderboard for quick comparative screening.
ka technical-rank -s AAPL,MSFT,NVDA,TSLA,GOOGL,META
▶ Run
ka technical-rank -s SPY,QQQ,IWM,DIA,GLD,TLT,SLV,USO
▶ Run
ka technical-rank -s AAPL,MSFT,GOOGL,AMZN,META,NVDA,TSLA,AVGO,AMD,ORCL
▶ Run
ka technical-rank -s JPM,BAC,WFC,GS,MS,C
▶ Run
ka technical-rank -s XOM,CVX,COP,SLB,EOG
▶ Run
ka technical-rank -s TSLA,RIVN,NIO,LCID,F,GM
▶ Run
ka technical-rank -s AAPL,MSFT,NVDA,TSLA -output json
▶ Run
ka technical-rank -s SPY,QQQ,IWM,EFA,EEM,GLD,TLT,BND
▶ Run
Support & Resistance Levels ?
Identifies key support and resistance levels using three methods: volume profile (high-volume nodes), swing pivot analysis (local H/L extremes), and price clustering density (KDE-based). Levels are scored 0-100 based on volume, touches, density, recency, and method overlap. Outputs separate support and resistance lists sorted by proximity to current price.
ka levels -s TSLA
▶ Run
ka levels -s AAPL -tf 2y
▶ Run
ka levels -s NVDA -n_levels 10
▶ Run
ka levels TSLA -n_levels 15 -swing_lb 8
▶ Run
ka levels -s TSLA -output json
▶ Run
ka levels MSFT -tf 6m
▶ Run
Trend Quality Score ?
5-component trend quality score (0-100) covering: R² of log-price regression (30%), ADX strength (25%), Higher High/Higher Low consistency (20%), volume-adjusted slope t-statistic (15%), and percentage of trending days (10%). Output includes multi-timeframe scores (20d, 63d, 126d) plus full window, with detailed component breakdown.
ka trend -s TSLA
▶ Run
ka trend -s AAPL
▶ Run
ka trend -s TSLA -tf 2y
▶ Run
ka trend -s SPY -adx_period 20
▶ Run
ka trend -s NVDA -output json
▶ Run
Chart Pattern Scanner ?
Scans 50+ chart patterns across 8 categories: reversal (double top/bottom, H&S, triple top/bottom, V-reversal), continuation (flags, pennants, wedges, rectangle, cup & handle), bilateral (symmetrical triangle, broadening), directional (ascending/descending triangle, channel), volatility (VCP, NR4/NR7, compression, gap consolidation), harmonic (ABCD, Gartley, Bat, Butterfly, Crab), price action (BOS/CHoCH, FVG, pin bars, engulfing, liquidity sweep, order block), and hybrid (short squeeze, HVN breakout, Wyckoff). Each detected pattern returns confidence score, active/historical status, key levels (breakout, target, stop), and notes.
ka patterns -s TSLA
▶ Run
ka patterns -s AAPL -lookback 504
▶ Run
ka patterns -s NVDA -categories reversal,continuation
▶ Run
ka patterns -s SPY -min_confidence 60
▶ Run
ka patterns -s TSLA -active_window 10 -order 3
▶ Run
ka patterns -s MSFT -categories harmonic -min_confidence 50
▶ Run
Volume & Volatility
▶
Historical Volatility ?
Historical (realized) volatility analysis across multiple rolling windows (10d, 20d, 30d, 60d, 90d, 1y). Shows annualized volatility percentages, volatility trend, and comparison to 52-week average. Useful for options pricing, risk assessment, and position sizing.
ka volatility -s TSLA
▶ Run
ka volatility -s AAPL
▶ Run
ka volatility TSLA -sd 2024-01-01 -ed 2024-12-31
▶ Run
ka volatility -s VIX
▶ Run
Volume Profile ?
Volume profile analysis showing price levels with the highest and lowest trading activity. Identifies the Point of Control (highest volume price), Value Area High/Low (70% of volume range), and high-volume nodes (HVN) / low-volume nodes (LVN). Key for institutional-level support/resistance analysis.
ka vol-profile -s TSLA
▶ Run
ka vol-profile -s AAPL
▶ Run
ka vol-profile -s SPY
▶ Run
ka vol-profile -s NVDA
▶ Run
Unusual Volume ?
Detects days with statistically unusual trading volume — both spikes and unusually low volume. Shows date, actual volume, average volume, volume ratio, and price return on that day. Useful for spotting institutional accumulation, distribution, or news-driven volume events.
ka vol-unusual -s TSLA
▶ Run
ka vol-unusual -s AAPL
▶ Run
Analytics
▶
Quant Statistics ?
Comprehensive quantitative statistics report. Includes CAGR, Sharpe ratio, Sortino ratio, Calmar ratio, max drawdown, win rate, profit factor, average gain/loss, best/worst day, monthly returns breakdown, and risk-adjusted performance metrics.
ka quantstats -s TSLA
▶ Run
ka quantstats -s AAPL
▶ Run
ka quantstats -s SPY -l 252
▶ Run
ka quantstats -s NVDA -l 504
▶ Run
ka quantstats -s BTCUSD
▶ Run
ka quantstats -s MSFT -output json
▶ Run
ka quantstats -s QQQ -l 756
▶ Run
ka quantstats -s GLD
▶ Run
Trader Statistics ?
Trading-focused statistics: win rate, average gain, average loss, profit factor, expectancy, average holding period, largest win/loss, and consecutive win/loss streaks. Helps evaluate the historical tradability and edge of a symbol.
ka traderstats -s TSLA
▶ Run
ka traderstats -s AAPL
▶ Run
ka traderstats -s SPY -l 252
▶ Run
ka traderstats -s TSLA -output json
▶ Run
Correlation Matrix ?
Pearson correlation matrix for 2-10 symbols over a selected time period. Shows pairwise correlations from -1 (perfectly inverse) to +1 (perfectly correlated). Useful for portfolio diversification analysis and identifying hedging relationships. Includes a formatted heatmap-style text output.
ka corr-matrix -s TSLA,AAPL,MSFT,NVDA,GOOGL
▶ Run
ka corr-matrix -s SPY,QQQ,IWM,DIA
▶ Run
ka corr-matrix -s TSLA,GLD,TLT,SPY
▶ Run
ka corr-matrix -s AAPL,MSFT,GOOGL,META,AMZN -tf 2y
▶ Run
ka corr-matrix -s BTCUSD,ETHUSD,SPY,GLD
▶ Run
ka corr-matrix -s XOM,CVX,COP,SLB -tf 1y
▶ Run
ka corr-matrix -s TSLA,RIVN,NIO,LCID
▶ Run
ka corr-matrix -s AAPL,MSFT,NVDA,TSLA,GOOGL,META,AMZN -output json
▶ Run
Drawdown Analysis ?
Comprehensive drawdown analysis showing all historical drawdown periods. Includes maximum drawdown, average drawdown, median recovery time, current drawdown from peak, longest drawdown period, and underwater equity curve. Essential for risk assessment and strategy evaluation.
ka drawdown -s TSLA
▶ Run
ka drawdown -s AAPL
▶ Run
ka drawdown -s TSLA -tf 3y
▶ Run
ka drawdown QQQ -tf 5y
▶ Run
ka drawdown -s TSLA -output json
▶ Run
Momentum Analysis ?
Multi-period momentum analysis showing returns across 1-day, 1-week, 1-month, 3-month, 6-month, and 1-year timeframes. Includes momentum rank within peer group, RSI, trend direction, and 52-week high/low context. Useful for momentum screening and trend confirmation.
ka momentum -s TSLA
▶ Run
ka momentum -s AAPL
▶ Run
ka momentum -s NVDA
▶ Run
Multi-Symbol Comparison ?
Side-by-side comparison of 2-10 symbols across key metrics: returns (1d/1m/3m/1y), volatility, Sharpe ratio, beta vs SPY, RSI, ADX, max drawdown, and market cap. Output is a formatted comparison table. Ideal for peer analysis, ETF comparison, and portfolio candidate screening.
ka compare -s AAPL,MSFT,GOOGL,META,AMZN
▶ Run
ka compare -s TSLA,RIVN,NIO,LCID
▶ Run
ka compare -s SPY,QQQ,IWM,DIA,GLD,TLT
▶ Run
ka compare -s TSLA,AAPL -tf 2y
▶ Run
ka compare -s JPM,BAC,WFC,GS,MS
▶ Run
ka compare -s BTCUSD,ETHUSD,GLD,SPY
▶ Run
ka compare -s NVDA,AMD,INTC,TSM
▶ Run
ka compare -s AAPL,MSFT,GOOGL,AMZN -output json
▶ Run
Beta Analysis ?
Beta analysis vs a benchmark (default: SPY). Reports beta, alpha, R-squared, correlation, and tracking error over multiple timeframes. Includes rolling beta chart to show how beta has changed over time. Useful for understanding a stock's systematic risk and market sensitivity.
ka beta -s TSLA
▶ Run
ka beta -s AAPL
▶ Run
ka beta -s TSLA -b QQQ
▶ Run
ka beta GLD -b SPY
▶ Run
ka beta -s TSLA -tf 2y
▶ Run
Relative Strength Rating ?
Relative strength rating (0-99) measuring price performance vs a universe of stocks and a benchmark over multiple periods. A score of 99 means the stock outperformed 99% of the universe. Includes 1-month, 3-month, 6-month, and 1-year RS components with composite score.
ka rel-strength -s TSLA
▶ Run
ka rel-strength -s AAPL
▶ Run
ka rel-strength -s TSLA -tf 2y
▶ Run
ka rel-strength -s NVDA -output json
▶ Run
streaks ?
Multi-type streak analysis for a symbol. Tracks consecutive up/down price days, days trading above or below key moving averages (SMA20, SMA50, SMA200), consecutive high or low volume days, and RSI zone streaks (overbought, oversold, bullish, bearish). Each streak type shows the current active streak, historical stats (count, average length, max length, average return), and the top longest historical streaks. Use -type to focus on a specific streak category, -threshold to filter noise from small price moves, and -lookback to control the analysis window.
ka streaks -s AAPL
▶ Run
ka streaks -s TSLA -type price
▶ Run
ka streaks -s NVDA -type sma
▶ Run
ka streaks -s MSFT -type volume
▶ Run
ka streaks -s AAPL -type rsi
▶ Run
ka streaks -s TSLA -lookback 504
▶ Run
ka streaks -s AAPL -type price -threshold 1
▶ Run
ka streaks -s GOOGL -top_n 10 -output json
▶ Run
Pairs Trading Analysis ?
Pairs trading statistical framework for two symbols. Computes OLS hedge ratio, log-price spread, rolling z-score with historical extremes, ADF cointegration test (pure numpy — no statsmodels), half-life of mean reversion via Ornstein-Uhlenbeck regression, price correlation, and generates a directional entry/exit signal (LONG_SPREAD / SHORT_SPREAD / WATCH / NEUTRAL) based on configurable z-score thresholds. Parameters: symbol (2 tickers), lookback (bars), zscore_window, spread_type (log/price), entry_z, exit_z, adf_maxlag.
ka pairs -s TSLA,RIVN
▶ Run
ka pairs -s AAPL,MSFT
▶ Run
ka pairs -s SPY,QQQ -lookback 504
▶ Run
ka pairs -s TSLA,RIVN -zw 30 -ez 1.5 -xz 0.3
▶ Run
ka pairs -s GLD,SLV -spread_type log
▶ Run
ka pairs -s MSFT,GOOGL -lookback 252
▶ Run
ka pairs -s SPY,IWM -zw 60 -ez 2.0
▶ Run
ka pairs -s AAPL,MSFT -output json
▶ Run
Market Regime Detection ?
Market regime detection for a symbol. Classifies the current regime using five statistical lenses: (1) Trend — ADX, +DI/-DI direction, SMA alignment; (2) Volatility — short vs long HV ratio and percentile rank; (3) Memory — Hurst exponent via R/S analysis (pure numpy) and return autocorrelation; (4) Structure — price vs SMA50/200, SMA slope. Outputs primary regime (TRENDING-UP / TRENDING-DOWN / RANGING / MEAN-REVERTING / HIGH-VOL-CHOPPY / LOW-VOL-COMPRESSION / CRASH-TRENDING / BREAKOUT-RALLY), plus directional / volatility / memory sub-regimes and a concrete strategy suggestion.
ka regime -s SPY
▶ Run
ka regime -s TSLA
▶ Run
ka regime -s QQQ -lookback 504
▶ Run
ka regime -s GLD -lookback 126
▶ Run
ka regime -s IWM -adx_period 20
▶ Run
ka regime -s SPY -vol_short 5 -vol_long 30
▶ Run
ka regime -s TSLA -output json
▶ Run
ka regime -s BTCUSD
▶ Run
Mean-Reversion / Stretch & Reversion Analysis ?
Stretch & Reversion Analysis — quantifies how far price is from its mean and historically what happens next. Computes z-score of close vs SMA20/50/200 (rolling std), Bollinger %B and bandwidth (20d 2σ), RSI(14) with overbought/oversold label, % deviation from each MA, and stretch level (NEUTRAL/MILD/MODERATE/EXTREME). The key feature: finds every historical occurrence of a similar stretch event (same direction, z-score above threshold) and computes forward returns at 5d/10d/20d/63d with mean, median, p10/p90 distribution, positive-day percentage, reversion probability (% of events where |z| dropped back below exit_z), and median/average days to revert.
ka mean-reversion -s TSLA
▶ Run
ka mean-reversion -s SPY
▶ Run
ka mean-reversion -s TSLA -lookback 1008
▶ Run
ka mean-reversion -s AAPL -stretch_z 2.0
▶ Run
ka mean-reversion -s QQQ -stretch_z 1.0
▶ Run
ka mean-reversion -s TSLA -max_fwd 20
▶ Run
ka mean-reversion -s GLD -lookback 756
▶ Run
ka mean-reversion -s SPY -output json
▶ Run
Portfolio & Risk
▶
Formula Scanner ?
Custom OHLCV formula scanner. Evaluate any mathematical expression over historical price data and see when the condition was true. Supports functions like avg(), std(), max(), min() over rolling windows. Useful for backtesting entry signals and custom indicator research.
ka formula-scan TSLA -expr "(C > avg(C,20)) and (C > avg(C,50))"
▶ Run
ka formula-scan AAPL -expr "(C/avg(C,20) - 1) > 0.05"
▶ Run
ka formula-scan SPY -expr "(V > 2*avg(V,20)) and (C > avg(C,20))"
▶ Run
ka formula-scan NVDA -expr "(H - L) / avg(H-L, 14) > 2"
▶ Run
ka formula-scan TSLA -expr "(C > avg(C,50)) and (avg(C,20) > avg(C,50))"
▶ Run
ka formula-scan -s TSLA -expr "(C > O) and (V > avg(V,10))"
▶ Run
ka formula-scan AAPL -expr "C < avg(C,200) * 0.95"
▶ Run
ka formula-scan -s SPY -output json -expr "C > avg(C,20)"
▶ Run
Portfolio Analytics ?
Portfolio-level analytics for 2-20 symbols with optional position details (shares, cost basis, purchase date). Computes weighted returns, portfolio volatility, Sharpe ratio, correlation matrix, individual risk contribution, and minimum-variance optimization. Holdings format: SYMBOL:shares:avg_cost:purchase_date (all fields after symbol are optional).
ka portfolio -s AAPL,MSFT,GOOGL,TSLA
▶ Run
ka portfolio -s SPY,QQQ,GLD,TLT,BND
▶ Run
ka portfolio -holdings "AAPL:100:150.50:2024-01-15,MSFT:50:280.00:2023-06-01,TSLA:20:350.00"
▶ Run
ka portfolio -holdings "SPY:200:420.00,QQQ:150:340.00,GLD:100:185.00,TLT:100:95.00"
▶ Run
ka portfolio -s AAPL,MSFT,GOOGL,TSLA -weights 0.4,0.3,0.2,0.1
▶ Run
ka portfolio -s AAPL,MSFT,GOOGL,TSLA -tf 2y -rf 4.5
▶ Run
ka portfolio -s AAPL,MSFT,NVDA,TSLA,META,GOOGL,AMZN -tf 3y
▶ Run
ka portfolio -s AAPL,MSFT,GOOGL,TSLA -output json
▶ Run
Risk Dashboard ?
Comprehensive risk dashboard computing: VaR (95% and 99% confidence), CVaR/Expected Shortfall, Ulcer Index, Pain Ratio, Tail Ratio, Skewness, Excess Kurtosis, Downside Deviation, Sortino Ratio, and Calmar Ratio. All computed from raw price history in Python — no reliance on external risk databases.
ka risk -s TSLA
▶ Run
ka risk -s AAPL -tf 3y
▶ Run
ka risk -s SPY
▶ Run
ka risk NVDA -tf 2y
▶ Run
ka risk BTCUSD -tf 1y
▶ Run
ka risk -s TSLA -rf 0.045
▶ Run
ka risk SPY -tf all
▶ Run
ka risk -s NVDA -output json
▶ Run
Research & AI
▶
Peer Comparison ?
Side-by-side comparison of peer companies in the same sector/industry. Shows current price, 1-month and 1-year return, market cap, P/E ratio, and RSI for each peer. Useful for sector rotation and relative value analysis.
ka peers -s TSLA
▶ Run
ka peers -s AAPL
▶ Run
News Summary ?
AI-generated summary of the latest news and sentiment for a symbol. Aggregates recent news articles, extracts key themes, and provides an overall sentiment assessment (bullish/bearish/neutral). Useful for quick fundamental event scanning.
ka news-summary -s TSLA
▶ Run
ka news-summary -s AAPL
▶ Run
ka news-summary -s NVDA
▶ Run
ka news-summary -s TSLA -output json
▶ Run
AI Chart Analysis ?
AI-powered technical chart pattern analysis. Identifies chart patterns (head & shoulders, cup & handle, triangles, flags, double tops/bottoms), evaluates trend structure, key support/resistance, and provides a narrative summary of the current technical setup. Powered by Claude AI.
ka analyze-chart -s TSLA
▶ Run
ka analyze-chart -s AAPL
▶ Run
ka analyze-chart -s SPY
▶ Run
ka analyze-chart -s NVDA
▶ Run
ka analyze-chart -s BTCUSD
▶ Run
ka analyze-chart -s TSLA -tf 6m
▶ Run
ka analyze-chart -s TSLA -output json
▶ Run
Other
▶
List Commands ?
List all available KlickAnalytics CLI commands with descriptions and sample usage.
ka list-commands
▶ Run
Changelog ?
View the KlickAnalytics CLI changelog — lists all recent updates, new commands, and improvements.
ka changelog
▶ Run
AI Chat ?
Ask AI any market question — uses GPT to answer with context from KlickAnalytics data. Supports free-form queries about stocks, markets, earnings, and more.
ka ai-chat -q "latest information on TSLA"
▶ Run
ka ai-chat -m "summarize MSFT latest earnings"
▶ Run
ka ai-chat -q "compare NVDA vs AMD revenue growth"
▶ Run
ka ai-chat -q "what happened to AAPL stock today"
▶ Run
Earnings Calendar ?
Next and previous earnings dates for one or more symbols. Shows days until next earnings, reporting time (BMO/AMC), estimated EPS, and previous quarter results. Flags imminent earnings with warnings.
ka earnings-calendar -s TSLA
▶ Run
ka earnings-calendar -s AAPL,MSFT,GOOGL,NVDA
▶ Run
ka earnings-calendar -s TSLA,AAPL,META,AMZN,NVDA,AMD
▶ Run
ka earnings-calendar -s SPY
▶ Run
ka earnings-calendar -s NFLX
▶ Run
Financial Statements ?
Quarterly and annual financial statements: income statement (revenue, margins, EPS), balance sheet (assets, debt, equity), cash flow (operating CF, FCF, buybacks), and key metrics (P/E, P/B, ROE, debt/equity, dividend yield). Powered by Financial Modeling Prep.
ka financials -s TSLA
▶ Run
ka financials -s AAPL -period annual
▶ Run
ka financials -s MSFT -report income
▶ Run
ka financials -s NVDA -report bs
▶ Run
ka financials -s GOOGL -report cf
▶ Run
ka financials -s META -report metrics
▶ Run
ka financials -s TSLA -period Q12025
▶ Run
ka financials -s AAPL -period Q12024-Q42025
▶ Run
ka financials -s AMZN -period 2023-2025
▶ Run
ka financials -s NVDA -period FY2024
▶ Run
ka financials -s AMD -report income -period Q32024
▶ Run
ka financials -s TSLA -report bs -period 2024
▶ Run
Analyst Estimates ?
Forward analyst estimates and consensus: EPS and revenue forecasts (low/avg/high), consensus price target with implied upside, and recent analyst rating changes with firm names and grade shifts.
ka estimates -s TSLA
▶ Run
ka estimates -s AAPL
▶ Run
ka estimates -s NVDA
▶ Run
ka estimates -s MSFT -limit 8
▶ Run
ka estimates -s SPY
▶ Run
Insider Trading ?
Recent insider trading activity from SEC Form 4 filings. Shows insider buys, sells, and option exercises with transaction dates, prices, share counts, and dollar values. Includes net buying/selling sentiment summary.
ka insiders -s TSLA
▶ Run
ka insiders -s AAPL
▶ Run
ka insiders -s NVDA -limit 50
▶ Run
ka insiders -s MSFT
▶ Run
ka insiders -s META
▶ Run
Return Distribution ?
Return distribution deep-dive with histogram, normality diagnostics, and tail risk analysis. Shows daily/weekly/monthly return histogram, Jarque-Bera normality test, skewness and kurtosis, fat tail analysis (actual vs normal at ±1/2/3 sigma), empirical VaR and CVaR (Expected Shortfall) at 95/99%, return deciles, gain/loss ratio, and rolling skewness/kurtosis trend. Answers: how non-normal is this stock, and is the distribution getting more dangerous?
ka histogram -s TSLA
▶ Run
ka histogram -s NVDA -period 2y
▶ Run
ka histogram -s SPY -freq weekly
▶ Run
ka histogram -s AAPL -freq monthly -period 5y
▶ Run
ka histogram -s AMD -period 6m
▶ Run
ka histogram -s BTCUSD
▶ Run
ka histogram -s MSFT -period 1y
▶ Run
ka histogram -s TSLA -freq weekly -period 2y
▶ Run
Chart Image Generator ?
Composable chart image generator — build any technical chart by stacking overlays on the price axis and indicator panels below. Overlays: sma(), ema(), bb(), kc(), vwap, env(). Panels: vol, rsi(), macd(), stoch(), adx(), obv, atr(), cci(), willr(), mfi(). Each indicator takes inline params like bb(20,2.5) or macd(12,26,9). Special types: compare (multi-symbol), drawdown, histogram. Custom title via -title. Dark and light themes. Returns image/png or base64 JSON.
ka chart -s TSLA
▶ Run
ka chart -s AAPL -type line -tf 1y
▶ Run
ka chart -s SPY -type ohlc -tf 3m -size sm
▶ Run
ka chart -s TSLA -overlay sma(20),sma(50),sma(200) -panel vol -tf 1y
▶ Run
ka chart -s NVDA -overlay bb(20,2) -panel rsi(14),vol -tf 6m -size lg
▶ Run
ka chart -s AAPL -overlay ema(12),ema(26) -panel macd(12,26,9) -tf 1y
▶ Run
ka chart -s SPY -overlay bb(20,2),sma(200) -panel rsi(14),macd(12,26,9) -tf 1y -title "SPY Full Setup" -size lg
▶ Run
ka chart -s TSLA -overlay kc(20,1.5),bb(20,2) -panel vol -tf 6m -title "TSLA Squeeze"
▶ Run
ka chart -s MSFT -panel rsi(9),rsi(14),rsi(21) -tf 1y
▶ Run
ka chart -s NVDA -overlay sma(50) -panel adx(14),vol -tf 2y -title "NVDA Trend" -size xl
▶ Run
ka chart -s TSLA -overlay bb(20,3) -panel stoch(14,3),vol -tf 3m -size sm
▶ Run
ka chart -s AAPL -panel rsi(14),macd(12,26,9),adx(14),vol -tf 1y -title "AAPL Indicator Stack"
▶ Run
ka chart -s NVDA,AMD,TSLA,AAPL -type compare -tf 1y -title "AI vs Tech 2025"
▶ Run
ka chart -s SPY -type drawdown -tf 5y -title "SPY Drawdown" -size lg
▶ Run
ka chart -s TSLA -type histogram -tf 3y -title "TSLA Return Dist"
▶ Run
ka chart -s BTCUSD -overlay bb(20,2.5) -panel rsi(14),vol -tf 2y -title "BTC Technical"
▶ Run
ka chart -s META -overlay sma(20),sma(50),sma(200) -panel macd(12,26,9),vol -theme light
▶ Run
ka chart -s TSLA -overlay bb(10,1.5),bb(20,2),bb(20,3) -tf 3m -title "TSLA Multi-BB"
▶ Run
ka chart -s JPM -overlay vwap,sma(20) -panel obv,mfi(14) -tf 6m -title "JPM Flow" -size xl
▶ Run
ka chart -s GOOGL -panel stoch(14,3),cci(20) -sd 2024-06-01 -title "GOOGL Momentum" -size md
▶ Run
Signal Dashboard ?
Aggregate technical signal scan across your watchlist. For each symbol: RSI zone, MACD signal, MA alignment (bullish/bearish), ADX trend strength, and a net signal score. One table showing which names have the most bullish or bearish confluence right now. Supports up to 15 symbols.
ka signal-dashboard -s TSLA,NVDA,AAPL,MSFT,META
▶ Run
ka signal-dashboard -s SPY,QQQ,IWM,DIA
▶ Run
ka signal-dashboard -s XLE,XLF,XLK,XLV,XLI,XLU
▶ Run
ka signal-dashboard -s NVDA,AMD,AVGO,QCOM,INTC
▶ Run
ka signal-dashboard -s JPM,BAC,GS,MS,C
▶ Run
ka signal-dashboard -s TSLA,RIVN,LCID,NIO,LI
▶ Run
ka signal-dashboard -s AAPL,MSFT,GOOGL,AMZN,META -output json
▶ Run
ka signal-dashboard -s BTCUSD,ETHUSD,SOLUSD
▶ Run
BB Squeeze Detector ?
Bollinger Band squeeze detector (TTM Squeeze inspired). When Bollinger Bands contract inside Keltner Channels, volatility is compressed and a directional explosion is imminent. Shows current squeeze status (on/off/fired), squeeze duration, momentum direction bias, BB width percentile, historical squeeze events with 5d/10d/20d post-squeeze returns, win rates, and bullish/bearish outcome ratios. Includes recent bar-by-bar squeeze + momentum table.
ka squeeze -s TSLA
▶ Run
ka squeeze -s NVDA
▶ Run
ka squeeze -s AAPL -tf 2y
▶ Run
ka squeeze -s SPY -tf 3y
▶ Run
ka squeeze -s TSLA -bb_len 20 -kc_mult 1.5
▶ Run
ka squeeze -s MSFT -sd 2023-01-01
▶ Run
ka squeeze -s QQQ -tf 1y
▶ Run
ka squeeze -s BTCUSD -tf 2y
▶ Run
ka squeeze -s AMD -tf 5y
▶ Run
ka squeeze -s TSLA -bb_mult 2.0 -kc_mult 1.0
▶ Run
Multi-TF Trend Sweep ?
Multi-timeframe trend sweep for 1-20 symbols. For each symbol, analyzes trend direction on daily, weekly, and monthly timeframes using SMA alignment (10/20/50/200), ADX trend strength, DI+/DI- directional indicators, and 10-bar rate of change. Master alignment table shows which symbols are aligned across all timeframes (ALIGNED UP/DOWN) vs conflicted. Includes per-symbol detail with price-vs-MA checks, SMA stack order, and ADX strength labels.
ka sweep -s NVDA,AMD,TSLA,AAPL,META
▶ Run
ka sweep -s SPY,QQQ,IWM,DIA
▶ Run
ka sweep -s TSLA
▶ Run
ka sweep -s AAPL,MSFT,GOOGL,AMZN,META,NVDA,TSLA -tf 3y
▶ Run
ka sweep -s XOM,CVX,COP,SLB,EOG -sd 2023-01-01
▶ Run
ka sweep -s JPM,BAC,WFC,GS,MS,C -sd 2022-01-01 -ed 2024-12-31
▶ Run
ka sweep -s GLD,SLV,TLT,BND -tf 2y
▶ Run
ka sweep -s BTCUSD,ETHUSD,SPY
▶ Run
ka sweep -s TSLA,RIVN,NIO,LCID -tf 1y
▶ Run
ka sweep -s NVDA,AMD,TSM,AVGO,INTC -sd 2020-01-01 -ed 2025-03-28
▶ Run
Entry/Exit Zones ?
Entry/exit zone calculator combining Fibonacci retracements, pivot points (daily/weekly/monthly), VWAP anchored levels (YTD/QTD/MTD with sigma bands), and ATR-based stop/target zones into one actionable table. Shows ATR stops (tight/normal/wide), targets at 1R/2R/3R reward, all pivot levels, Fibonacci retracement and extension levels, nearest support/resistance with distance, and a unified sorted level map with current price marker.
ka entry-exit -s TSLA
▶ Run
ka entry-exit -s NVDA
▶ Run
ka entry-exit -s AAPL -tf 1y
▶ Run
ka entry-exit -s SPY
▶ Run
ka entry-exit -s TSLA -atr_mult 2.0
▶ Run
ka entry-exit -s MSFT -tf 3m
▶ Run
ka entry-exit -s BTCUSD
▶ Run
ka entry-exit -s AMD -sd 2024-01-01
▶ Run
ka entry-exit -s QQQ -tf 6m
▶ Run
ka entry-exit -s GOOGL -atr_mult 1.0
▶ Run
Trend Exhaustion Scanner ?
Trend exhaustion scanner — detects when a trend is running on fumes before reversal. Combines 5 signals: RSI divergence (price new high, RSI lower high), volume divergence (price extends on fading volume), DeMark TD Sequential countdown (9/13 setups), MA extension z-score (distance from 20/50/200 SMA), and RSI overbought/oversold extremes. Outputs a 0-100 composite exhaustion score with active signal list and per-component detail.
ka exhaustion -s NVDA
▶ Run
ka exhaustion -s TSLA
▶ Run
ka exhaustion -s SPY -tf 2y
▶ Run
ka exhaustion -s AAPL
▶ Run
ka exhaustion -s QQQ -tf 6m
▶ Run
ka exhaustion -s AMD -tf 1y
▶ Run
ka exhaustion -s MSFT -sd 2024-01-01
▶ Run
ka exhaustion -s BTCUSD -tf 2y
▶ Run
ka exhaustion -s META
▶ Run
ka exhaustion -s IWM -tf 3y
▶ Run
Covariance & PCA ?
Variance-covariance matrix with eigenvalue decomposition (PCA). Returns the full annualized covariance matrix, correlation matrix, principal component explained variance, PC loadings per symbol, diversification ratio, effective number of independent bets, and diversification quality assessment. Foundation for mean-variance optimization and portfolio risk analysis.
ka covariance -s NVDA,AMD,TSLA,AAPL,MSFT
▶ Run
ka covariance -s SPY,QQQ,IWM,DIA,GLD,TLT
▶ Run
ka covariance -s XLE,XLF,XLK,XLV,XLI,XLU
▶ Run
ka covariance -s NVDA,AMD,AVGO,QCOM,INTC -period 6m
▶ Run
ka covariance -s JPM,BAC,GS,MS,C
▶ Run
ka covariance -s AAPL,MSFT,GOOGL,AMZN,META -period 2y
▶ Run
ka covariance -s BTCUSD,ETHUSD,SOLUSD,SPY
▶ Run
ka covariance -s TSLA,RIVN,LCID,NIO -period 3m
▶ Run
Performance Heatmap ?
Multi-symbol performance heatmap across 7 timeframes (1d, 1w, 1m, 3m, 6m, YTD, 1y). Shows returns table with Best/Worst/Avg rows and per-period rankings. Up to 10 symbols.
ka heatmap -s TSLA,NVDA,AAPL,MSFT,META
▶ Run
ka heatmap -s SPY,QQQ,IWM,DIA,GLD,TLT
▶ Run
ka heatmap -s XLK,XLF,XLE,XLV,XLI,XLC,XLY,XLP,XLU,XLRE
▶ Run
ka heatmap -s NVDA,AMD,AVGO,QCOM,INTC,TSM
▶ Run
Relative Rotation Graph (RRG) ?
Relative Rotation Graph — classifies symbols into LEADING, WEAKENING, LAGGING, or IMPROVING quadrants based on JdK RS-Ratio and RS-Momentum vs a benchmark. Includes ASCII scatter plot, direction/heading, and relative performance.
ka relative-rotation -s NVDA,AMD,AVGO,QCOM,INTC -benchmark SPY
▶ Run
ka relative-rotation -s AAPL,MSFT,GOOGL,AMZN,META,NVDA,TSLA -benchmark QQQ
▶ Run
ka relative-rotation -s XLK,XLF,XLE,XLV,XLI,XLC,XLY,XLP,XLU,XLRE
▶ Run
ka relative-rotation -s NVDA,AMD,AVGO,QCOM -benchmark XLK
▶ Run
Basket Performance ?
Basket performance tracker with equal-weight or custom weights. Shows cumulative NAV, daily attribution by symbol, rolling Sharpe, max drawdown, best/worst contributor, and period sub-returns. Like a mini-fund NAV with full P&L breakdown. Up to 15 symbols.
ka basket -s AAPL,MSFT,GOOGL,TSLA,NVDA
▶ Run
ka basket -s AAPL,MSFT,GOOGL,TSLA,NVDA -weights 0.3,0.2,0.2,0.15,0.15
▶ Run
ka basket -s SPY,QQQ,IWM,DIA
▶ Run
ka basket -s XLE,XLF,XLK,XLV -period 6m
▶ Run
ka basket -s NVDA,AMD,AVGO,QCOM,INTC
▶ Run
ka basket -s TSLA,RIVN,LCID,NIO -period 3m
▶ Run
ka basket -s JPM,BAC,GS,MS,C -weights 0.3,0.25,0.2,0.15,0.1
▶ Run
ka basket -s BTCUSD,ETHUSD,SOLUSD -period 6m
▶ Run
Multi-Factor Exposure ?
Multi-factor exposure analysis across a group of symbols. Scores each stock on 5 dimensions: Momentum (3m/6m/12m returns, RSI), Value (P/E, P/B, EV/EBITDA, dividend yield), Quality (ROE, net margin, operating margin, debt/equity), Size (market cap rank), and Volatility (annualized vol, max drawdown). Quintile ranking 1-5 within the group, composite score, factor radar per stock, and group factor summary showing which dimension differentiates the group most.
ka factor -s TSLA,NVDA,AAPL,MSFT,META
▶ Run
ka factor -s NVDA,AMD,AVGO,QCOM,INTC
▶ Run
ka factor -s JPM,BAC,GS,MS,C
▶ Run
ka factor -s SPY,QQQ,IWM,DIA,GLD
▶ Run
ka factor -s XLE,XLF,XLK,XLV,XLI,XLU
▶ Run
ka factor -s TSLA,RIVN,LCID,NIO,LI
▶ Run
ka factor -s AAPL,MSFT,GOOGL,AMZN,META -period 6m
▶ Run
ka factor -s V,MA,PYPL,SQ,COIN
▶ Run
Monte Carlo Simulation ?
Monte Carlo price simulation — generates 1000+ forward paths based on historical return distribution fitted to a scaled t-distribution (captures fat tails). Returns median, 5th/95th percentile cone over time, probability of positive return, probability of hitting a target price, terminal price histogram, and cone snapshots at key days. Useful for options pricing intuition, position sizing, and risk scenario planning.
ka montecarlo -s TSLA -horizon 60
▶ Run
ka montecarlo -s NVDA -horizon 30 -target 200
▶ Run
ka montecarlo -s AAPL -horizon 120
▶ Run
ka montecarlo -s SPY -horizon 252
▶ Run
ka montecarlo -s MSFT -horizon 60 -n_sims 5000
▶ Run
ka montecarlo -s AMD -horizon 45 -target 150
▶ Run
ka montecarlo -s TSLA -horizon 20 -lookback 252
▶ Run
ka montecarlo -s BTCUSD -horizon 90
▶ Run
Event Study ?
Multi-symbol event study inspired by Kensho-style analytics. Define conditions on one or more trigger symbols (e.g. TSLA|C>avg(C,50)) and the engine finds every date where ALL conditions fire simultaneously. Then it measures how a basket of target symbols performs around those events: buy N days before, sell M days after. Returns event count, year/month occurrence matrix, average returns, win rate, profit factor, median return, and best/worst trades per symbol. Historical trades table is available on request with -trades flag.
ka event-study -cond "TSLA|C>avg(C,50)" -trade "-2,2" -s TSLA
▶ Run
ka event-study -cond "AAPL|C>avg(C,20),AAPL|V>2*avg(V,20)" -trade "-1,3" -tf 5y -s AAPL,MSFT,GOOGL
▶ Run
ka event-study -cond "SPY|(C-O)/O*100>2" -trade "0,5" -tf 10y -s TSLA,AAPL,NVDA
▶ Run
ka event-study -cond "TSLA|C<avg(C,200)" -trade "-2,10" -tf 3y -s TSLA
▶ Run
ka event-study -cond "SPY|C<avg(C,50),VIX|C>30" -trade "0,5" -sd 2015-01-01 -ed 2025-12-31 -s SPY,QQQ,IWM
▶ Run
ka event-study -cond "AAPL|(H-L)/C*100>3" -trade "-1,1" -trades -tf 2y -s AAPL
▶ Run
ka event-study -cond "IBM|avg(C,20)>avg(C,50),MSFT|avg(C,20)>avg(C,50)" -trade "-3,5" -s IBM,MSFT,AAPL
▶ Run
ka event-study -cond "TSLA|V>3*avg(V,20)" -trade "0,3" -sd 2022-01-01 -s TSLA,RIVN,NIO
▶ Run
ka event-study -cond "GLD|C>avg(C,50),TLT|C>avg(C,50)" -trade "-1,5" -tf 5y -s GLD,TLT,SPY
▶ Run
ka event-study -cond "NVDA|C>avg(C,20)" -trade "-2,5" -sd 2020-01-01 -ed 2025-03-26 -s NVDA,AMD,TSM,AVGO
▶ Run
Tail Risk Analysis ?
Deep tail risk analytics for 1-10 symbols. Computes Value-at-Risk (95/99) using historical, normal, and Cornish-Fisher methods. Includes CVaR/Expected Shortfall, skewness, excess kurtosis, tail ratio, multi-horizon risk (1d/5d/20d), drawdown-at-risk, loss frequency distribution, and the 5 worst historical days, weeks, and months. Shows dollar VaR on a $10k position. Multi-symbol mode adds a comparison table. What's the real downside beyond standard deviation?
ka tail-risk -s TSLA
▶ Run
ka tail-risk -s TSLA,NVDA,SPY
▶ Run
ka tail-risk -s AAPL,MSFT,GOOGL,META,AMZN -tf 3y
▶ Run
ka tail-risk -s SPY -tf 5y
▶ Run
ka tail-risk -s BTCUSD -tf 2y
▶ Run
ka tail-risk -s TSLA -sd 2022-01-01 -ed 2023-12-31
▶ Run
ka tail-risk -s QQQ,IWM,DIA -tf 1y
▶ Run
ka tail-risk -s NVDA,AMD,TSM,AVGO -tf 3y
▶ Run
ka tail-risk -s GLD,TLT,SPY -tf 5y
▶ Run
ka tail-risk -s TSLA,NVDA,SPY -tf 10y
▶ Run
Signal Decay Analysis ?
Signal decay analysis — after RSI, MACD, MA-cross, Bollinger Band, volume spike, or gap signals fire, what are the forward returns at 1d/3d/5d/10d/20d horizons? Shows hit count, average return, median, win rate, profit factor, t-statistic, and a verdict on whether the signal has statistically significant alpha or is noise. Supports individual signals (rsi, macd, bb, ma, vol, gap) or all at once for comparison. 11 built-in signal types with automatic detection.
ka decay -s TSLA -signal rsi
▶ Run
ka decay -s TSLA -signal all
▶ Run
ka decay -s NVDA -signal macd -tf 3y
▶ Run
ka decay -s AAPL -signal bb
▶ Run
ka decay -s SPY -signal ma -tf 10y
▶ Run
ka decay -s TSLA -signal vol -tf 5y
▶ Run
ka decay -s MSFT -signal gap
▶ Run
ka decay -s QQQ -signal rsi_oversold -tf 5y
▶ Run
ka decay -s TSLA -signal all -sd 2022-01-01 -ed 2024-12-31
▶ Run
ka decay -s AMD -signal macd_bull -tf 3y
▶ Run
HMM Regime Detection ?
Hidden Markov Model regime detection — fits a 2-3 state Gaussian HMM to daily returns using the Baum-Welch (EM) algorithm. Identifies bull/bear/sideways regimes probabilistically. Shows current regime with state probabilities, transition probability matrix with expected duration per regime, per-regime statistics (ann return, volatility, % positive days, best/worst day), emission parameters, and full regime history timeline. More rigorous than rule-based detection.
ka regime-hmm -s SPY -states 3
▶ Run
ka regime-hmm -s SPY -states 2
▶ Run
ka regime-hmm -s TSLA -tf 3y
▶ Run
ka regime-hmm -s NVDA -states 3 -tf 5y
▶ Run
ka regime-hmm -s QQQ -states 3
▶ Run
ka regime-hmm -s BTCUSD -states 2 -tf 3y
▶ Run
ka regime-hmm -s AAPL -sd 2020-01-01 -ed 2025-03-28
▶ Run
ka regime-hmm -s GLD -states 3 -tf 10y
▶ Run
ka regime-hmm -s IWM -states 3 -tf 5y
▶ Run
ka regime-hmm -s TLT -states 2 -tf 5y
▶ Run
Gap Fade Probability ?
Gap fade probability engine — analyzes every historical gap (up/down) by size category (tiny/small/medium/large/huge) and calculates same-day fill rate, multi-day fill rate, average fill time, continuation %, and average close return. Shows today's gap with a fade/no-fade verdict based on historical fill rate for that gap type. Includes day-of-week fill rates, recent gap history, and a fade strategy guide.
ka gap-fade -s TSLA
▶ Run
ka gap-fade -s NVDA -tf 3y
▶ Run
ka gap-fade -s AAPL -tf 5y
▶ Run
ka gap-fade -s SPY
▶ Run
ka gap-fade -s TSLA -min_gap 1.0
▶ Run
ka gap-fade -s AMD -tf 2y
▶ Run
ka gap-fade -s QQQ -sd 2022-01-01
▶ Run
ka gap-fade -s MSFT -tf 10y
▶ Run
ka gap-fade -s BTCUSD -tf 3y
▶ Run
ka gap-fade -s META -sd 2023-01-01 -ed 2025-03-28
▶ Run
Composite Quant Ranking ?
Composite quantitative ranking for 2-20 symbols across 6 dimensions: Momentum (3m/6m/12m returns, 25%), Quality (Sharpe/Sortino, 20%), Trend (ADX/MA alignment, 20%), Risk (drawdown/volatility, 15%), Mean-Reversion (z-score/52w distance, 10%), Volume (rel volume/OBV slope, 10%). Each dimension scored 0-100 as percentile within the peer group. Leaderboard with composite score, dimension leaders, detailed metrics, and MA alignment table.
ka rank -s NVDA,AMD,TSLA,AAPL,MSFT,META,GOOGL,AMZN
▶ Run
ka rank -s SPY,QQQ,IWM,DIA,GLD,TLT
▶ Run
ka rank -s NVDA,AMD,TSM,AVGO,INTC -tf 2y
▶ Run
ka rank -s TSLA,RIVN,NIO,LCID
▶ Run
ka rank -s JPM,BAC,WFC,GS,MS,C -tf 1y
▶ Run
ka rank -s XOM,CVX,COP,SLB,EOG
▶ Run
ka rank -s AAPL,MSFT,GOOGL,AMZN -tf 3y
▶ Run
ka rank -s BTCUSD,ETHUSD,SPY,GLD -tf 2y
▶ Run
ka rank -s NVDA,AMD,TSLA,AAPL -sd 2024-01-01
▶ Run
ka rank -s META,NFLX,DIS,CMCSA,PARA -tf 1y
▶ Run
Price Ratio Spread ?
Price ratio tracking between 2-3 symbols. Shows ratio mean, current z-score, Bollinger bands on the ratio, and reversion signals. Simpler relative-value monitoring compared to pairs (which focuses on cointegration/hedge ratios). Great for sector pairs like XLE/XLF or stock pairs like TSLA/NVDA.
ka spread -s TSLA,NVDA
▶ Run
ka spread -s XLE,XLF
▶ Run
ka spread -s AAPL,MSFT
▶ Run
ka spread -s NVDA,AMD
▶ Run
ka spread -s TSLA,NVDA,AMD
▶ Run
ka spread -s SPY,QQQ
▶ Run
ka spread -s TSLA,NVDA -period 6m
▶ Run
ka spread -s TSLA,NVDA -bb_window 30 -bb_mult 2.5
▶ Run
Strategy Backtester ?
Backtests a trading strategy defined by entry and exit conditions written in the OHLCV expression language. Supports bar offsets (C[-1]), rolling functions (avg, ema, rsi, atr, std, zscore), cross-asset indicators (macd, bbupper/bbmid/bblower, adx, diplus/diminus, stochk/stochd, cci, willr, obv, roc), and logical operators (and, or). Returns performance stats: total trades, win rate, gross profit/loss, net PnL, profit factor, avg win/loss, best/worst trade, avg bars held, max drawdown. Add -trades 1 to show full historical trade log.
ka backtest -s AMZN -entry "H[-1] < H[-2] AND L[-1] > L[-2] AND C < L[-1]" -exit "C > avg(C,5)"
▶ Run
ka backtest -s TSLA -entry "rsi(C,14) < 30" -exit "rsi(C,14) > 50"
▶ Run
ka backtest -s AAPL -entry "crossup(ema(C,20),ema(C,50))" -exit "crossdown(ema(C,20),ema(C,50))"
▶ Run
ka backtest -s SPY -entry "C > bbupper(C,20)" -exit "C < bbmid(C,20)"
▶ Run
ka backtest -s NVDA -entry "rsi(C,14) < 30 AND C < avg(C,20)" -exit "rsi(C,14) > 60" -sd 2022-01-01 -ed 2026-01-01
▶ Run
ka backtest -s TSLA -entry "H[-1] < H[-2] AND C < L[-1]" -exit "C > avg(C,5)" -trades 1
▶ Run
Intraday OHLCV + Indicators ?
Fetches live intraday OHLCV bars for a symbol from Financial Modeling Prep and computes intraday indicators: EMA(9), EMA(20), EMA(50), RSI(14), and MACD(12,26,9). Returns a session summary (session open/high/low, return%, range%), the latest bar, indicator values, trend/RSI/MACD signal labels (BULLISH/BEARISH/MIXED/OVERBOUGHT/OVERSOLD), and a recent 15-bar OHLCV table. Timeframes: 1min, 5min (default), 15min, 30min, 1hour, 4hour. Bar count is capped per timeframe (1min max 780, 5min max 780, 15min max 520, 30min max 520, 1hour max 400, 4hour max 240).
ka intraday -s TSLA
▶ Run
ka intraday -s NVDA -tf 1min
▶ Run
ka intraday -s AAPL -tf 15min -bars 260
▶ Run
ka intraday -s SPY -tf 1hour
▶ Run
ka intraday -s MSFT -tf 4hour -bars 120
▶ Run
ka intraday -s QQQ -tf 30min
▶ Run
ka intraday -s META -tf 5min -bars 78
▶ Run
VWAP + Standard Deviation Bands ?
Computes VWAP (Volume Weighted Average Price) anchored to the first bar loaded, with ±1σ and ±2σ standard deviation bands. Returns: VWAP value, upper/lower band levels, current price deviation (absolute and %), position label (ABOVE_VWAP_2SD / ABOVE_VWAP_1SD / ABOVE_VWAP / AT_VWAP / BELOW_VWAP / BELOW_VWAP_1SD / BELOW_VWAP_2SD), VWAP slope (RISING/FLAT/FALLING over last N bars), overall bias label, and a recent 10-bar table with per-bar VWAP and deviation %. Timeframes: 1min, 5min (default), 15min, 30min, 1hour, 4hour.
ka intraday-vwap -s TSLA
▶ Run
ka intraday-vwap -s NVDA -tf 1min
▶ Run
ka intraday-vwap -s AAPL -tf 15min
▶ Run
ka intraday-vwap -s SPY -tf 5min -bars 78
▶ Run
ka intraday-vwap -s QQQ -tf 1hour
▶ Run
ka intraday-vwap -s MSFT -tf 30min
▶ Run
Opening Range Breakout (ORB) ?
Computes the Opening Range (ORH/ORL) from the first N minutes of the most recent trading session. Reports breakout status (LONG_BREAKOUT / SHORT_BREAKOUT / NO_BREAKOUT / ORB_FORMING), extension amount and %, extension targets at 1× and 2× the range width, daily ATR comparison with range quality label (TIGHT/NORMAL/WIDE/VERY_WIDE), and session progress. Period can be 5–120 min (default 30). Timeframes: 1min (default), 5min, 15min, 30min, 1hour, 4hour.
ka intraday-opening-range -s TSLA
▶ Run
ka intraday-opening-range -s NVDA -period 15
▶ Run
ka intraday-opening-range -s AAPL -tf 5min -period 30
▶ Run
ka intraday-opening-range -s SPY -tf 1min -period 60
▶ Run
ka intraday-opening-range -s QQQ -period 5
▶ Run
ka intraday-opening-range -s MSFT -period 30
▶ Run
intraday-relative-volume ?
Intraday Relative Volume (RVOL) — today's volume vs historical average at the same time of day across prior sessions. Reports per-bar RVOL, cumulative RVOL, projected daily volume, volume trend (ACCELERATING/DECELERATING/STEADY), and RVOL classification.
ka intraday-relative-volume -s TSLA
▶ Run
ka intraday-relative-volume -s NVDA -tf 1min
▶ Run
ka intraday-relative-volume -s AAPL -tf 15min
▶ Run
ka intraday-relative-volume -s SPY -tf 5min
▶ Run
ka intraday-relative-volume -s QQQ -tf 30min
▶ Run
intraday-levels ?
Intraday key price levels — VWAP ± 1σ/2σ bands, session high/low, previous session close/high/low, swing pivots, and volume nodes. All levels ranked by proximity to current price and labeled SUPPORT or RESISTANCE.
ka intraday-levels -s TSLA
▶ Run
ka intraday-levels -s NVDA -tf 1min
▶ Run
ka intraday-levels -s AAPL -tf 15min -swing_lb 3
▶ Run
ka intraday-levels -s SPY -tf 5min -n_levels 15
▶ Run
ka intraday-levels -s QQQ -tf 30min
▶ Run
intraday-regime ?
Intraday market regime detection — classifies current price structure as TRENDING_UP, TRENDING_DOWN, RANGING, or MEAN_REVERTING with a HIGH/NORMAL/LOW volatility overlay. Uses ADX+DI±, R² (trend linearity), ATR ratio, VWAP cross count, and HH/HL bar consistency.
ka intraday-regime -s TSLA
▶ Run
ka intraday-regime -s NVDA -tf 1min
▶ Run
ka intraday-regime -s AAPL -tf 15min
▶ Run
ka intraday-regime -s SPY -tf 5min
▶ Run
ka intraday-regime -s QQQ -tf 30min -adx_period 20
▶ Run
intraday-volume-profile ?
Intraday volume-by-price profile — POC (Point of Control), Value Area High/Low, High/Low Volume Nodes, balance/skew classification, and ASCII histogram. Shows where the market accepted and rejected value within the current session.
ka intraday-volume-profile -s TSLA
▶ Run
ka intraday-volume-profile -s NVDA -tf 1min
▶ Run
ka intraday-volume-profile -s AAPL -tf 15min
▶ Run
ka intraday-volume-profile -s SPY -tf 5min -n_bins 50
▶ Run
ka intraday-volume-profile -s QQQ -tf 30min
▶ Run
intraday-premarket ?
Premarket gap analysis — classifies the overnight gap (FULL/PARTIAL UP/DOWN, NO_GAP), measures gap vs daily ATR, shows previous session reference levels (close/high/low/VWAP), extension targets, and strategy implications per gap type.
ka intraday-premarket -s TSLA
▶ Run
ka intraday-premarket -s NVDA
▶ Run
ka intraday-premarket -s AAPL -tf 1min
▶ Run
ka intraday-premarket -s SPY
▶ Run
ka intraday-premarket -s QQQ
▶ Run
intraday-screener ?
Intraday screener — screen multiple symbols on live intraday metrics (change%, RVOL, RSI, ADX, VWAP deviation, gap%). Concurrent API calls for speed. Supports filter expressions and sortable leaderboard output. Up to 50 symbols per request.
ka intraday-screener -s TSLA,NVDA,AAPL,MSFT,META,AMZN,AMD,NFLX,GOOGL,SPY
▶ Run
ka intraday-screener -s TSLA,NVDA,AAPL,MSFT,META -filter "change_pct > 1 AND rvol > 1.5"
▶ Run
ka intraday-screener -s TSLA,NVDA,AAPL,MSFT,META -filter "adx > 25" -sort adx -sortorder desc
▶ Run
ka intraday-screener -s TSLA,NVDA,AAPL,MSFT,META -filter "vwap_pos = ABOVE AND rsi < 70"
▶ Run
ka intraday-screener -s SPY,QQQ,IWM,DIA,GLD,TLT -tf 15min -sort range_pct
▶ Run
Cross-Sectional Dispersion ?
Cross-sectional dispersion analysis — measures how spread out returns are within a basket of symbols. High dispersion = stock-picking market. Low dispersion = macro-driven, trade the index. Shows rolling dispersion, percentile rank, regime, avg pairwise correlation, per-symbol outlier analysis.
ka dispersion -s TSLA,NVDA,AAPL,MSFT,META,AMZN,GOOGL
▶ Run
ka dispersion -s XLK,XLF,XLE,XLV,XLI,XLC,XLY,XLP,XLU,XLRE
▶ Run
ka dispersion -s NVDA,AMD,AVGO,QCOM,INTC -period 6m
▶ Run
ka dispersion -s TSLA,NVDA,AAPL,MSFT,META -window 10
▶ Run
Lead-Lag Cross-Correlation ?
Cross-correlation at various lags (1-5 days) between all pairs in a basket. Finds predictive relationships: does AMD move 1 day before NVDA? Does SPY lead the group? Returns lag matrix, correlation at best lag, predictive pairs ranked by improvement, and leader/follower rankings.
ka lead-lag -s NVDA,AMD,TSLA,AAPL,SPY
▶ Run
ka lead-lag -s XOM,CVX,COP,USO,XLE
▶ Run
ka lead-lag -s JPM,BAC,GS,XLF,SPY
▶ Run
ka lead-lag -s SPY,QQQ,IWM,DIA -period 6m
▶ Run
ka lead-lag -s NVDA,AMD,AVGO,QCOM,INTC -max_lag 3
▶ Run
Agent Analysis ?
Activate a specialized financial agent to analyze a symbol. Each agent has a unique persona, expertise, analytical lens, and output format. The agent auto-runs its priority commands, feeds the data to an LLM, and delivers structured analysis through its specialized lens. Run without arguments to see available agents.
ka agent
▶ Run
ka agent swing-trader-technical -s TSLA
▶ Run
ka agent swing-trader-technical -s NVDA
▶ Run
ka agent swing-trader-technical -s SPY
▶ Run
ka agent swing-trader-technical -s AAPL
▶ Run
Agent Chat ?
Free-form chat with a specialized financial agent. Ask any question and the agent responds through its unique expertise lens. Automatically detects symbols in your message and runs relevant analysis commands. Provide -agent to select the persona.
ka agent-chat -agent swing-trader-technical -q "Is TSLA a good swing trade right now?"
▶ Run
ka agent-chat -agent swing-trader-technical -q "What setups do you see in NVDA?" -s NVDA
▶ Run
ka agent-chat -agent swing-trader-technical -q "Should I buy this dip in AAPL?"
▶ Run
ka agent-chat -agent swing-trader-technical -q "Where do I put my stop on TSLA?" -s TSLA
▶ Run