These vectorized primitives, standard libraries, and dependency structures map natively to the Python Sidecar execution grids. You can safely invoke them implicitly inside your isolated feature sandboxes.
numpyFoundational N-dimensional array library for fast numerical computation.
scipyScientific computing primitives — optimization, stats, linear algebra.
numbaJIT compilation for Python/NumPy code targeting CPU and GPU via LLVM.
numexprFast element-wise numerical evaluation, bypasses NumPy's Python overhead.
pandasDataFrame library for relational and time-series data manipulation.
polarsHigh-performance DataFrame engine built on Apache Arrow and Rust.
TA-LibC-backed technical analysis library — 150+ indicators including RSI, MACD, Bollinger.
pandas-taPandas-native indicator extension with 130+ indicators using a fluent API.
fintaCommon financial technical indicators implemented in pure Pandas.
tulipyPython bindings for Tulip Indicators — fast C-based technical library.
scikit-learnClassic ML library — classification, regression, clustering, preprocessing.
statsmodelsEconometric & statistical modeling — ARIMA, OLS, cointegration tests.
archGARCH/EGARCH volatility modeling and financial econometrics.
PyTorchDynamic deep learning framework with first-class GPU and autograd support.
TensorFlow / KerasEnd-to-end ML platform for building, training, and deploying neural networks.
xgboostGradient boosted trees — state of the art for tabular signal classification.
lightgbmMemory-efficient gradient boosting framework from Microsoft Research.
cvxpyDomain-specific language for convex optimization and portfolio construction.
pyfolioPortfolio and risk analytics — tear sheets, rolling Sharpe, drawdown.
empyricalCore financial risk metrics: Sharpe, Sortino, Calmar, max drawdown.
quantstatsPortfolio analytics and HTML report generation from a returns series.
riskfolio-libAdvanced portfolio optimization — HRP, CVaR, hierarchical risk parity.
plotlyInteractive charting library — candlesticks, 3D plots, dashboards.
plotly-kaleidoStatic SVG/PNG export engine for Plotly charts without a browser.
matplotlibThe de-facto Python 2D plotting library — line charts, histograms, heatmaps.
seabornStatistical data visualization built on Matplotlib with a cleaner API.
joblibLightweight parallel loop execution and memoization for Python functions.
tqdmFast, extensible progress bars for loops and async pipelines.
Math.NET NumericsMethods and algorithms for numerical computations in science and engineering.
ML.NETCross-platform open-source machine learning framework from Microsoft.
Accord.NETMachine learning framework combining audio and image processing libraries.
DeedleData frame and series library for data manipulation and scientific programming.
NodaTimeAdvanced date and time API for high precision financial timezone handling.
TA-Lib.NETC# wrapper to rapidly execute the original native C TA-Lib codebase.
Newtonsoft.JsonHigh-performance JSON framework with advanced LINQ routing.
RestSharpSimple, scalable REST and HTTP API client implementation.
This documentation is the canonical reference for every computation within the Kopie Quant data engineering ecosystem. Each Signal and Feature listed below represents a production-grade mathematical equation — verified against academic whitepapers and executed at scale by the Victory Engine, Kopie Quant's high-performance Rust computation layer. What you see here is the actual code behind each indicator: the precise formulas, kernel implementations, and parameter defaults that power every backtest, live signal, and forensic diagnostic within the platform.
Beyond the pre-built library, Kopie Quant provides a full Custom Logic SDK for building your own proprietary scripts. The SDK defines 9 computational paradigms — from single-asset price analysis to cross-asset benchmarking and multi-timeframe alignment. To accelerate development, the platform includes a Signal Scaffold system that generates ready-to-use boilerplate code for any signal in the ecosystem. Import a signal's scaffold into your custom script and immediately access its full parameter surface, letting you compose institutional-grade strategies without writing infrastructure code.
Signals and Features are handled differently by the engineering layer. Signals are composable — you can pull their boilerplate into your custom scripts, modify thresholds, and combine them freely. Features operate at the infrastructure level. They are pre-computed by the Victory Engine's data pipeline and injected into your script environment automatically via the Universe Loader. You reference features by name and may adjust their parameters, but their computation is managed entirely by the engine — ensuring consistent, high-performance execution across all assets and timeframes without burdening your script with heavy rolling-window math.
The Kopie Quant SDK defines 9 computational paradigms that control how your custom script receives data. You activate each paradigm by naming your function arguments with specific prefixes — the AST transpiler reads your def calculate() signature and automatically generates the correct UI controls, data routing, and timeframe alignment. No imports, no base classes, no configuration files.
Single-Asset ComputationThe foundational paradigm. Your def calculate(data) receives a single asset's OHLCV DataFrame — Open, High, Low, Close, Volume — synchronized to your active chart resolution. All vectorized math operates exclusively on this primary instrument. Build standard technical indicators, detect candlestick formations, apply rolling statistical transformations, or compute custom volatility measures. No external asset dependencies. No cross-timeframe routing. Pure single-instrument computation.
Full Universe Cross-SectionThe universe argument injects the complete OHLCV data for every asset in your active universe as a single grouped DataFrame, keyed by ticker. Compute cross-sectional momentum rankings across an entire basket, scan for sector-level volume concentration, or derive regime filters by counting instruments trading above structural moving averages. Each row is temporally aligned to the primary chart resolution.
Cross-Asset OHLCV InjectionThe benchmark_1 argument injects the raw OHLCV DataFrame of a secondary asset alongside your primary instrument, temporally synchronized to the same bar resolution. Compute live price spreads for pairs arbitrage, derive relative strength ratios against a market index, or calculate rolling beta coefficients between correlated instruments. The benchmark asset is user-configurable at runtime via the UI control surface.
Cross-Asset Indicator RoutingThe benchmark_1_signal_metric argument injects a specific indicator output computed on a different asset. The routed signal is evaluated on the benchmark instrument independently and delivered as a pre-computed series. Build macro regime filters that block individual stock executions unless a market index MACD is bullish, or gate trades on correlated ETF momentum confirmation. The benchmark asset and target indicator are both user-configurable.
Multi-Timeframe OHLCV InjectionThe mtf_1_data argument injects raw OHLCV price data from any asset on a different timeframe — typically a higher resolution (e.g., Daily bars while your primary chart operates on 5-minute intervals). The engine handles temporal alignment automatically, forward-filling higher-timeframe bars to match your primary resolution. Anchor intraday execution against Daily support and resistance levels, size positions using higher-timeframe ATR, or confirm macro trend direction before allowing micro entries.
Multi-Timeframe Indicator RoutingThe mtf_signal_1_metric argument injects a specific indicator output from any asset on a higher timeframe. The indicator is evaluated on the target instrument at the target resolution independently, then temporally aligned and delivered as a pre-computed series. Gate 5-minute entries on the Daily MACD direction of the broader market, or block trades when a correlated ETF's Daily Bollinger Bands signal overbought resistance. The target asset, timeframe, and indicator are all user-configurable.
Single-Indicator Output RoutingThe signal_1_metric argument injects a specific output line from any indicator already deployed in your workspace — e.g., the value line of an RSI, the histogram of a MACD. Build clean boolean threshold triggers, apply secondary smoothing to noisy oscillator outputs, or normalize unbounded indicator values into a standardized 0 to 100 percentage score. The target indicator and output line are user-configurable via the UI control surface.
Multi-Indicator Matrix CompositionThe signal_1_matrix and signal_2_matrix arguments inject the full output matrices of multiple indicators simultaneously — every output line from each indicator is accessible. Build crossover detection systems, derive composite confidence scores by averaging across multiple indicator matrices, or implement divergence analysis comparing momentum structure against volume-based indicators. Each matrix argument maps to a user-selected indicator in your workspace.
Multi-Indicator Precision TargetingThe signal_1_metric and signal_2_metric arguments inject specific output lines from multiple independent indicators simultaneously. Unlike the Matrix Combiner, this paradigm targets precise individual outputs rather than full matrices — enabling multi-variate boolean confluence logic. Fire execution signals only when RSI value is oversold AND MACD histogram is positive, or gate entries on simultaneous EMA crossover confirmation with ADX strength above a defined threshold.
Signals evaluate continuous market data into discrete binary or categorical triggers. They act as explicit threshold monitors, letting you define exactly when a structural condition or trading rule should activate.
signal.wcpWeighted Close Price - Weighted close price (high + low + 2*close) / 4
signal.ohlc4OHLC Average - Average of open, high, low, close
signal.psar_atrParabolic SAR with ATR - Parabolic SAR using ATR for acceleration
signal.ctiCorrelation Trend Indicator - Spearman correlation with linear trend
signal.ebswEven Better Sinewave - Cycle indicator for identifying turning points
signal.inertiaInertia - Trend smoothing using regression slope
signal.rvgiRelative Vigor Index - Measures conviction of a recent price move
signal.qstickQStick - Running average of open-close differences
signal.erEfficiency Ratio - Kaufman's efficiency ratio measuring trend efficiency
signal.rsxRelative Strength Xtra - Smoother version of RSI with less noise
signal.swmaSymmetrically Weighted Moving Average - 4-period weighted average - symmetrical triangle
signal.sinwmaSine Weighted Moving Average - WMA with sine wave weighting
signal.ssfSuper Smoother Filter - Ehlers super smoother filter - minimal lag
signal.jmaJurik Moving Average - Low lag moving average with adjustable smoothing
signal.mamaMESA Adaptive Moving Average - Ehlers MESA adaptive moving average
signal.pivots_hlPivot Points High/Low - Swing high and low pivot points
signal.td_sequentialTD Sequential - Tom DeMark sequential countdown indicator
signal.squeezeTTM Squeeze - TTM Squeeze — detects volatility compression when Bollinger Bands move inside Keltner Channels, signaling impending breakout
signal.dv2DV2 - DV2 — David Varadi mean-reversion oscillator combining close vs intraday range with smoothed percentile ranking
signal.midpriceMid Price - Mid Price — average of the highest high and lowest low over a period
signal.midpointMid Point - Mid Point — average of the highest and lowest close over a period
signal.typpriceTypical Price - Typical Price — (H+L+C)/3, same as hlc3
signal.wclpriceWeighted Close - Weighted Close Price — (H+L+2C)/4, emphasizes closing price
signal.avgpriceAverage Price - Average Price — (O+H+L+C)/4
signal.medpriceMedian Price - Median Price — (H+L)/2
signal.ht_avgpriceHT Average Price - Hilbert Transform Average Price — Hilbert-transformed mid price for cycle analysis
signal.minmaxRolling Min/Max - Rolling Min/Max — highest and lowest values over a rolling window
signal.minmax_idxMin/Max Index - Min/Max Index — bar index of the highest and lowest values within a rolling window
signal.sumRolling Sum - Rolling Sum — cumulative sum of source over a rolling window
signal.mmaModified Moving Average - Modified Moving Average — also known as SMMA or Running Moving Average
signal.dema_rateDEMA Rate of Change - DEMA Rate of Change — percentage rate of change of a Double EMA
signal.stdev_maStd Dev Moving Average - Standard Deviation Moving Average — moving average of the rolling standard deviation
signal.rolling_minRolling Minimum - Rolling Minimum — lowest value within a rolling window
signal.percent_changePercent Change - Percent Change — percentage price change over a specified number of bars
signal.log_returnLog Return - Log Return — natural logarithm of price ratio, more statistically robust than simple returns
signal.cum_returnCumulative Return - Cumulative Return — total percentage return from the start of the series
signal.drawdownDrawdown - Drawdown — percentage decline from the running peak
signal.max_drawdownMaximum Drawdown - Maximum Drawdown — worst peak-to-trough decline over a rolling window
signal.rsiRelative Strength Index - Measures speed and magnitude of price changes to evaluate overbought/oversold
signal.macdMoving Average Convergence Divergence - Trend-following momentum indicator showing relationship between two EMAs
signal.stochrsiStochastic RSI - Applies stochastic formula to RSI values for more sensitivity
signal.cciCommodity Channel Index - Measures current price relative to average price over a period
signal.cmoChande Momentum Oscillator - Measures momentum as difference between gains and losses
signal.mfiMoney Flow Index - Volume-weighted RSI measuring buying/selling pressure
signal.willrWilliams %R - Momentum indicator showing overbought/oversold levels
signal.rocRate of Change - Percentage change between current and past price
signal.momMomentum - Difference between current and past price
signal.trixTriple Exponential Average - Rate of change of triple-smoothed EMA
signal.ppoPercentage Price Oscillator - MACD expressed as percentage for cross-security comparison
signal.apoAbsolute Price Oscillator - Difference between two EMAs in absolute terms
signal.uoUltimate Oscillator - Weighted average of three oscillators with different timeframes
signal.tsiTrue Strength Index - Double-smoothed momentum oscillator
signal.fisherFisher Transform - Transforms prices to Gaussian distribution for sharper signals
signal.aoAwesome Oscillator - Bill Williams indicator comparing recent momentum to larger period
signal.acAccelerator Oscillator - Measures acceleration/deceleration of momentum
signal.bopBalance of Power - Measures strength of buyers vs sellers
signal.kstKnow Sure Thing - Weighted sum of four rate of change indicators
signal.stochasticStochastic Oscillator - Stochastic Oscillator — measures closing price relative to high-low range, identifying overbought/oversold conditions
signal.dmiDirectional Movement Index - Directional Movement Index — measures trend strength and direction using +DI/-DI crossover with ADX confirmation
signal.aroonoscAroon Oscillator - Aroon Oscillator — difference between Aroon Up and Aroon Down, measuring trend strength from -100 to +100
signal.momersionMomersion Indicator - Measures whether the market is in trending or mean-reverting mode using a ratio of up/down momentum bars
signal.roc_ratioRate of Change Ratio - Ratio of current price to price N bars ago, equivalent to 1 + ROC/100
signal.squeeze_momentumSqueeze Momentum Indicator - Combines Bollinger Band squeeze with momentum
signal.qqeQuantitative Qualitative Estimation - Smoothed RSI with dynamic volatility bands
signal.vwmacdVolume Weighted MACD - MACD using volume-weighted moving averages
signal.coppockCoppock Curve - Long-term momentum indicator for major bottoms
signal.elder_rayElder Ray Index - Bull and bear power indicators
signal.wadWilliams Accumulation Distribution - Cumulative measure of buying/selling pressure
signal.dpoDetrended Price Oscillator - Removes trend to identify cycles
signal.pmoPrice Momentum Oscillator - Double-smoothed rate of change
signal.schaff_trendSchaff Trend Cycle - Combines MACD and stochastic for trend/cycle analysis
signal.connors_rsiConnors RSI - Composite RSI using price, streak, and percentile
signal.smiStochastic Momentum Index - Shows where close is relative to midpoint of range
signal.psar_cloudParabolic SAR Cloud - Enhanced PSAR with trend cloud visualization
signal.chandelier_exitChandelier Exit - Trailing stop based on ATR from highs/lows
signal.ht_trendlineHilbert Transform Trendline - Hilbert Transform Trendline — instantaneous trendline derived from the Hilbert Transform
signal.ht_sineHilbert Transform Sine Wave - Hilbert Transform Sine Wave — generates sine and lead sine from dominant cycle phase
signal.ht_trendmodeHilbert Transform Trend Mode - Hilbert Transform Trend vs Cycle Mode — binary indicator distinguishing trending from cycling markets
signal.ht_dcperiodHilbert Transform Dominant Cycle Period - Hilbert Transform Dominant Cycle Period — instantaneous measurement of the dominant price cycle length
signal.ht_dcphaseHilbert Transform Dominant Cycle Phase - Hilbert Transform Dominant Cycle Phase — instantaneous phase of the dominant cycle (0-360°)
signal.ht_phasorHilbert Transform Phasor - Hilbert Transform Phasor Components — in-phase and quadrature components of the analytic signal
signal.mesa_sineMESA Sine Wave - MESA Sine Wave — John Ehlers MESA-derived sine/lead sine for early cycle turning point detection
signal.even_better_sineEven Better Sine Wave - Even Better Sine Wave — Ehlers bandpass-filtered oscillator for cycle timing with reduced lag
signal.ehlers_roofingEhlers Roofing Filter - Ehlers Roofing Filter — bandpass filter combining high-pass and low-pass (SuperSmoother) for clean oscillator
signal.ehlers_superEhlers SuperSmoother - Ehlers SuperSmoother Filter — 2-pole Butterworth filter with zero lag at the cutoff frequency
signal.ehlers_decyclerEhlers Decycler - Ehlers Decycler — removes cycle components to reveal the underlying trend
signal.reflexReflex Indicator - Reflex — Ehlers zero-lag trend indicator measuring normalized rate of change of the SuperSmoother
signal.trendflexTrendFlex Indicator - TrendFlex — Ehlers trend measurement comparing SuperSmoother to its rolling mean
signal.cycle_periodDominant Cycle Period - Dominant Cycle Period — adaptive measurement of the primary price oscillation period
signal.elder_forceElder Force Index - Elder Force Index — measures the power behind every price movement using price change and volume
signal.gatorGator Oscillator - Gator Oscillator — visualizes Alligator jaw/teeth/lips convergence and divergence as histogram bars
signal.alligatorWilliams Alligator - Williams Alligator — three smoothed moving averages (Jaw, Teeth, Lips) identifying market phases
signal.fractalsWilliams Fractals - Williams Fractals — identifies reversal points where a high/low is the extreme of 5 consecutive bars
signal.zigzagZigZag - ZigZag — connects significant highs and lows, filtering out moves smaller than a threshold percentage
signal.pivot_pointsPivot Points - Pivot Points — standard support/resistance levels calculated from prior period high, low, close
signal.vortexVortex Indicator - Vortex Indicator — captures positive and negative trend movements to identify trend direction and reversals
signal.mass_indexMass Index - Mass Index — detects range expansions by tracking the narrowing and widening of the high-low range
signal.rwiRandom Walk Index - Random Walk Index — compares price movement to random walk theory to determine trend strength
signal.special_kSpecial K - Special K — Martin Pring summed rate of change oscillator identifying primary market cycles
signal.didi_indexDidi Index - Didi Index — Brazilian indicator comparing short, medium, and long moving averages for trend signals
signal.linregLinear Regression - Linear regression value at current bar
signal.linreg_slopeLinear Regression Slope - Slope of linear regression line
signal.linreg_interceptLinear Regression Intercept - Y-intercept of linear regression line
signal.varianceVariance - Statistical variance of price
signal.skewnessSkewness - Measures asymmetry of distribution
signal.kurtosisKurtosis - Measures tail heaviness of distribution
signal.zscoreZ-Score - Number of standard deviations from mean
signal.medianMedian - Middle value of price over period
signal.percentilePercentile Rank - Percentage of values below current
signal.betaBeta - Measures systematic risk relative to benchmark
signal.linreg_angleLinear Regression Angle - Linear Regression Angle — angle (in degrees) of the linear regression line, indicating trend steepness
signal.rsquaredR-Squared - R-Squared — coefficient of determination measuring how well a linear regression fits the data (0-1)
signal.tsfTime Series Forecast - Time Series Forecast — projects the linear regression one bar forward
signal.stderrStandard Error - Standard Error of the Linear Regression — measures scatter around the regression line
signal.correlCorrelation Coefficient - Pearson Correlation Coefficient — measures linear relationship between source and a reference series
signal.madMean Absolute Deviation - Mean Absolute Deviation — average absolute distance from the mean, a robust dispersion measure
signal.quantileRolling Quantile - Rolling Quantile — percentile value within a rolling window
signal.entropyShannon Entropy - Shannon Entropy — measures randomness/information content of the price distribution in a rolling window
signal.hurstHurst Exponent - Hurst Exponent — measures long-term memory of time series (H<0.5 = mean-reverting, H>0.5 = trending)
signal.covarianceRolling Covariance - Rolling Covariance — measures how two series move together within a rolling window
signal.rolling_maxRolling Maximum - Rolling Maximum — highest value within a rolling window
signal.rolling_sumRolling Sum - Cumulative sum of a price series over a rolling window, equivalent to LEAN's Sum indicator
signal.regression_channelRegression Channel - Linear regression midline with upper and lower standard deviation bands, showing statistically significant price deviations
signal.swiss_army_knifeSwiss Army Knife - Digital signal processing filter bank — applies Gaussian, Butterworth, or SuperSmoother filters to price data for noise reduction
signal.smaSimple Moving Average - Arithmetic mean of prices over a specified period
signal.emaExponential Moving Average - Weighted average giving more importance to recent prices
signal.wmaWeighted Moving Average - Linear weighted average with recent prices weighted higher
signal.demaDouble Exponential Moving Average - Reduces lag by applying EMA twice
signal.temaTriple Exponential Moving Average - Further reduces lag with triple smoothing
signal.hmaHull Moving Average - Reduces lag while maintaining smoothness using weighted averages
signal.vwmaVolume Weighted Moving Average - Average price weighted by volume
signal.kamaKaufman Adaptive Moving Average - Adapts to market conditions using efficiency ratio
signal.zlemaZero Lag Exponential Moving Average - EMA with reduced lag using de-lagging technique
signal.t3Tillson T3 Moving Average - Smoother moving average with six EMAs and a volume factor
signal.supertrendSupertrend - Trend-following indicator based on ATR
signal.ichimokuIchimoku Cloud - Comprehensive trend indicator showing support/resistance, momentum, and trend
signal.adxAverage Directional Index - Measures trend strength regardless of direction
signal.aroonAroon Indicator - Identifies trend changes and strength
signal.vidyaVariable Index Dynamic Average - Adaptive moving average using CMO as volatility index
signal.trimaTriangular Moving Average - Double-smoothed SMA for extra smoothness
signal.mcgdMcGinley Dynamic - Adaptive moving average that adjusts to market speed
signal.almaArnaud Legoux Moving Average - Gaussian weighted moving average with offset control
signal.framaFractal Adaptive Moving Average - Adapts to fractal dimension of price series
signal.smmaSmoothed MA - Smoothed Moving Average — recursive average where each bar contributes equally over the full lookback, reducing noise while maintaining trend fidelity
signal.lsmaLeast Squares MA - Least Squares Moving Average — fits a linear regression line to the data within the lookback window and projects the endpoint
signal.psarParabolic SAR - Parabolic Stop and Reverse — trailing stop that accelerates toward price, flipping direction on penetration
signal.atrAverage True Range - Measures market volatility using true range
signal.natrNormalized Average True Range - ATR expressed as percentage of close price
signal.keltnerKeltner Channel - Volatility-based envelope using ATR
signal.donchianDonchian Channel - Channel based on highest high and lowest low
signal.stddevStandard Deviation - Statistical measure of price volatility
signal.atrpAverage True Range Percent - ATR as percentage of closing price
signal.ulcerUlcer Index - Measures downside volatility and drawdown risk
signal.rvRealized Volatility - Sum of squared intraday returns annualized
signal.bbwBollinger Band Width - Width of Bollinger Bands as percentage
signal.percentbPercent B - Price position within Bollinger Bands
signal.chopChoppiness Index - Measures if market is choppy (sideways) or trending
signal.rviRelative Volatility Index - RSI applied to standard deviation
signal.bbBollinger Bands - Bollinger Bands — volatility envelope around a moving average using standard deviation bands
signal.trangeTrue Range - True Range — maximum of (high-low, |high-prev_close|, |low-prev_close|)
signal.chaikin_volChaikin Volatility - Chaikin Volatility — rate of change of the EMA of the high-low spread
signal.bbpercentBollinger %B - Bollinger %B — position of price relative to the bands (0 = lower band, 1 = upper band)
signal.historical_volHistorical Volatility - Historical Volatility — annualized standard deviation of log returns
signal.heikin_ashiHeikin-Ashi - Synthetic candlestick transform that averages OHLC prices to reduce noise and clarify trend direction
signal.obvOn Balance Volume - Cumulative volume based on price direction
signal.vwapVolume Weighted Average Price - Average price weighted by volume, reset daily
signal.adAccumulation/Distribution Line - Cumulative measure of money flow volume
signal.adoscChaikin A/D Oscillator - MACD of Accumulation/Distribution line
signal.cmfChaikin Money Flow - Measures buying/selling pressure over a period
signal.vptVolume Price Trend - Cumulative volume adjusted by percentage price change
signal.nviNegative Volume Index - Tracks price changes on days volume decreases
signal.pviPositive Volume Index - Tracks price changes on days volume increases
signal.vrocVolume Rate of Change - Percentage change in volume
signal.tviTrade Volume Index - Accumulates volume based on tick direction
signal.pvoPercentage Volume Oscillator - MACD for volume to identify volume trends
signal.market_facilitationMarket Facilitation Index - Measures efficiency of price movement per volume
signal.forceForce Index - Force Index — measures buying/selling pressure using price change × volume
signal.eomEase of Movement - Ease of Movement — relates price change to volume, measuring how easily price moves
signal.pvtPrice Volume Trend - Price Volume Trend — cumulative volume adjusted by percentage price change
signal.vwma_volVolume Weighted MA - Volume Weighted Moving Average — moving average weighted by volume
signal.vol_oscVolume Oscillator - Volume Oscillator — percentage difference between short and long volume moving averages
signal.klingerKlinger Volume Oscillator - Klinger Volume Oscillator — compares volume to price movement to predict reversals
Features are continuous mathematical arrays that describe the structural state of the market, such as rolling microstructural liquidity, statistical variance, or phase-space divergence. They can be computed independently as standalone datasets via the Universe Loader, or natively routed into your Custom Logic scripts as conditional dependencies.
Kopie Quant adheres to strict mathematical purity. Every feature within the ecosystem is forensically audited and certified against canonical academic whitepapers (e.g., Amihud 2002, Rosenstein 1993) and standard public implementations (e.g., SciPy, Pandas). Our algorithms are engineered to achieve perfect statistical parity with leading institutional standards. We do not utilize "black-box" heuristics, ensuring the primitives utilized in your infrastructure are computationally undeniable.
feature.micro_tick_ruleDetermines the implied trade direction (buyer-initiated vs. seller-initiated) by comparing the current price to the previous price. If the price goes up, it assigns 1.0; if down, -1.0; if unchanged, it carries forward the previous sign.
feature.micro_roll_spreadImplements Roll's (1984) model to estimate the effective bid-ask spread directly from the serial covariance of price changes, useful when exact order book data is unavailable.
feature.micro_dollar_volumeRepresents the total fiat value exchanged per bar. A foundational liquidity metric that removes share-price bias when comparing trading activity across multiple assets.
feature.micro_turnoverCalculates the rolling aggregate volume over a given window divided by shares outstanding. This provides a clear metric of relative activity, measuring how fast the asset's liquidity pool is turning over.
feature.micro_amihudCalculates the Amihud (2002) Illiquidity measure. It divides the absolute percentage return by the dollar volume over a rolling window. High values indicate that a small amount of dollar volume caused a massive price swing.
feature.micro_cs_spreadThe Corwin-Schultz (2012) High-Low Spread estimator. It estimates the effective bid-ask spread by utilizing only the high and low prices over a rolling window. It elegantly isolates the spread component from fundamental volatility by analyzing the variance ratio of high-low ranges over 2-period versus 1-period intervals.
feature.micro_amivestThe Amivest Liquidity Ratio. Functionally the inverse of the Amihud measure, this ratio represents the aggregate dollar volume required to move the price by 1%. High values indicate deep liquidity, as significant capital is required to induce a price swing.
feature.micro_hui_heubelThe Hui-Heubel Liquidity Ratio. A relative measure relating the maximum price variance over a window to the asset's turnover rate (average volume over shares outstanding). Lower values denote high liquidity, implying the price remains stable despite heavy turnover. Note: Kopie Quant's Universe Loader automatically resolves and injects the canonical `shares_outstanding` from your institutional data feed at runtime. This parameter is exposed solely for manual overrides and hypothetical stress-testing.
feature.micro_martinThe Martin Liquidity Index. Measures liquidity degradation by summing the squared price range divided by volume over a window. A rising index implies that the available trading volume is struggling to absorb price volatility, denoting thinning liquidity.
feature.micro_kyle_lambdaKyle's Lambda (1985). A cornerstone metric for market impact modeling, Lambda measures the price impact of a trade by regressing price returns against signed order flow (trade imbalance). A higher Lambda signifies lower liquidity, indicating a larger adverse price impact per unit of volume traded.
feature.micro_hasbrouckHasbrouck's Lambda (1991). An evolution of Kyle's Lambda, this metric models the concavity of market impact by regressing price returns against the square root of signed volume. A higher value indicates severe price impact and thin liquidity, as a relatively small order flow can displace the equilibrium price.
feature.micro_kyle_depthKyle's Market Depth. Mathematically the inverse of Kyle's Lambda. It quantifies the absolute order flow required to move the asset's price by a single unit (e.g., 1%). High values imply profound liquidity depth, signifying that the order book can absorb massive volume shocks without significant price dislocation.
feature.micro_market_impactMarket Impact Correlation. Measures the rolling Pearson correlation between absolute returns and trading volume over a window. It evaluates the structural relationship between volatility and volume; strong positive correlations suggest that volume spikes are actively driving price dislocation rather than resting passively in the book.
feature.micro_roll_impactRoll Impact Ratio. A composite metric that divides the Roll Implied Spread by the asset's Dollar Volume. It estimates the implicit spread cost per unit of fiat liquidity. A rising Roll Impact signals liquidity exhaustion—either the spread is widening despite steady volume, or volume is collapsing while spreads remain structurally rigid.
feature.micro_trade_imbalanceOrder Flow Imbalance. Calculates the normalized ratio of buyer-initiated volume versus seller-initiated volume over a trailing window. Values range from -1.0 (pure systemic selling pressure) to 1.0 (pure systemic buying pressure). Highly effective for detecting institutional accumulation or distribution phases prior to price action confirmation.
feature.micro_pastor_stambaughThe Pástor-Stambaugh (2003) Liquidity Factor. Estimates the return-reversal effect induced by signed order flow using a multivariate OLS regression over a trailing window. A significantly negative gamma coefficient implies that large signed-volume shocks cause predictable return reversals the following period—a hallmark of illiquidity. Widely used in cross-sectional asset pricing to decompose systematic liquidity risk from idiosyncratic noise.
feature.micro_pin_proxyProbability of Informed Trading (PIN) Proxy. Approximates the classical Easley-O'Hara PIN measure without requiring the full maximum-likelihood decomposition. It calculates the absolute imbalance between buyer-initiated and seller-initiated volume as a fraction of total volume. Higher values indicate a greater proportion of informed (directional) trading relative to uninformed (noise) flow.
feature.micro_rvolRelative Volume. Measures the current bar's volume as a multiple of its trailing rolling average. An RVOL of 2.0 means the current bar traded at twice the normal volume. Primarily used to detect unusual activity events—institutional block trades, news catalysts, or algorithmic bursts—that deviate from the asset's baseline liquidity profile.
feature.micro_vzscoreVolume Z-Score. Standardizes the current bar's volume by subtracting the rolling mean and dividing by the rolling standard deviation. The output is a dimensionless z-score indicating how many standard deviations the current volume deviates from normal. Values above +2.0 represent statistically significant volume anomalies.
feature.micro_intraday_intensityIntraday Intensity Index (Bostian). Measures the position of the close relative to the high-low range, weighted by volume, and accumulated over a rolling window. Values near 1.0 indicate that the close is consistently near the high on heavy volume (accumulation); values near -1.0 indicate consistent closes near the low on heavy volume (distribution).
feature.micro_variance_ratioThe Lo-MacKinlay (1988) Variance Ratio test. Compares the variance of q-period returns to q times the variance of single-period returns. Under a pure random walk, the ratio equals 1.0. Values significantly above 1.0 indicate positive serial correlation (trending behavior); values below 1.0 indicate mean reversion. A foundational tool for testing the Efficient Market Hypothesis at the microstructure level.
feature.micro_momentumMicrostructure Momentum. Computes the rolling mean of directionally signed returns (return × tick direction) over a window. This isolates the momentum component embedded in the order flow itself, distinguishing between price moves that are confirmed by the tick direction versus those that are against it. Consistently positive values indicate trend-following momentum aligned with order flow.
feature.micro_price_persistencePrice Persistence. Measures the probability that the sign of a return in one period will match the sign of the return in the subsequent period over a rolling window. A persistence score of 0.7 means 70% of consecutive bars had returns in the same direction. Values above 0.5 indicate trending tendencies; values below 0.5 indicate choppy or mean-reverting conditions.
feature.micro_liquidity_persistenceLiquidity Persistence (AR(1) of Amihud). Measures the autoregressive persistence of the Amihud illiquidity measure by regressing changes in Amihud against their lagged values over a trailing window. A coefficient near 1.0 implies liquidity conditions are "sticky"—once liquidity dries up, it stays dry. A coefficient near 0 implies liquidity shocks are transient and self-correcting.
feature.stat_meanRolling Arithmetic Mean. The most fundamental statistical moment—computes the simple average of a specified source column over a trailing window. While conceptually basic, its output is foundational to dozens of downstream features including z-scores, standardizations, and regime-relative comparisons. Supports flexible source column selection (returns, close, volume, etc.).
feature.stat_varianceRolling Variance. Computes the second central moment of a specified source column over a trailing window with configurable degrees of freedom. Variance is the bedrock of volatility modeling—it quantifies the average squared deviation of observations from the rolling mean. Use ddof=1 for Bessel-corrected (sample) variance; ddof=0 for population variance.
feature.stat_stddevRolling Standard Deviation. The square root of the rolling variance—expressed in the same units as the source data. This is the canonical measure of realized volatility in quantitative finance. Historically annualized by multiplying by √252 for daily data. Supports flexible source column and degrees-of-freedom configuration.
feature.stat_skewnessRolling Skewness. The third standardized moment—measures the asymmetry of the return distribution over a trailing window. Negative skewness (left tail) is common in equities, indicating that large drawdowns are more frequent than large rallies. Positive skewness implies the opposite. Used in risk management to adjust position sizing for tail asymmetry and in options pricing to calibrate smile dynamics.
feature.stat_kurtosisRolling Kurtosis. The fourth standardized moment—measures the "tailedness" of the return distribution. Higher kurtosis indicates heavier tails and a sharper peak relative to a Gaussian. Financial returns are almost universally leptokurtic (kurtosis > 3), meaning extreme events occur far more frequently than a normal distribution would predict. Essential for Value-at-Risk (VaR) and Expected Shortfall (ES) calculations.
feature.stat_excess_kurtosisRolling Excess Kurtosis. Defined as kurtosis - 3.0, this normalizes the kurtosis so that a Gaussian distribution has an excess kurtosis of exactly 0. Positive excess kurtosis means the tails are heavier than a normal distribution (leptokurtic); negative means they are lighter (platykurtic). This is the preferred metric for assessing tail risk in institutional risk models because it directly quantifies the deviation from normality.
feature.stat_semi_varianceRolling Semi-Variance. Computes the variance of only the below-mean observations within a trailing window. Unlike symmetric variance, semi-variance exclusively captures downside dispersion—the risk that investors actually care about. This is the foundation of the Sortino Ratio and downside-risk-only portfolio optimization frameworks. A rising semi-variance with stable total variance implies increasing negative tail concentration.
feature.stat_madMean Absolute Deviation (MAD). Computes the average absolute distance of each observation from the rolling mean. More robust than standard deviation to outlier contamination because it does not square the deviations—making it a preferred dispersion metric when the distribution contains heavy tails or when you want a linear (L1-norm) risk estimate. Supports flexible source column selection.
feature.stat_cvCoefficient of Variation (CV). The ratio of the rolling standard deviation to the absolute rolling mean. This dimensionless metric normalizes volatility relative to the level of the series, allowing cross-asset and cross-timeframe risk comparisons. A CV of 2.0 means the standard deviation is twice the absolute mean—indicating extreme relative dispersion. Uses an epsilon guard against division by zero.
feature.stat_zscoreRolling Z-Score. Standardizes the current observation by subtracting the rolling mean and dividing by the rolling standard deviation. The output quantifies how many standard deviations the current value deviates from its recent norm. Values beyond ±2.0 are statistically unusual; values beyond ±3.0 are extreme outliers. The canonical building block for mean-reversion strategies and Bollinger Band-style entry/exit signals.
feature.stat_autocorrRolling Autocorrelation. Computes the Pearson correlation between a series and its own lagged values over a trailing window. Autocorrelation at lag-1 reveals whether consecutive returns are serially dependent—positive autocorrelation suggests trending (momentum) behavior, while negative autocorrelation suggests mean reversion. Configurable lag enables multi-scale serial dependency profiling.
feature.stat_drawdownRolling Drawdown. Computes the percentage decline of the current price from its local windowed peak—not the global all-time high. A drawdown of -0.15 means the asset is currently 15% below its recent peak over the trailing window. This windowed approach avoids stale peaks from distant history dominating the signal and is more responsive to regime changes. Reference: Chekhlov, Uryasev & Zabarankin (2005).
feature.stat_pacfRolling Partial Autocorrelation (PACF). Isolates the direct linear relationship between a time series and its lagged self after removing the effects of all intermediate lags. Unlike ACF (which blends direct and indirect dependencies), PACF reveals which specific lag has a genuine causal relationship to the current observation. Critical for ARIMA model order selection and for detecting hidden structural dependencies in return series.
feature.stat_jarque_beraRolling Jarque-Bera Test Statistic. A goodness-of-fit test that jointly evaluates whether a sample's skewness and kurtosis match those of a normal distribution. The test statistic is JB = (n/6) × [S² + (K-3)²/4]. High JB values (typically > 5.99 at the 5% significance level) reject the null hypothesis of normality, indicating statistically significant fat tails or asymmetry—critical for validating Gaussian assumptions in VaR and portfolio optimization.
feature.stat_standard_errorStandard Error of the Mean (SEM). Computes the precision of the rolling mean estimate by dividing the rolling standard deviation by the square root of the window size. A smaller SEM indicates that the rolling mean is a more reliable estimator. Used in hypothesis testing to construct confidence intervals around rolling statistics and to determine whether observed alpha is statistically significant versus noise.
feature.struct_entropyShannon Entropy. Quantifies the information content (disorder/randomness) of the return distribution over a trailing window by histogramming observations into configurable bins and computing -Σ p·log₂(p). Maximum entropy indicates a uniform (maximally random) distribution; low entropy indicates concentration into a few dominant bins, suggesting structural order or regime dominance. Bridges statistical analysis into information theory—essential for detecting regime transitions.
feature.struct_hurstThe Hurst Exponent (R/S Analysis). A measure of the long-range memory (persistence) of a time series. H = 0.5 implies a pure random walk (no memory). H > 0.5 indicates persistent (trending) behavior where past moves predict future direction. H < 0.5 indicates anti-persistent (mean-reverting) behavior. Computed via Rescaled Range (R/S) analysis across multiple sub-period scales, then extracting the log-log regression slope. The foundational metric for fractal market analysis.
feature.struct_fracdiffFractional Differentiation (Marcos López de Prado). Applies a fractional order of differencing to the close price series, preserving memory while achieving stationarity. Traditional integer differencing (d=1) destroys all memory; fractional differencing (0 < d < 1) finds the minimum d required to make the series stationary while retaining maximum predictive information. The threshold parameter controls weight truncation for computational efficiency.
feature.struct_adfAugmented Dickey-Fuller Test Statistic. The canonical unit root test for determining whether a time series is stationary. A more negative ADF statistic provides stronger evidence against the null hypothesis of a unit root (non-stationarity). Critical values are approximately -2.86 (10%), -3.41 (5%), and -3.96 (1%). Configurable regression type controls whether a constant, trend, or neither is included in the test regression.
feature.struct_kpssKPSS (Kwiatkowski-Phillips-Schmidt-Shin) Test Statistic. The complementary stationarity test to ADF. While ADF tests the null of non-stationarity, KPSS tests the null of stationarity. A high KPSS statistic rejects stationarity. Using ADF and KPSS together provides a robust diagnostic: if ADF rejects and KPSS fails to reject, the series is confirmed stationary. If both reject, the series is difference-stationary with a structural break.
feature.struct_cusumCUSUM (Cumulative Sum) Structural Break Filter. Monitors the cumulative deviation of returns from their rolling mean, triggering a signal when the deviation exceeds a configurable number of standard deviations (σ). The output represents the normalized CUSUM value—when it breaches the threshold, a structural break (regime change) is detected. Widely used in quality control and increasingly in algorithmic trading for adaptive stop-loss and regime-switching triggers.
feature.struct_waveletWavelet Energy Decomposition. Applies a discrete wavelet transform (DWT) to decompose the return series into frequency-domain components, then computes the energy (sum of squared coefficients) at a specified decomposition level. High energy in the detail coefficients indicates significant high-frequency volatility; energy concentrated in the approximation coefficients indicates low-frequency trend dominance. Configurable wavelet family (Daubechies, Haar, Symlet) and decomposition level.
feature.struct_lyapunovLargest Lyapunov Exponent (Rosenstein Method). Quantifies the sensitivity to initial conditions—the hallmark of deterministic chaos. A positive Lyapunov exponent indicates chaotic dynamics where nearby trajectories in phase space diverge exponentially. A negative exponent indicates convergence (stable dynamics). Computed by embedding the time series into a reconstructed phase space using Takens' theorem, then measuring the average divergence rate of nearest neighbors.
feature.struct_fractal_dimFractal Dimension. Derived directly from the Hurst Exponent via the relation D = 2 - H. A fractal dimension of 1.5 indicates a pure random walk (Brownian motion). D < 1.5 indicates a smooth, trending path (persistent). D > 1.5 indicates a rough, jagged path (anti-persistent/mean-reverting). This provides a geometric interpretation of market structure that is invariant to scale—the same fractal properties hold whether you look at 1-minute or 1-day bars.
feature.struct_mutual_infoMutual Information (MI). An information-theoretic measure of the nonlinear statistical dependency between a time series and its lagged self. Unlike autocorrelation (which only captures linear dependency), MI detects any form of dependency—including nonlinear, threshold, and regime-dependent relationships. Computed via MI = H(X) + H(Y) - H(X,Y) using natural logarithm (nats). MI = 0 implies statistical independence; higher MI indicates stronger dependency.
feature.struct_hurst_of_ema_spreadHurst Exponent of EMA Spread. A composite structural feature that first computes the spread between close price and its EMA, then applies R/S Hurst analysis to that spread. This isolates the fractal memory of the deviation from trend—answering: "Does the mean-reversion signal itself have structural persistence?" H > 0.5 on the spread implies the gap widens (trending deviation), making mean-reversion dangerous. H < 0.5 implies the spread is self-correcting, validating mean-reversion strategies.
feature.regime_vol_labelVolatility Regime Labels. Classifies the current volatility level into one of three regimes (Low=0, Medium=1, High=2) by computing the percentile rank of the current rolling standard deviation against its own trailing distribution over a configurable lookback. If current vol is in the bottom 33rd percentile, the regime is Low; top 33rd is High. This enables condition-specific strategy deployment—e.g., selling premium in High vol, running breakout systems in Low vol.
feature.regime_autocorrelationReturn Autocorrelation Regime. Computes the rolling Pearson correlation between returns and their 1-period lag over a trailing window. Unlike stat_autocorr (which is a raw statistical output), this feature is designed for direct regime consumption—positive values indicate momentum-favorable conditions, negative values indicate mean-reversion-favorable conditions, and near-zero values indicate random-walk behavior where neither strategy has an edge.
feature.regime_hmmGaussian Mixture Model (GMM) Regime States. Fits a k-component 1D Gaussian Mixture via Expectation-Maximization (EM) on the trailing return distribution, then classifies the current observation by posterior probability. States are sorted by mean return level (State 0 = lowest mean/bearish, State N = highest mean/bullish). Outputs the discrete state label and per-state posterior probabilities. Reference: Dempster, Laird & Rubin (1977); McLachlan & Peel (2000).
feature.regime_hurst_persistenceHurst Persistence Regime. A binary regime classifier derived from the Hurst Exponent. If H > threshold (default 0.5), the regime is labeled as "persistent" (1.0), indicating trending market conditions. If H ≤ threshold, the regime is labeled as "anti-persistent" (0.0), indicating mean-reverting conditions. This is the simplest possible fractal regime filter—a single boolean gate for strategy selection.
feature.regime_recoveryRecovery State. A binary indicator that tracks whether the asset is currently recovering from a drawdown (1.0) or still declining (0.0). Computed by comparing the current drawdown to the previous bar's drawdown—if the drawdown is improving (becoming less negative), the asset is in recovery. This simple but powerful signal is used for dip-buying strategies, risk budget reallocation, and drawdown-aware position management.
feature.regime_hmm_on_macdGaussian Mixture Regime on MACD Signal Line. Applies Gaussian Mixture Model (GMM) regime classification not to raw returns, but to the MACD signal line—a momentum derivative. Computes MACD inline (EMA_fast - EMA_slow smoothed by signal EMA), then fits a k-component GMM via EM on the trailing signal distribution. States are sorted by mean signal level (State 0 = bearish momentum, State 2 = bullish acceleration). Reference: McLachlan & Peel (2000); Hamilton (1989).
feature.stat_skew_of_rsiRolling Skewness of RSI. Computes the third moment (skewness) of the RSI indicator itself over a trailing window. This is a second-order feature—it measures whether the RSI distribution is asymmetric over recent history. Negative skew of RSI means the indicator has spent more time near extreme lows (oversold clustering). Positive skew means overbought clustering. Detects regimes where oscillator behavior is structurally biased rather than mean-reverting.
feature.stat_kurt_of_rsiRolling Kurtosis of RSI. Computes the fourth moment (kurtosis) of the RSI indicator over a trailing window. High kurtosis of RSI means the oscillator is spending most of its time in a narrow range with occasional extreme excursions—indicating a "coiled spring" condition where the next breakout could be violent. Low kurtosis indicates a more uniformly distributed RSI with stable oscillatory behavior.
feature.stat_entropy_of_bb_pctbShannon Entropy of Bollinger %B. Applies information-theoretic entropy analysis to the Bollinger Bands Percent B indicator. Low entropy of %B means the indicator is stuck in a narrow range (low information/high predictability)—often preceding a volatility expansion. High entropy means %B is uniformly distributed across its range, indicating maximum uncertainty. This composite feature bridges technical analysis (Bollinger Bands) with information theory for volatility regime anticipation.