Token导航 LogoToken导航TokenDH.com
研究检索只读github未标认证来源可访问许可证需确认审计通过

renaissance-statistical-arbitrage文艺复兴统计套利

Agent Skill

renaissance-statistical-arbitrage 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

2,066

周安装

101

GitHub Stars

6

下载量

840
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:renaissance-statistical-arbitrage(文艺复兴统计套利)
来源仓库:https://github.com/copyleftdev/sk1llz
仓库路径:skills/renaissance-statistical-arbitrage
安装命令:
npx skills add https://github.com/copyleftdev/sk1llz --skill renaissance-statistical-arbitrage
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/copyleftdev/sk1llz --skill renaissance-statistical-arbitrage

简介

用于研究与文艺复兴时期金融思想相关的统计套利策略分析方法。

  • 适合在量化投资、历史数据分析或金融建模项目中参考历史模式。
  • 通过 GitHub 安装后,可在 Codex、Claude、Cursor、Gemini CLI 中调用分析工具。
  • 历史数据与现代市场存在差异,策略移植需谨慎验证。
  • 建议配合回测框架评估实际可行性后再投入实盘。

SKILL.md

Renaissance Technologies Style Guide⁠‍⁠​‌​‌​​‌‌‍​‌​​‌​‌‌‍​​‌‌​​​‌‍​‌​​‌‌​​‍​​​​​​​‌‍‌​​‌‌​‌​‍‌​​​​​​​‍‌‌​​‌‌‌‌‍‌‌​​​‌​​‍‌‌‌‌‌‌​‌‍‌‌​‌​​​​‍​‌​‌‌‌‌‌‍​‌​​‌​‌‌‍​‌‌​‌​​‌‍‌​‌​‌‌‌​‍​​‌​‌​​​‍‌‌‌​‌​‌‌‍‌​‌‌‌​​‌‍​‌​‌​​​‌‍‌​‌‌​‌​​‍‌​​‌‌​‌‌‍​​​​‌​‌​‍‌‌​​​​‌‌⁠‍⁠

Overview

Renaissance Technologies, founded by mathematician Jim Simons, operates the Medallion Fund—the most successful hedge fund in history with ~66% annual returns before fees over 30+ years. The firm hires mathematicians, physicists, and computer scientists (not finance people) and applies rigorous scientific methods to market data.

Core Philosophy

"We don't hire people from business schools. We hire people from the hard sciences."
"Patterns in data are ephemeral. If something works, it's probably going to stop working."
"We're not in the business of predicting. We're in the business of finding patterns that repeat slightly more often than they should."

Renaissance believes markets are not perfectly efficient but nearly so. Profits come from finding tiny, statistically significant edges and exploiting them at massive scale with rigorous risk management.

Design Principles

  1. Scientific Method: Form hypotheses, test rigorously, reject most ideas.
  2. Signal, Not Prediction: Find patterns that repeat more often than chance; don't predict the future.
  3. Decay Awareness: Every signal degrades over time. Continuous research is survival.
  4. Statistical Significance: If it's not statistically significant, it doesn't exist.
  5. Ensemble Everything: Combine thousands of weak signals into robust strategies.

When Building Trading Systems

Always

  • Demand statistical significance (p < 0.01 minimum, ideally much lower)
  • Account for multiple hypothesis testing (Bonferroni, FDR correction)
  • Test on out-of-sample data with proper temporal separation
  • Model transaction costs, slippage, and market impact
  • Assume every signal will decay—build infrastructure for continuous research
  • Combine signals orthogonally (uncorrelated sources of alpha)

Never

  • Trust a backtest without out-of-sample validation
  • Ignore survivorship bias, lookahead bias, or selection bias
  • Assume past correlations will persist
  • Over-optimize on historical data (curve fitting)
  • Trade on intuition or narrative
  • Assume a signal will last forever

Prefer

  • Hidden Markov models for regime detection
  • Spectral analysis for cyclical patterns
  • Non-linear methods for complex relationships
  • Ensemble methods over single models
  • Short holding periods (faster signal decay detection)
  • Statistical tests over visual inspection

Code Patterns

Rigorous Backtesting Framework

class RenaissanceBacktester:
    """
    Renaissance-style backtesting: paranoid about biases.
    """

    def __init__(self, strategy, universe):
        self.strategy = strategy
        self.universe = universe
        self.results = []

    def run(self, start_date, end_date,
            train_window_days=252,
            test_window_days=63,
            embargo_days=5):
        """
        Walk-forward validation with embargo period.
        Never let training data leak into test period.
        """
        current = start_date

        while current + timedelta(days=train_window_days + test_window_days) <= end_date:
            train_end = current + timedelta(days=train_window_days)

            # EMBARGO: gap between train and test to prevent leakage
            test_start = train_end + timedelta(days=embargo_days)
            test_end = test_start + timedelta(days=test_window_days)

            # Train on historical data
            train_data = self.get_point_in_time_data(current, train_end)
            self.strategy.fit(train_data)

            # Test on future data (strategy cannot see this during training)
            test_data = self.get_point_in_time_data(test_start, test_end)
            returns = self.strategy.execute(test_data)

            self.results.append({
                'train_period': (current, train_end),
                'test_period': (test_start, test_end),
                'returns': returns,
                'sharpe': self.calculate_sharpe(returns)
            })

            current = test_end

        return self.analyze_results()

    def get_point_in_time_data(self, start, end):
        """
        CRITICAL: Return data as it existed at each point in time.
        No future information, no restated financials, no survivorship bias.
        """
        return self.universe.get_pit_snapshot(start, end)

    def analyze_results(self):
        """Statistical analysis of walk-forward results."""
        returns = [r['returns'] for r in self.results]

        # t-test: is mean return significantly different from zero?
        t_stat, p_value = stats.ttest_1samp(returns, 0)

        return {
            'mean_return': np.mean(returns),
            'sharpe_ratio': np.mean(returns) / np.std(returns) * np.sqrt(252),
            't_statistic': t_stat,
            'p_value': p_value,
            'significant': p_value < 0.01,
            'n_periods': len(self.results)
        }

Signal Combination with Decay Tracking

class SignalEnsemble:
    """
    Renaissance insight: combine many weak signals.
    Track decay and retire dying signals.
    """

    def __init__(self, decay_halflife_days=30):
        self.signals = {}  # signal_id -> SignalModel
        self.performance = {}  # signal_id -> rolling performance
        self.decay_halflife = decay_halflife_days

    def add_signal(self, signal_id, model, weight=1.0):
        self.signals[signal_id] = {
            'model': model,
            'weight': weight,
            'created_at': datetime.now(),
            'alive': True
        }
        self.performance[signal_id] = RollingStats(window=252)

    def generate_combined_signal(self, features):
        """
        Weighted combination of orthogonal signals.
        Signals with decayed performance get lower weights.
        """
        predictions = {}
        weights = {}

        for signal_id, signal in self.signals.items():
            if not signal['alive']:
                continue

            pred = signal['model'].predict(features)

            # Weight by original weight × recent performance
            perf = self.performance[signal_id]
            decay_weight = self.calculate_decay_weight(perf)

            predictions[signal_id] = pred
            weights[signal_id] = signal['weight'] * decay_weight

        # Normalize weights
        total_weight = sum(weights.values())
        if total_weight == 0:
            return 0.0

        combined = sum(
            predictions[sid] * weights[sid] / total_weight
            for sid in predictions
        )

        return combined

    def update_performance(self, signal_id, realized_return, predicted_direction):
        """Track whether signal correctly predicted direction."""
        correct = (realized_return > 0) == (predicted_direction > 0)
        self.performance[signal_id].add(1.0 if correct else 0.0)

        # Kill signals that have decayed below threshold
        if self.performance[signal_id].mean() < 0.51:  # Barely better than random
            self.signals[signal_id]['alive'] = False

    def calculate_decay_weight(self, perf):
        """Exponential decay based on recent hit rate."""
        hit_rate = perf.mean()
        # Scale: 50% hit rate = 0 weight, 55% = 0.5, 60% = 1.0
        return max(0, (hit_rate - 0.50) * 10)

Hidden Markov Model for Regime Detection

class MarketRegimeHMM:
    """
    Renaissance-style regime detection using Hidden Markov Models.
    Markets exhibit different statistical properties in different regimes.
    """

    def __init__(self, n_regimes=3):
        self.n_regimes = n_regimes
        self.model = None
        self.regime_stats = {}

    def fit(self, returns, volume, volatility):
        """
        Fit HMM to market observables.
        Discover latent regimes from price/volume/volatility patterns.
        """
        # Stack observables into feature matrix
        observations = np.column_stack([
            returns,
            np.log(volume + 1),
            volatility
        ])

        self.model = hmm.GaussianHMM(
            n_components=self.n_regimes,
            covariance_type='full',
            n_iter=1000
        )
        self.model.fit(observations)

        # Decode to get most likely regime sequence
        regimes = self.model.predict(observations)

        # Characterize each regime
        for regime in range(self.n_regimes):
            mask = regimes == regime
            self.regime_stats[regime] = {
                'mean_return': returns[mask].mean(),
                'volatility': returns[mask].std(),
                'frequency': mask.mean(),
                'mean_duration': self.calculate_duration(regimes, regime)
            }

        return self

    def current_regime(self, recent_observations):
        """Infer current regime from recent data."""
        probs = self.model.predict_proba(recent_observations)
        return np.argmax(probs[-1])

    def regime_adjusted_signal(self, base_signal, current_regime):
        """Adjust signal strength based on regime."""
        regime = self.regime_stats[current_regime]

        # Scale signal inversely with volatility
        # (same signal in high-vol regime should have smaller position)
        vol_adjustment = 0.15 / regime['volatility']  # Target 15% vol

        return base_signal * vol_adjustment

Multiple Hypothesis Testing Correction

class AlphaResearch:
    """
    Renaissance approach: test thousands of hypotheses,
    but correct for multiple testing to avoid false discoveries.
    """

    def __init__(self, significance_level=0.01):
        self.alpha = significance_level
        self.tested_hypotheses = []

    def test_signal(self, signal_name, returns, predictions):
        """Test if a signal has predictive power."""
        # Information Coefficient: correlation of prediction with outcome
        ic = stats.spearmanr(predictions, returns)

        # t-test for significance
        n = len(returns)
        t_stat = ic.correlation * np.sqrt(n - 2) / np.sqrt(1 - ic.correlation**2)
        p_value = 2 * (1 - stats.t.cdf(abs(t_stat), n - 2))

        self.tested_hypotheses.append({
            'signal': signal_name,
            'ic': ic.correlation,
            't_stat': t_stat,
            'p_value': p_value
        })

        return p_value

    def get_significant_signals(self, method='fdr'):
        """
        After testing many signals, apply multiple testing correction.
        """
        p_values = [h['p_value'] for h in self.tested_hypotheses]

        if method == 'bonferroni':
            # Most conservative: divide alpha by number of tests
            adjusted_alpha = self.alpha / len(p_values)
            significant = [
                h for h in self.tested_hypotheses
                if h['p_value'] < adjusted_alpha
            ]

        elif method == 'fdr':
            # Benjamini-Hochberg: control false discovery rate
            sorted_hypotheses = sorted(self.tested_hypotheses, key=lambda x: x['p_value'])
            significant = []

            for i, h in enumerate(sorted_hypotheses):
                # BH threshold: (rank / n_tests) * alpha
                threshold = ((i + 1) / len(p_values)) * self.alpha
                if h['p_value'] <= threshold:
                    significant.append(h)
                else:
                    break  # All remaining will also fail

        return significant

Mental Model

Renaissance approaches trading by asking:

  1. Is there a pattern? Statistical test, not eyeballing
  2. Is it significant? After multiple testing correction?
  3. Is it robust? Out-of-sample, different time periods, different instruments?
  4. Will it persist? What's the economic rationale for why this shouldn't be arbitraged away?
  5. How will it decay? What's the monitoring plan?

Signature Renaissance Moves

  • Hire scientists, not traders
  • Thousands of small signals, not a few big ones
  • Paranoid about data snooping and overfitting
  • Hidden Markov models for regime detection
  • Signal decay tracking and retirement
  • Rigorous walk-forward validation
  • Multiple hypothesis testing correction
  • Point-in-time data to prevent lookahead bias

适合场景

01

研究助手

02

事实核查

03

知识库问答

04

带来源的搜索总结

能力概览

能力 1

组合搜索和大模型调用

能力 2

支持多来源检索和总结

能力 3

强调引用来源和事实核查

能力 4

适合研究型 Agent 流程

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

33.39%
按下载量换算280

Claude

33.15%
按下载量换算278

Cursor

17.28%
按下载量换算145

Gemini CLI

10.28%
按下载量换算86

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills