CODING CHALLENGES

代码题库

用接近 LeetCode 的题表进入训练:先筛选题目,再进入双栏题面和编辑器。每道题只展示它实际声明支持的语言。

继续刷题

题目列表

显示 112 / 646 道可提交题。 当前筛选:标签:Statistics,权限:订阅

提交状态:未尝试未正确已正确
未尝试
coding-american-mc-longstaff-schwartz订阅锁定
American Put Pricing via Longstaff-Schwartz Least-Squares Monte Carlo

American Put Pricing via Longstaff-Schwartz Least-Squares Monte Carlo

困难面试准备Python / C++ / Rust
未尝试
coding-antithetic-variates-variance-reduction订阅锁定
对偶变量法的方差缩减比

Antithetic Variates Variance Reduction

困难面试准备Python / C++ / Rust
未尝试
coding-asian-call-arithmetic-mean订阅锁定
算术平均亚式看涨期权的蒙特卡洛定价(含对偶变量法)

Arithmetic-average Asian Call MC Pricing with Antithetic Variates

中等面试准备Python / C++ / Rust
未尝试
coding-asof-merge-prices-trades订阅锁定
时序对齐合并:为每笔成交附上最近的中间价

As-of Merge — Attach Most-Recent Mid-Price to Each Trade

中等面试准备Python / C++ / Rust
未尝试
coding-asof-merge-trade-fills订阅锁定
时序对齐合并:成交与报价的 as-of 拼接

As-of Merge — Trades against Quotes

中等面试准备Python / C++ / Rust
未尝试
coding-barrier-up-and-out-call订阅锁定
向上敲出障碍看涨期权的蒙特卡洛定价(日度监测)

Up-and-out Barrier Call MC Pricing with Daily Monitoring

中等面试准备Python / C++ / Rust
未尝试
coding-binomial-credit-loss-var-uniform-pd订阅锁定
同质化组合(均匀 PD)信用损失 VaR 的解析二项法

Analytical Binomial Credit-Loss VaR for a Uniform-PD Homogeneous Portfolio

中等面试准备Python / C++ / Rust
未尝试
coding-blocked-cv-time-respecting订阅锁定
时序保留的分块 CV:连续折,train 严格早于 test

Blocked Time-Respecting CV: Contiguous Folds with Train-Before-Test

中等面试准备Python / C++ / Rust
未尝试
coding-brownian-bridge-min-prob订阅锁定
布朗桥运行最小值的存活概率

Brownian Bridge Running Minimum Survival Probability

中等面试准备Python / C++ / Rust
未尝试
coding-clayton-copula-sample订阅锁定
从 Clayton Copula 抽样

Sample from a Clayton Copula

中等面试准备Python / C++ / Rust
未尝试
coding-cliquet-call-mc订阅锁定
本地封顶 Cliquet 看涨期权的蒙特卡洛定价(含对偶变量法)

Locally-capped Cliquet Call MC Pricing with Antithetic Variates

中等面试准备Python / C++ / Rust
未尝试
coding-compound-poisson-aggregate-variance订阅锁定
操作风险 LDA 周期的复合泊松总损失方差

Compound-Poisson Aggregate-Loss Variance for an Operational-Risk LDA Period

中等面试准备Python / C++ / Rust
未尝试
coding-control-variate-european订阅锁定
欧式看涨 MC:几何亚式控制变量

European Call MC with Geometric-Asian Control Variate

中等面试准备Python / C++ / Rust
未尝试
coding-copula-tail-dependence订阅锁定
经验 Copula 尾依赖系数

Empirical Copula Tail-Dependence Coefficients

中等面试准备Python / C++ / Rust
未尝试
coding-cornish-fisher-var订阅锁定
Cornish-Fisher VaR

Cornish-Fisher VaR

中等面试准备Python / C++ / Rust
未尝试
coding-cornish-fisher-var-skew-kurtosis订阅锁定
Cornish-Fisher 偏度与超额峰度修正 VaR

Cornish-Fisher VaR Adjusted for Skewness and Excess Kurtosis

中等面试准备Python / C++ / Rust
未尝试中等面试准备Python / C++ / Rust
未尝试
coding-correlated-portfolio-var-from-standalone-vars订阅锁定
由分桌台 VaR 与损失相关矩阵聚合多桌台组合 VaR

Aggregate Multi-Desk VaR from Standalone VaRs and a Loss-Correlation Matrix

中等面试准备Python / C++ / Rust
未尝试
coding-correlated-shock-mc订阅锁定
相关因子冲击蒙特卡洛(压力 P&L)

Correlated Factor-Shock Monte-Carlo for Stress P&L

中等面试准备Python / C++ / Rust
未尝试
coding-digital-cash-or-nothing订阅锁定
对偶变量蒙特卡洛:数字现金或无看涨期权

Digital Cash-or-Nothing Call Monte Carlo with Antithetic Variates

中等面试准备Python / C++ / Rust
未尝试
coding-empirical-copula-uniform-rank-transform订阅锁定
经验 Copula:按列均匀秩变换

Empirical Copula via Per-Column Uniform Rank Transform

困难面试准备Python / C++ / Rust
未尝试
coding-empirical-mean-excess-function订阅锁定
用于 POT 阈值选择的经验均值超额函数

Empirical Mean Excess Function for POT Threshold Selection

困难面试准备Python / C++ / Rust
未尝试
coding-empirical-upper-tail-dependence订阅锁定
经验上尾相依系数:由二维联合样本估计

Empirical Upper-Tail-Dependence Coefficient from Bivariate Samples

困难面试准备Python / C++ / Rust
未尝试
coding-equal-risk-contribution订阅锁定
等风险贡献组合权重

Equal-Risk-Contribution Portfolio Weights

中等面试准备Python / C++ / Rust
未尝试
coding-estimate-barrier-hit-probability订阅锁定
蒙特卡洛估计屏障触发概率

Estimate Barrier Hit Probability

简单面试准备Python / C++ / Rust
未尝试
coding-european-call-mc-anti订阅锁定
对偶变量蒙特卡洛:欧式看涨期权定价

European Call Monte Carlo with Antithetic Variates

中等面试准备Python / C++ / Rust
未尝试
coding-european-call-monte-carlo订阅锁定
蒙特卡洛定价欧式看涨期权

European Call Price via Monte Carlo

中等面试准备Python / C++ / Rust
未尝试
coding-evt-block-maxima-gev-fit订阅锁定
用矩估计把分块极大值拟合到 Gumbel(GEV, ξ=0)子情形

Fit a Gumbel (GEV, ξ=0) to Block Maxima by Method of Moments

中等面试准备Python / C++ / Rust
未尝试
coding-evt-hill-estimator-tail-index订阅锁定
尾部指数的 Hill 估计

Hill Estimator for the Tail Index

中等面试准备Python / C++ / Rust
未尝试
coding-evt-pot-gpd-fit订阅锁定
阈值超额法 (POT) 下的 GPD 矩量法拟合

Peaks-Over-Threshold GPD Fit by Method of Moments

中等面试准备Python / C++ / Rust
未尝试
coding-ewma-sharpe-ratio订阅锁定
指数加权 Sharpe 比率

Exponentially-Weighted Sharpe Ratio

中等面试准备Python / C++ / Rust
未尝试简单面试准备Python / C++ / Rust
未尝试
coding-excess-returns-from-benchmark订阅锁定
相对基准的超额收益

Excess Returns Over a Benchmark

中等面试准备Python / C++ / Rust
未尝试
coding-execution-quality-score-blend订阅锁定
Composite Broker Execution-Quality Score with Direction-Aware Z-Score Blend

Composite Broker Execution-Quality Score with Direction-Aware Z-Score Blend

中等面试准备Python / C++ / Rust
未尝试
coding-expected-shortfall-historical订阅锁定
滚动历史 Expected Shortfall (CVaR)

Rolling Historical Expected Shortfall (CVaR)

中等面试准备Python / C++ / Rust
未尝试
coding-expected-value-scenario-tree订阅锁定
情景树根节点期望值

Expected Value at Root of Scenario Tree

简单面试准备Python / C++ / Rust
未尝试
coding-factor-shock-scenario-pnl订阅锁定
Factor-Shock Scenario P&L on a Linear Factor Model

Factor-Shock Scenario P&L on a Linear Factor Model

中等面试准备Python / C++ / Rust
未尝试
coding-fillrate-by-venue-with-cis订阅锁定
按场所统计的成交率与 Wilson 置信区间

Per-Venue Fill Rate with Wilson Confidence Intervals

中等面试准备Python / C++ / Rust
未尝试
coding-first-passage-time-mc订阅锁定
蒙特卡洛估计 OU 过程首次穿越时间

OU First-Passage Time by Monte Carlo

中等面试准备Python / C++ / Rust
未尝试
coding-fixed-strike-lookback-call订阅锁定
固定执行价回望看涨期权的蒙特卡洛定价(离散监测)

Fixed-strike Lookback Call MC Pricing with Discrete Monitoring

中等面试准备Python / C++ / Rust
未尝试
coding-fx-cross-hedge-residual订阅锁定
交叉对冲的残差方差与解释力

Cross-Hedge Residual Variance and Explanatory Power

中等面试准备Python / C++ / Rust
未尝试
coding-gaussian-copula-sample订阅锁定
从高斯 Copula 抽样

Sample from a Gaussian Copula

中等面试准备Python / C++ / Rust
未尝试
coding-gk-summary-streaming-quantile订阅锁定
Greenwald-Khanna Streaming Quantile Summary

Greenwald-Khanna Streaming Quantile Summary

中等面试准备Python / C++ / Rust
未尝试
coding-gpd-tail-var-extrapolation订阅锁定
POT 框架下基于 GPD 的尾部 VaR 外推

GPD Tail-VaR Extrapolation under the POT Framework

困难面试准备Python / C++ / Rust
未尝试
coding-groupby-mean-by-key订阅锁定
按 key 分组求均值,并附最小样本数门控

Groupby-Mean by Key with a Min-Count Gate

中等面试准备Python / C++ / Rust
未尝试
coding-hdr-histogram-recorded-values订阅锁定
HDR Histogram Recorded-Value Bucket Index and Quantile Estimate

HDR Histogram Recorded-Value Bucket Index and Quantile Estimate

困难面试准备Python / C++ / Rust
未尝试
coding-hill-estimator-tail-index订阅锁定
重尾损失分布尾指数的 Hill 估计

Hill Estimator for the Tail Index of a Heavy-Tailed Loss Distribution

困难面试准备Python / C++ / Rust
未尝试
coding-historical-stress-loss-replay订阅锁定
历史压力情景损失复盘

Historical Stress Loss Replay

中等面试准备Python / C++ / Rust
未尝试
coding-historical-var-portfolio订阅锁定
组合历史 VaR

Historical VaR for a Long-Only Portfolio

中等面试准备Python / C++ / Rust
未尝试
coding-historical-var-var-only订阅锁定
滚动历史 VaR 序列

Rolling Historical VaR Track

中等面试准备Python / C++ / Rust
未尝试
coding-idiosyncratic-volatility订阅锁定
特异波动率因子:滚动剥离市场 β 后的残差标准差

Idiosyncratic Volatility Factor — Rolling Residual Std After Market Beta

中等面试准备Python / C++ / Rust
未尝试
coding-importance-sampling-deep-otm-mc订阅锁定
Importance Sampling for Deep OTM Monte Carlo

Importance Sampling for Deep OTM Monte Carlo

困难面试准备Python / C++ / Rust
未尝试
coding-incremental-var订阅锁定
按资产分解的成分 VaR(Euler 分解)

Component VaR per Asset (Euler Decomposition)

中等面试准备Python / C++ / Rust
未尝试
coding-information-ratio订阅锁定
年化信息比率

Annualized Information Ratio

中等面试准备Python / C++ / Rust
未尝试
coding-jump-diffusion-merton-mc订阅锁定
Merton Jump-Diffusion European Call via Monte Carlo

Merton Jump-Diffusion European Call via Monte Carlo

困难面试准备Python / C++ / Rust
未尝试
coding-kendall-tau-from-ranks订阅锁定
Kendall's Tau-a Rank Correlation on a Bivariate Sample

Kendall's Tau-a Rank Correlation on a Bivariate Sample

中等面试准备Python / C++ / Rust
未尝试
coding-lag-lead-transform-by-key订阅锁定
按 key 做滞后/前瞻偏移——组内时序位移

Lag/Lead Shift by Key — Within-Group Time-Series Offset

中等面试准备Python / C++ / Rust
未尝试
coding-look-ahead-bias-detector订阅锁定
通过滞后相关比较检测前视偏差

Look-Ahead Bias Detector via Lagged-Correlation Comparison

中等面试准备Python / C++ / Rust
未尝试
coding-max-drawdown-decomposition订阅锁定
最大回撤分解

Max Drawdown Decomposition

中等面试准备Python / C++ / Rust
未尝试
coding-max-iid-call-pricing订阅锁定
n 个独立同分布 lognormal 取最大的看涨期权半解析定价

Semi-Analytic Call Price on the Max of n iid Lognormals

中等面试准备Python / C++ / Rust
未尝试
coding-mean-reversion-residual订阅锁定
均值回复因子:对基准残差化的过去 K 日收益

Mean-Reversion Factor — Residualized Last-K Return

中等面试准备Python / C++ / Rust
未尝试
coding-min-variance-long-only订阅锁定
长仓最小方差组合权重

Long-Only Minimum-Variance Portfolio Weights

中等面试准备Python / C++ / Rust
未尝试
coding-monte-carlo-var-portfolio订阅锁定
蒙特卡洛 VaR(多资产组合)

Monte-Carlo VaR for a Multi-Asset Portfolio

中等面试准备Python / C++ / Rust
未尝试
coding-multi-level-monte-carlo-european-call订阅锁定
Multi-Level Monte Carlo for a European Call

Multi-Level Monte Carlo for a European Call

困难面试准备Python / C++ / Rust
未尝试
coding-mutual-information-feature-rank订阅锁定
用直方图估计的互信息对特征做相关性排序

Rank Features by Histogram-Estimated Mutual Information with the Target

困难面试准备Python / C++ / Rust
未尝试
coding-online-pca-oja-rule-streaming订阅锁定
Online PCA via Oja's Rule (Streaming PC1)

Online PCA via Oja's Rule (Streaming PC1)

困难面试准备Python / C++ / Rust
未尝试
coding-online-zscore-anomaly-flag订阅锁定
在线 Z 分数异常打标

Online Z-Score Anomaly Flag

中等面试准备Python / C++ / Rust
未尝试
coding-parametric-gaussian-es-from-moments订阅锁定
由调用者提供矩量计算参数化高斯 ES

Parametric Gaussian Expected Shortfall from Caller-Supplied Moments

中等面试准备Python / C++ / Rust
未尝试
coding-parametric-var-normal订阅锁定
滚动参数法 VaR(正态假设)

Rolling Parametric VaR (Normal)

中等面试准备Python / C++ / Rust
未尝试
coding-pareto-tail-var-via-hill-estimator订阅锁定
基于 Hill 估计的 Pareto 尾部 VaR 外推

Pareto Tail VaR via Hill-Estimator Extrapolation

困难面试准备Python / C++ / Rust
未尝试
coding-pca-eigen-2by2订阅锁定
2x2 协方差闭式特征分解(toy PCA)

Closed-Form 2x2 PCA Eigendecomposition

中等面试准备Python / C++ / Rust
未尝试
coding-pca-explained-variance订阅锁定
主成分分析:前 k 个成分的解释方差比

PCA Explained-Variance Ratio for Top-k Components

中等面试准备Python / C++ / Rust
未尝试
coding-pca-ledoit-wolf-frobenius-shrinkage订阅锁定
Optimal Ledoit-Wolf Shrinkage (Frobenius)

Optimal Ledoit-Wolf Shrinkage (Frobenius)

困难面试准备Python / C++ / Rust
未尝试
coding-percent-change-from-base订阅锁定
相对可配置基的百分变化

Percent-Change from a Configurable Base

中等面试准备Python / C++ / Rust
未尝试
coding-percentile-from-bucketed-counts订阅锁定
Quantile Estimate from Pre-Bucketed Histogram Counts

Quantile Estimate from Pre-Bucketed Histogram Counts

中等面试准备Python / C++ / Rust
未尝试
coding-pivot-long-to-wide-panel订阅锁定
长表转宽表:把 (date, ticker, value) 面板透视成二维矩阵

Long-to-Wide Pivot — Reshape a (Date, Ticker, Value) Panel into a Matrix

中等面试准备Python / C++ / Rust
未尝试
coding-portfolio-var-multivariate订阅锁定
多资产组合参数法 VaR(w^T Σ w)

Multi-Asset Portfolio Parametric VaR (w^T Σ w)

中等面试准备Python / C++ / Rust
未尝试
coding-purged-cv-folds订阅锁定
带禁运区的 Purged K 折交叉验证

Purged k-Fold CV with Embargo

中等面试准备Python / C++ / Rust
未尝试
coding-purged-kfold-cv-time-series订阅锁定
时间序列机器学习的 Purged K 折交叉验证

Purged k-Fold Cross-Validation for Time-Series ML

困难面试准备Python / C++ / Rust
未尝试
coding-rainbow-best-of-call-mc订阅锁定
Best-of-N 彩虹看涨期权的蒙特卡洛定价(Cholesky + 对偶变量法)

Best-of-N Rainbow Call MC Pricing with Cholesky and Antithetic Variates

中等面试准备Python / C++ / Rust
未尝试
coding-random-walk-hitting-probability订阅锁定
对称随机游走的双向触障概率

Random Walk Hitting Probability

简单面试准备Python / C++ / Rust
未尝试
coding-range-accrual-pricer订阅锁定
Range-Accrual 票据每日观测蒙特卡洛定价(含对偶变量法)

Range-Accrual Note Pricer via Daily-Monitoring MC with Antithetic Variates

中等面试准备Python / C++ / Rust
未尝试
coding-rank-corr-spearman订阅锁定
两因子序列的 Spearman 等级相关:平均排名破平

Spearman Rank Correlation with Average-Rank Tie Breaking

中等面试准备Python / C++ / Rust
未尝试
coding-rank-correlation-spearman-kendall订阅锁定
Spearman 等级相关与 Kendall tau-b:copula 流水线上的双等级相关诊断

Spearman Rho and Kendall Tau-b: Dual Rank-Correlation Diagnostic for the Copula Pipeline

困难面试准备Python / C++ / Rust
未尝试
coding-rank-gauss-transform订阅锁定
横截面 alpha 因子的 RankGauss 变换

RankGauss Transform on a Cross-Section of Alpha Factors

中等面试准备Python / C++ / Rust
未尝试
coding-realized-vol-jump-test-bnsh订阅锁定
Realized-Volatility Jump Test (Barndorff-Nielsen and Shephard)

Realized-Volatility Jump Test (Barndorff-Nielsen and Shephard)

困难面试准备Python / C++ / Rust
未尝试
coding-resample-ohlc-bars订阅锁定
将逐笔成交重采样为定频 OHLC K 线

Resample Tick Prints into Fixed-Interval OHLC Bars

简单面试准备Python / C++ / Rust
未尝试
coding-reverse-stress-test-target订阅锁定
反向压力测试——求达到目标损失的冲击幅度

Reverse Stress Test — Solve for Shock Magnitude Hitting a Target Loss

中等面试准备Python / C++ / Rust
未尝试
coding-rolling-beta-strategy-vs-benchmark订阅锁定
滚动贝塔:策略对基准的窗口暴露

Rolling Beta — Strategy vs. Benchmark

中等面试准备Python / C++ / Rust
未尝试
coding-rolling-beta-vs-benchmark订阅锁定
对基准的滚动 Beta

Rolling Beta vs Benchmark

中等面试准备Python / C++ / Rust
未尝试
coding-rolling-cointegration-johansen-test订阅锁定
Rolling Engle-Granger Cointegration Test for Pairs Trading

Rolling Engle-Granger Cointegration Test for Pairs Trading

困难面试准备Python / C++ / Rust
未尝试
coding-rolling-correlation-pair订阅锁定
双序列滚动皮尔逊相关系数

Rolling Pearson Correlation Between Two Series

中等面试准备Python / C++ / Rust
未尝试
coding-rolling-max-min-gap订阅锁定
滚动极差

Rolling Max-Min Spread

中等面试准备Python / C++ / Rust
未尝试
coding-rolling-window-variance-ratio-test订阅锁定
Rolling-Window Variance Ratio Test (Lo-MacKinlay)

Rolling-Window Variance Ratio Test (Lo-MacKinlay)

困难面试准备Python / C++ / Rust
未尝试
coding-rolling-zscore-anomaly-flags订阅锁定
滚动 Z 分数异常打标

Rolling Z-Score Anomaly Flags

中等面试准备Python / C++ / Rust
未尝试
coding-semi-deviation-downside-volatility订阅锁定
围绕样本均值的收益序列半离差

Semi-Deviation of a Return Series Around the Sample Mean

中等面试准备Python / C++ / Rust
未尝试
coding-shrinkage-cov-ledoit-wolf-toy订阅锁定
Ledoit-Wolf 收缩协方差(toy 版本)

Toy Ledoit-Wolf Shrinkage Covariance

中等面试准备Python / C++ / Rust
未尝试
coding-size-factor-log-mcap订阅锁定
规模因子:负对数市值的横截面 z-score

Size Factor as Negative Log Market Cap (Cross-Sectional Z-Score)

中等面试准备Python / C++ / Rust
未尝试
coding-sortino-ratio订阅锁定
年化索提诺比率

Annualized Sortino Ratio

中等面试准备Python / C++ / Rust
未尝试
coding-spectral-risk-measure订阅锁定
谱风险度量 (Acerbi 2002)

Spectral Risk Measure (Acerbi 2002)

困难面试准备Python / C++ / Rust
未尝试
coding-stratified-sampling-mc-european订阅锁定
分层抽样蒙特卡洛:欧式看涨期权定价

European Call MC with Stratified Sampling on Terminal Z

困难面试准备Python / C++ / Rust
未尝试
coding-stress-coverage-ratio-against-capital订阅锁定
Stress Coverage Ratios Against Available Capital

Stress Coverage Ratios Against Available Capital

简单面试准备Python / C++ / Rust
未尝试
coding-stress-loss-aggregation-by-bucket订阅锁定
按桶维度聚合压力测试损失

Stress-Loss Aggregation by Bucket

简单面试准备Python / C++ / Rust
未尝试
coding-tdigest-percentile-stream订阅锁定
T-Digest 流式分位数估计器(k_1 尺度函数)

T-Digest Streaming Percentile Estimator (k_1 Scale Function)

困难面试准备Python / C++ / Rust
未尝试
coding-vasicek-mle-fit订阅锁定
Vasicek MLE Fit from a Short-Rate Series

Vasicek MLE Fit from a Short-Rate Series

中等面试准备Python / C++ / Rust
未尝试
coding-vwap-deviation-by-broker订阅锁定
VWAP Deviation by Broker

VWAP Deviation by Broker

中等面试准备Python / C++ / Rust
未尝试
coding-walk-forward-train-test-splits订阅锁定
步进式训练/测试切分(含 embargo 间隔)

Walk-Forward Train/Test Splits with Embargo

中等面试准备Python / C++ / Rust
未尝试
coding-walkforward-expanding-window-folds订阅锁定
走向前 CV:扩展窗口与滚动窗口折

Walk-forward CV: Expanding and Rolling-window Folds

中等面试准备Python / C++ / Rust
未尝试
coding-walkforward-validation-strategy订阅锁定
Walk-Forward Validation for Time-Series Backtests

Walk-Forward Validation for Time-Series Backtests

困难面试准备Python / C++ / Rust
未尝试
coding-welford-online-variance订阅锁定
Welford 在线方差

Welford's Online Variance

简单面试准备Python / C++ / Rust
未尝试
coding-winsorize-cross-sectional订阅锁定
横截面 alpha 因子值的 winsorize 截尾

Cross-Sectional Winsorization of Alpha-Factor Values

中等面试准备Python / C++ / Rust
未尝试
coding-zscore-cross-sectional订阅锁定
横截面 z-score 与可选 winsorize 截尾

Cross-Sectional Z-Score with Optional Winsorization

中等面试准备Python / C++ / Rust