indicator-series
Provides a framework for creating mathematically precise batch indicators to ensure static series accuracy.
Install
mkdir -p .claude/skills/indicator-series && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/7627" && unzip -o skill.zip -d .claude/skills/indicator-series && rm skill.zipInstalls to .claude/skills/indicator-series
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Implement Series-style batch indicators with mathematical precision. Use for new StaticSeries implementations or optimization. Series results are the canonical reference—all other styles must match exactly. Focus on cross-cutting requirements and performance optimization decisions.Key capabilities
- →Implement batch indicators
- →Optimize data series processing
- →Validate static series outputs
- →Register indicators in catalog
How it works
It provides a standardized structure for implementing indicators with mathematical precision and performance optimization.
Inputs & outputs
When to use indicator-series
- →Implementing financial batch indicators
- →Optimizing data series processing
- →Validating static series outputs
About this skill
Series indicator development
Series results are the source of truth. A BufferList or StreamHub that disagrees with Series is wrong unless the Series result is proven wrong against reference data.
Load result interface selection before writing a {Name}Result.cs record or choosing the this parameter type of To{Name}().
Per-indicator file set
Source files live in src/Indicators/{folder}/{Name}/, where {folder} is the alphabetical bucket a-b, c-d, e-j, k-q, r-s, or t-z:
| File | Contents |
|---|---|
{Name}.Series.cs | public static partial class {Name} with the To{Name}() extension |
{Name}List.cs | {Name}List BufferList class plus the To{Name}List() extension |
{Name}Hub.cs | {Name}Hub class with an internal constructor plus the To{Name}Hub() extension |
{Name}.Catalog.cs | CommonListing, SeriesListing, BufferListing, StreamListing |
{Name}Result.cs | Positional result record |
{Name}.Utilities.cs | internal static void Validate(...), any shared Increment(...) kernel, and any RemoveWarmupPeriods() overload |
I{Name}.cs | Public interface of configuration properties (LookbackPeriods, derived constants such as K); never result properties |
Add a RemoveWarmupPeriods() overload only when values keep converging after the first calculated one (see Ema.Utilities.cs) or the result is not IReusable; otherwise the generic PruningExtensions.RemoveWarmupPeriods<T>() covers it.
Tests live in tests/Library/Indicators/{folder}/{Name}/: {Name}SeriesTests.cs, {Name}BufferListTests.cs, {Name}HubTests.cs, {Name}CatalogTests.cs, {Name}RegressionTests.cs, and the {Name}.Calc.xlsx spreadsheet holding the manually calculated reference values.
Completion checklist
An indicator is complete when every item holds. Series-only indicators skip the List, Hub, and their tests, listings, and benchmarks.
- Every applicable source file in the table above exists (Series-only indicators omit
{Name}List.csand{Name}Hub.cs); the indicator-buffer and indicator-stream skills own the List and Hub specifics. -
{Name}SeriesTestsinheritsStaticSeriesTestBaseand asserts spot values from{Name}.Calc.xlsx; assert a documented value range withIsBetweenwhere the indicator has one. The testing-standards skill owns base classes, required methods, and precision constants. -
{Name}BufferListTestsand{Name}HubTestsassertIsExactlyparity with the Series output. - Catalog listings are registered in
src/Common/Catalog/Catalog.Listings.cs, the catalog shape snapshot is regenerated, and{Name}CatalogTestscovers each listing; the indicator-catalog skill owns listing rules, registration order, and the catalog shape snapshot. -
tests/Library/TestData/results/{uiid-lowercase}.standard.jsonexists, generated bydotnet run --project tools/baselining -- --indicator {UIID}. -
{Name}RegressionTestsinheritsRegressionTestBase<TResult>, carries[TestClass, TestCategory("Regression")], passes the baseline filename to the base constructor, and calls each style with the catalog default parameters, because the baseline is generated from those defaults. - Benchmarks exist in
tools/performance/Perf.Series.cs,Perf.Buffer.cs, andPerf.Stream.cs; the performance-testing skill owns their shape. -
docs/indicators/{kebab-name}.mdexists or is updated; the documentation skill owns page structure. -
docs/migration/v3.mdis updated when the indicator existed in v2 and its API or results changed.
Implementation rules
- Validate arguments first:
ArgumentNullException.ThrowIfNull(source), thenValidate(...), which throwsArgumentOutOfRangeExceptionnaming the parameter and offending value. - Calculate in
double, usedouble.NaNfor incalculable internal state, and convert with.NaN2Null()only when constructing the result. - Accept NaN inputs and let them propagate. Guard every variable denominator with
denom != 0 ? num / denom : double.NaN, comparing to exactly zero. - Keep the calculation single-pass O(n) and allocate only the result array plus minimal working buffers.
- When the List or Hub repeats the per-step math, put it in an
Increment(...)kernel in{Name}.Utilities.csand call it from every style instead of re-deriving the formula (seeEma.Increment).
When the result count equals the input count, fill a preallocated array, then copy it into the returned list:
TResult[] results = new TResult[length];
// results[i] = new TResult(...);
return new List<TResult>(results);
Benchmark this against List<T>.Add() before committing to it; some indicators, such as ADL, are faster with Add().
Reference examples
- Single value, chainable:
src/Indicators/r-s/Sma/Sma.Series.cs - Exponential smoothing with an SMA seed:
src/Indicators/e-j/Ema/Ema.Series.cs - Multi-stage from bars:
src/Indicators/a-b/Adx/Adx.Series.cs - Multi-value
ISeriesresult:src/Indicators/a-b/Alligator/Alligator.Series.cs
Do not do these
- Do not verify a formula against anything but an authoritative reference publication.
- Do not change a test's expected value or loosen its precision constant to make a failing calculation pass; fix the formula.
- Do not reject or filter NaN inputs; downstream chaining depends on propagation.
- Do not use epsilon comparisons for zero checks.
- Do not fix a BufferList or StreamHub mismatch by changing Series unless the Series value is shown wrong against
{Name}.Calc.xlsxor the reference publication.
When not to use it
- →Non-financial indicators
- →Dynamic stream-only processing
Prerequisites
Limitations
- →Requires authoritative reference
- →Strict precision requirements
How it compares
It ensures canonical accuracy across different styles (Series, BufferList, StreamHub).
Compared to similar skills
indicator-series side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| indicator-series (this skill) | 1 | 4mo | No flags | Advanced |
| streamlit | 86 | 1y | No flags | Intermediate |
| jupyter-notebook | 30 | 9mo | Review | Intermediate |
| backtesting-frameworks | 17 | 6mo | No flags | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by DaveSkender
View all by DaveSkender →You might also like
streamlit
sverzijl
When working with Streamlit web apps, data dashboards, ML/AI app UIs, interactive Python visualizations, or building data science applications with Python
jupyter-notebook
davila7
Use when the user asks to create, scaffold, or edit Jupyter notebooks (`.ipynb`) for experiments, explorations, or tutorials; prefer the bundled templates and run the helper script `new_notebook.py` to generate a clean starting notebook.
backtesting-frameworks
wshobson
Build robust backtesting systems for trading strategies with proper handling of look-ahead bias, survivorship bias, and transaction costs. Use when developing trading algorithms, validating strategies, or building backtesting infrastructure.
pdf-processing-pro
davila7
Production-ready PDF processing with forms, tables, OCR, validation, and batch operations. Use when working with complex PDF workflows in production environments, processing large volumes of PDFs, or requiring robust error handling and validation.
llava
zechenzhangAGI
Large Language and Vision Assistant. Enables visual instruction tuning and image-based conversations. Combines CLIP vision encoder with Vicuna/LLaMA language models. Supports multi-turn image chat, visual question answering, and instruction following. Use for vision-language chatbots or image understanding tasks. Best for conversational image analysis.
cocoindex
cocoindex-io
Comprehensive toolkit for developing with the CocoIndex library. Use when users need to create data transformation pipelines (flows), write custom functions, or operate flows via CLI or API. Covers building ETL workflows for AI data processing, including embedding documents into vector databases, building knowledge graphs, creating search indexes, or processing data streams with incremental updates.