Adjusted Vs Unadjusted Price Series Pitfalls logo

Adjusted Vs Unadjusted Price Series Pitfalls

Community
HimanshuJ16
adjusted-vs-unadjusted-price-series-pitfalls

Use before loading historical OHLCV into a backtest, to declare and verify the adjustment mode; separates raw, split-adjusted and total-return conventions and catches split, dividend and continuity errors in vendor adjustment factors.

Overview

PublisherHimanshuJ16
RepositoryAlgo-Trading-Skills
Skill nameadjusted-vs-unadjusted-price-series-pitfalls
Stars
50
Forks
7
Bundled files
5
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 5 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by HimanshuJ16 on GitHub. Read the source before you install it.

Installation

Install the Adjusted Vs Unadjusted Price Series Pitfalls AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/HimanshuJ16/Algo-Trading-Skills/tree/main/skills/adjusted-vs-unadjusted-price-series-pitfalls
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

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
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Adjusted Vs Unadjusted Price Series Pitfalls in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Adjusted Vs Unadjusted Price Series Pitfalls on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Adjusted Vs Unadjusted Price Series Pitfalls is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Adjusted Vs Unadjusted Price Series Pitfalls AI skill do?

Use before loading historical OHLCV into a backtest, to declare and verify the adjustment mode; separates raw, split-adjusted and total-return conventions and catches split, dividend and continuity errors in vendor adjustment factors.

Why use Adjusted Vs Unadjusted Price Series Pitfalls on TypingMind?

Because you install it once and use it with any model. Adjusted Vs Unadjusted Price Series Pitfalls is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Adjusted Vs Unadjusted Price Series Pitfalls in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/HimanshuJ16/Algo-Trading-Skills/tree/main/skills/adjusted-vs-unadjusted-price-series-pitfalls. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Adjusted Vs Unadjusted Price Series Pitfalls?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Adjusted Vs Unadjusted Price Series Pitfalls?

As many as you like. As long as a model supports skills, you can use Adjusted Vs Unadjusted Price Series Pitfalls with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Adjusted Vs Unadjusted Price Series Pitfalls AI skill free?

Yes. It is published on GitHub by HimanshuJ16 under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇