Adjusted Vs Unadjusted Price Series Pitfallsのロゴ

Adjusted Vs Unadjusted Price Series Pitfalls

コミュニティ
HimanshuJ16
adjusted-vs-unadjusted-price-series-pitfalls

過去のOHLCVデータをバックテストに読み込む前に使い、調整モードを宣言して検証します。未調整、株式分割調整後、トータルリターンの各方式を区別し、ベンダーの調整係数における分割、配当、連続性の誤りを検出します。

Add to TypingMind

概要

公開者HimanshuJ16
リポジトリAlgo-Trading-Skills
スキル名adjusted-vs-unadjusted-price-series-pitfalls
スター
50
フォーク
7
同梱ファイル
5
ライセンスApache-2.0
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 5個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    HimanshuJ16がGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Adjusted Vs Unadjusted Price Series Pitfalls」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/HimanshuJ16/Algo-Trading-Skills/tree/main/skills/adjusted-vs-unadjusted-price-series-pitfalls
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/HimanshuJ16/Algo-Trading-Skills.git /tmp/Algo-Trading-Skills
mkdir -p .claude/skills
cp -r /tmp/Algo-Trading-Skills/skills/adjusted-vs-unadjusted-price-series-pitfalls .claude/skills/adjusted-vs-unadjusted-price-series-pitfalls
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでAdjusted Vs Unadjusted Price Series Pitfallsを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にAdjusted Vs Unadjusted Price Series Pitfallsを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Adjusted Vs Unadjusted Price Series Pitfallsは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

When to Use

Invoke this skill before loading historical OHLCV data into a backtest when corporate actions, vendor adjustment factors, or mixed price-series conventions may affect signals, returns, liquidity, or universe comparisons.

Declare the intended SeriesAdjustmentMode explicitly:

  • UNADJUSTED: historical prices retain split and cash-dividend ex-date moves; model splits and dividends separately.
  • SPLIT_ADJUSTED: split history is normalized, while cash dividends remain explicit events unless the vendor contract says otherwise.
  • TOTAL_RETURN_ADJUSTED: split and dividend effects are embedded for return analysis; validate the factor methodology and point-in-time availability.
  • UNKNOWN: audit continuity and actions, but do not infer provenance merely because no discontinuity is found.

When NOT to Use

  • Do not infer vendor adjustment provenance from a smooth series alone; continuity is not evidence of correct adjustment factors.
  • Do not treat every ex-dividend price drop as look-ahead bias. A raw price series can legitimately drop by the cash dividend amount; the portfolio must separately receive the dividend.
  • Do not use a price-only audit to satisfy point-in-time or vendor-revision requirements. Those require as-of corporate-action snapshots and adjustment-factor history.
  • Do not apply split adjustment to data already adjusted by the vendor without recording the factor source and convention.
  • Do not use adjusted close as a substitute for executable OHLC, intraday prices, quotes, or volume without validating the vendor's field definitions.

Prerequisites

  • Historical dates, closes, volumes, and preferably actual next-session opens.
  • Corporate-action records with ISO dates, action type, and ratio convention: SPLIT ratio is post-split shares per pre-split share; DIVIDEND ratio is cash per share.
  • A declared SeriesAdjustmentMode and documented vendor/factor provenance.
  • A point-in-time policy for when corporate actions and adjustment factors become available to the backtest.
  • A tolerance policy for price, volume, and notional reconciliation.

Workflow

  1. Declare semantics: Select UNADJUSTED, SPLIT_ADJUSTED, TOTAL_RETURN_ADJUSTED, or UNKNOWN before auditing. Do not let the auditor guess the series mode.
  2. Validate inputs: Confirm strictly increasing ISO dates, aligned lengths, finite positive prices, non-negative volumes, and valid corporate-action records.
  3. Scan the correct boundary: Provide opens so discontinuities are measured from prior close to next open. If opens are unavailable, the auditor falls back to the next close, logs a warning, and records boundary_source="PRIOR_CLOSE_FALLBACK" on the report. Treat any audit carrying that value as provisional.
  4. Match actions: The auditor builds one composite expected price ratio per ex-date — split factors (1 / ratio) multiplied together and multiplied by the cash factor (prev_close - total_dividend) / prev_close — and compares it with the observed ratio using price_match_tolerance_pct (default 5%). Volume scaling is compared separately against the split ratio using volume_ratio_tolerance_pct (default 25%). Keep these two tolerances distinct: the ex-date price factor is mechanical, traded volume is not.
  5. Interpret the report:
    • is_consistent means no detected discontinuity, not that adjustment provenance is proven.
    • unexplained_discontinuities identifies jumps not explained by the declared mode and known actions.
    • expected_price_ratio on each event exposes the composite factor the jump was tested against; None means no expectation could be formed.
    • detected_adjustment_type reports only what the jumps prove: a matched split jump gives UNADJUSTED, a matched cash-dividend jump only gives NOT_TOTAL_RETURN_ADJUSTED (raw and split-adjusted remain indistinguishable), and no matched evidence gives UNKNOWN.
    • has_look_ahead_bias_risk is raised for dividend discontinuities that conflict with TOTAL_RETURN_ADJUSTED; point-in-time availability still requires an external audit.
  6. Transform only with provenance: Use apply_split_adjustment for a documented split ratio and index convention. It adjusts prices before the split by dividing by the ratio and volumes by multiplying by the ratio, without lossy rounding.
  7. Validate the universe: Run validate_universe_consistency and reject mixed declared series modes or incompatible detected types before calculating cross-asset signals.
  8. Persist evidence: Store raw data identifiers, action records, series mode, factor source/version, as-of timestamp, tolerance settings, audit report, and transformation parameters.

Common Pitfalls

  • Close-to-close substitution: Using a close value while labeling it next_open can miss overnight gaps and misclassify actions.
  • Dividend semantic collapse: Cash dividends, split-adjusted prices, and total-return prices answer different research questions.
  • Ratio convention mismatch: A 2.0 split means two post-split shares per old share; a 0.5 reverse split doubles historical prices under backward adjustment.
  • Lossy rounding: Rounding every adjusted bar to four decimals can accumulate tracking error in long histories and volume-weighted calculations.
  • Multiple same-day actions: A split and dividend can share an ex-date. Testing the jump against either action alone is wrong — the factors multiply, so a 2-for-1 split plus a $10 dividend on a $100 close expects 0.5 * 0.9 = 0.45, not 0.5. Same-date cash dividends are summed before the cash factor is formed.
  • Tolerance conflation: A loose volume tolerance applied to the price ratio silently explains away real data errors. At a 25% price tolerance a 42% overnight crash "matches" a 2-for-1 split; keep the price tolerance tight and reconcile against vendor factors rather than widening it.
  • False provenance: No detected jump does not prove a series is adjusted, correctly adjusted, or point-in-time safe.

Verification

Run the focused tests:

text
python -m unittest discover -s skills/adjusted-vs-unadjusted-price-series-pitfalls/scripts

The tests cover split and dividend semantics, close/open detection and boundary provenance, composite same-ex-date factors, price-match tolerance behavior, total-return risk, no-jump ambiguity, provenance inference limits, forward and reverse splits, precision, ISO date canonicalization, invalid inputs, and universe-mode consistency. Production sign-off additionally requires replaying vendor factors and comparing raw versus transformed price, volume, dividend, and total-return ledgers.

Related Skills

  • backtest-determinism-and-reproducibility
  • corporate-action-adjusted-backtesting

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Adjusted Vs Unadjusted Price Series Pitfalls」では何ができますか?

過去のOHLCVデータをバックテストに読み込む前に使い、調整モードを宣言して検証します。未調整、株式分割調整後、トータルリターンの各方式を区別し、ベンダーの調整係数における分割、配当、連続性の誤りを検出します。

TypingMindでAdjusted Vs Unadjusted Price Series Pitfallsを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Adjusted Vs Unadjusted Price Series Pitfallsはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにAdjusted Vs Unadjusted Price Series Pitfallsをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/HimanshuJ16/Algo-Trading-Skills/tree/main/skills/adjusted-vs-unadjusted-price-series-pitfallsを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Adjusted Vs Unadjusted Price Series Pitfallsを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Adjusted Vs Unadjusted Price Series Pitfallsで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもAdjusted Vs Unadjusted Price Series Pitfallsを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Adjusted Vs Unadjusted Price Series Pitfalls」は無料ですか?

はい。HimanshuJ16がApache-2.0ライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇