CODING CHALLENGES

代码题库

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

继续刷题

题目列表

显示 69 / 646 道可提交题。 当前筛选:标签:Factor

提交状态:未尝试未正确已正确
未尝试
coding-alpha-blending-shrinkage订阅锁定
两路 alpha 的收缩融合并 z-score 标准化

Shrinkage Blend of Two Alpha Sources with Z-Score Normalization

中等面试准备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-asset-beta-to-benchmark-portfolio订阅锁定
资产对基准组合的逐资产 Beta

Per-Asset Beta to a Benchmark Portfolio

中等面试准备Python / C++ / Rust
未尝试
coding-composite-factor-icir-weighted订阅锁定
基于 IC-IR 的三因子复合加权

IC-IR-Weighted Composite of Three Sub-Factors

中等面试准备Python / C++ / Rust
未尝试中等面试准备Python / C++ / Rust
未尝试
coding-correlation-cluster-count可练习
因子聚簇计数:阈值化相关性图的连通分量数

Factor Cluster Count: Connected Components on a Thresholded Correlation Graph

中等免费版Python / C++ / Rust
未尝试
coding-cross-sectional-demean订阅锁定
横截面 alpha 因子的去均值

Cross-Sectional Demean of an Alpha Factor

中等面试准备Python / C++ / Rust
未尝试
coding-cross-sectional-rank-percentile订阅锁定
横截面 alpha 因子的排名分位数变换

Rank-to-Percentile Transform on a Cross-Section of Alpha Factors

中等面试准备Python / C++ / Rust
未尝试
coding-currency-arbitrage-cycle-detection可练习
货币套利环检测(对数汇率上的 Bellman-Ford)

Currency Arbitrage Cycle Detection (Bellman-Ford on Log Rates)

中等免费版Python / C++ / Rust
未尝试
coding-decile-spread-return订阅锁定
横截面十分位多空价差收益:跨期平均

Decile-Spread Forward Return Averaged Across Dates

中等面试准备Python / C++ / Rust
未尝试
coding-dense-rank-trade-sizes可练习
给当日成交按所属买卖方向做 dense rank 标注

Per-Side Dense-Rank Annotation for the Day's Blotter

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

Excess Returns Over a Benchmark

中等面试准备Python / C++ / Rust
未尝试
coding-factor-dependency-topo-order可练习
因子依赖拓扑序:夜间重建的确定性 min-heap Kahn 调度

Factor Dependency Topo Order: Deterministic Min-Heap Kahn for Nightly Rebuild

中等免费版Python / C++ / Rust
未尝试
coding-graph-count-connected-components-bfs可练习
Count Connected Components in an Undirected Graph

Count Connected Components in an Undirected Graph

简单免费版Python / C++ / Rust
未尝试
coding-graph-cycle-detect-undirected可练习
判断无向图是否存在环

Detect a Cycle in an Undirected Graph

简单免费版Python / C++ / Rust
未尝试
coding-groupby-mean-by-key订阅锁定
按 key 分组求均值,并附最小样本数门控

Groupby-Mean by Key with a Min-Count Gate

中等面试准备Python / C++ / Rust
未尝试
coding-ic-weighted-signal-combine订阅锁定
基于 IC 的因子信号加权组合

IC-Weighted Alpha Signal Combination

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

Idiosyncratic Volatility Factor — Rolling Residual Std After Market Beta

中等面试准备Python / C++ / Rust
未尝试
coding-incremental-largest-component-size可练习
增量最大聚簇规模:因子对边事件流上的流式并查集

Incremental Largest Cluster Size: Streaming Union-Find on a Factor-Pair Edge Tape

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

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

中等面试准备Python / C++ / Rust
未尝试
coding-largest-correlation-cluster-size可练习
最大因子聚簇规模:阈值化相关性图的最大连通分量大小

Largest Factor Cluster Size: Maximum Connected Component on a Thresholded Correlation Graph

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

Look-Ahead Bias Detector via Lagged-Correlation Comparison

中等面试准备Python / C++ / Rust
未尝试
coding-mad-zscore-cross-section订阅锁定
基于中位数和 MAD 的稳健横截面 z-score

Robust Cross-Sectional Z-Score via Median and MAD

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

Mean-Reversion Factor — Residualized Last-K Return

中等面试准备Python / C++ / Rust
未尝试
coding-min-hops-to-core-factor-set可练习
到核心因子集合的最少跳数:因子相似图上的多源 BFS

Min Hops to Core Factor Set: Multi-Source BFS on a Factor-Similarity Graph

中等免费版Python / C++ / Rust
未尝试
coding-min-knight-moves-bfs-grid可练习
马的最少步数 — 无限棋盘上的 BFS

Minimum Knight Moves — BFS on an Infinite Board

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

Rank Features by Histogram-Estimated Mutual Information with the Target

困难面试准备Python / C++ / Rust
未尝试
coding-neutralize-by-group订阅锁定
按行业标签做分组中性化

Group-Neutralize a Factor by Sector Tag

中等面试准备Python / C++ / Rust
未尝试
coding-orthogonalize-signals-gs订阅锁定
按优先序对 alpha 信号做经典 Gram-Schmidt 正交化

Classical Gram-Schmidt Orthogonalization of Priority-Ordered Alpha Signals

中等面试准备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-pead-earnings-drift订阅锁定
财报公告后漂移信号:D+1 至 D+60 累计超额收益

Post-Earnings Announcement Drift Signal (D+1 to D+60 Excess Return)

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

Percent-Change from a Configurable Base

中等面试准备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-quintile-bucket-by-factor订阅锁定
横截面因子的五分位(k 分位)分桶

Quintile (k-tile) Bucketing of a Cross-Sectional Factor

中等面试准备Python / C++ / Rust
未尝试
coding-rank-average-signal-combine订阅锁定
多因子信号的排名平均合成

Rank-Average Multi-Factor Signal Combination

中等面试准备Python / C++ / Rust
未尝试
coding-rank-bucket-decile订阅锁定
横截面排名分桶:按序数排名(首现破平)映射到十分位

Cross-Sectional Rank Bucketing into Deciles with Ordinal Tie-Breaks

中等面试准备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-rank-inversion-count可练习
排名失配对数:期望榜单与实测榜单的两两逆序对计数

Rank-Disagreement Count: Pairwise Inversions Between Expected and Realized Strategy Rankings

中等免费版Python / C++ / Rust
未尝试
coding-rebalance-on-signal-change订阅锁定
按整数桶变化触发再平衡的低换手回测

Turnover-Aware Rebalance on Bucketed-Signal Change

中等面试准备Python / C++ / Rust
未尝试
coding-regime-transition-path-count可练习
状态机转移路径计数:可分辨催化剂下的 DAG 取模游走枚举

Regime Transition Path Count: Modular DAG Walk Enumeration with Distinguishable Catalysts

中等免费版Python / C++ / Rust
未尝试
coding-resample-ohlc-bars订阅锁定
将逐笔成交重采样为定频 OHLC K 线

Resample Tick Prints into Fixed-Interval OHLC Bars

简单面试准备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-zscore-anomaly-flags订阅锁定
滚动 Z 分数异常打标

Rolling Z-Score Anomaly Flags

中等面试准备Python / C++ / Rust
未尝试
coding-rotting-oranges-bfs可练习
烂橘子蔓延 — 多源 BFS

Rotting Oranges — Multi-Source BFS

简单免费版Python / C++ / Rust
未尝试
coding-sector-day-return-rect-queries可练习
行业-交易日 收益方块:矩形区间求和的批量查询

Sector-Day Return Cube: Batched Rectangular Range Sums

中等免费版Python / C++ / Rust
未尝试
coding-sector-neutralize-factor订阅锁定
横截面 alpha 因子的板块中性化

Sector-Neutralize an Alpha Factor Cross-Section

中等面试准备Python / C++ / Rust
未尝试
coding-shortest-fee-path-routing-graph可练习
路由图上的最短跳数路径

Shortest Hop Path on a Routing Graph

简单免费版Python / C++ / Rust
未尝试
coding-shrinkage-cov-ledoit-wolf-toy订阅锁定
Ledoit-Wolf 收缩协方差(toy 版本)

Toy Ledoit-Wolf Shrinkage Covariance

中等面试准备Python / C++ / Rust
未尝试
coding-signal-decay-blend-multi-horizon订阅锁定
多周期信号的带时间衰减混合

Multi-Horizon Signal Blend with Time Decay

中等面试准备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-strategy-rank-by-sharpe-then-id可练习
策略排行榜:按 Sharpe 取前 K,同分按 strategy_id 字典序

Strategy Leaderboard: Top-K by Sharpe with Lexicographic Tie-Break

中等免费版Python / C++ / Rust
未尝试
coding-survivorship-aware-universe订阅锁定
考虑幸存者偏差的当日可交易股票池

Survivorship-Aware Tradeable Universe on a Date

中等面试准备Python / C++ / Rust
未尝试
coding-systematic-vs-idiosyncratic-variance-decomposition订阅锁定
系统性与特异性方差分解(因子模型)

Systematic-vs-Idiosyncratic Variance Decomposition (Factor Model)

中等面试准备Python / C++ / Rust
未尝试
coding-topk-bottomk-portfolio订阅锁定
多最强 K / 空最弱 K 等权组合

Equal-Weight Long-Top-K / Short-Bottom-K Portfolio

中等面试准备Python / C++ / Rust
未尝试
coding-trade-graph-connected-components可练习
共同成交图:基于成交对的连通分量

Co-Trading Graph — Connected Components of Session Trade Pairs

中等免费版Python / C++ / Rust
未尝试
coding-trailing-high-watermark-span可练习
跟踪最高水位 span:每个 tick 的连续不超过当前价的回看长度

Trailing High-Watermark Span: Per-Tick Consolidation Length on a Synthetic Tape

中等免费版Python / C++ / Rust
未尝试
coding-trailing-momentum-factor订阅锁定
滚动 12-1 动量因子(跳过最近一段)

Trailing 12-1 Momentum Factor (Skip Last Month)

中等面试准备Python / C++ / Rust
未尝试
coding-transaction-cost-aware-target订阅锁定
考虑交易成本的目标权重求解

Transaction-Cost-Aware Target Weights from Alpha Signal

中等面试准备Python / C++ / Rust
未尝试
coding-vectorized-pnl-with-costs订阅锁定
含交易成本的向量化逐期 PnL

Vectorized Per-Period PnL with Transaction Costs

中等面试准备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