Logo van Cost Monitoring For Cloud Trading Infrastructure

Cost Monitoring For Cloud Trading Infrastructure

Community
HimanshuJ16
cost-monitoring-for-cloud-trading-infrastructure

Gebruik dit wanneer je een alarm voor pieken en inzicht in de eenheidseconomie nodig hebt voor cloudkosten van compute, egress en marktdata. De skill berekent rollende z-score-baselines op basis van de telemetrie die je aanlevert en rapporteert alleen; er wordt niets beëindigd.

Add to TypingMind

Overzicht

UitgeverHimanshuJ16
RepositoryAlgo-Trading-Skills
Skillnaamcost-monitoring-for-cloud-trading-infrastructure
Sterren
50
Forks
7
Meegeleverde bestanden
5
LicentieApache-2.0
Links
  • Instructies in Markdown

    Het model laadt het bestand SKILL.md alleen als dat nodig is. Dat kost dus alleen tokens als een verzoek daadwerkelijk bij de skill past.

  • Werkt met elk LLM

    AI-skills bestaan uit instructies in gewone Markdown, niet uit aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • Meegeleverde bestanden: 5

    Scripts, sjablonen en referentiemateriaal die het model tijdens het werken kan lezen. De bestanden kunnen alleen worden gelezen en worden nooit uitgevoerd.

  • Open source

    Gepubliceerd door HimanshuJ16 op GitHub. Bekijk de bronbestanden voordat je de skill installeert.

Installatie

Installeer de AI-skill Cost Monitoring For Cloud Trading Infrastructure in TypingMind om deze met elk LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map. De app leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/HimanshuJ16/Algo-Trading-Skills/tree/main/skills/cost-monitoring-for-cloud-trading-infrastructure
  4. Schakel de skill in voor elke chat waarin je de skill wilt kunnen gebruiken.
Plug-ins → Skills → Skill toevoegen → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

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/cost-monitoring-for-cloud-trading-infrastructure .claude/skills/cost-monitoring-for-cloud-trading-infrastructure
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Cost Monitoring For Cloud Trading Infrastructure in voor een chat naar keuze in TypingMind en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek bij de skill past, laadt het model zelf de volledige instructies. Je hoeft de skill nooit handmatig aan te roepen. Pas als het model de skill daadwerkelijk gebruikt, kost dat tokens.

Het model laadt Cost Monitoring For Cloud Trading Infrastructure automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Cost Monitoring For Cloud Trading Infrastructure niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

When to Use

Use this skill in cloud-hosted quantitative trading architectures (AWS, GCP, Azure) to monitor infrastructure costs (Compute, Data Egress, Market Data Feeds, Databases) and detect unexpected spend anomalies. Runaway backtesting jobs, un-throttled market data streaming across Availability Zones (cross-AZ egress tax), or idle GPU instances can cause cloud bills to surge tenfold. This module calculates rolling baseline statistics and uses $Z$-score thresholds to flag cost anomalies.

When NOT to Use

  • You need real-time enforcement (budget kill switches, instance termination). This module classifies and reports on telemetry it is given; it does not connect to cloud APIs or actuate anything.
  • You need vendor-native anomaly detection. AWS Cost Anomaly Detection / GCP budget alerts already cover single-account baselines — use this when you need cross-cloud, trading-volume-normalized, environment-scoped analysis in your own pipeline.
  • You need to detect spend collapsing. The gates are one-sided: only positive deviations escalate. A market-data subscription that lapses or a feed handler that dies — spend dropping to $0 — reports NORMAL. Detect that with liveness monitoring, not this module.
  • You are forecasting or optimizing spend. Baseline statistics here are for spike detection, not capacity planning or rightsizing analysis.

Prerequisites

  • Daily or hourly cloud cost telemetry records categorized by service, category (Compute, Storage, NetworkEgress), and environment.
  • Baseline historical period (e.g. 14 days of spend history) for the same service AND environment as the record being analyzed.
  • The caller windows the history. analyze_service_cost filters by (service, environment) but does not sort by timestamp, deduplicate, or truncate — pass exactly the records that belong in the rolling window. Handing a year of history to a "14-day rolling baseline" silently widens it.

Workflow

  1. Telemetry Ingestion: Ingest cost records ($C_{t, \text{service}}$) and trading volume metrics ($V_t$). Costs may be negative (credits/refunds) but non-finite telemetry values are rejected — a NaN would otherwise make every threshold comparison False and silently classify the day as NORMAL.
  2. Rolling Baseline Calculation (scoped to service + environment — never mix PROD and DEV spend for the same service):
    • Compute rolling mean $\mu$ and population standard deviation $\sigma$ over baseline window $W$.
    • If $\sigma \approx 0$ (flat spend, e.g. reserved capacity), the Z-score degenerates to the absolute dollar deviation from the mean.
  3. Anomaly & Spike Audit:
    • Compute $Z$-score: $Z_t = \frac{C_t - \mu}{\sigma}$ (severity decisions use the unrounded value).
    • Flag CRITICAL if $Z_t \ge 3.0$ AND percentage increase vs mean $> 30%$ — the dual gate keeps a $2 deviation on a large flat baseline from paging anyone.
    • Flag WARNING if $Z_t \ge 2.0$ and the deviation is material. On a flat baseline the "Z" is a dollar deviation, so it is scale-dependent: +$3 on a $100,000/day reserved-capacity baseline reaches $Z = 3.0$ at +0.003%. A flat_baseline_min_pct_change floor (default 1%, constructor-tunable) gates WARNING in the flat case only — a small percentage move on a genuinely varying baseline can still be a real outlier and is never suppressed.
    • If no baseline history exists for the service+environment, status is reported as baseline-UNKNOWN (treated as NORMAL with an explicit recommendation) — a brand-new runaway service cannot be z-scored until a baseline accrues; watch it through direct budget alarms meanwhile.
    • A $0-mean baseline with positive spend reports an unbounded percentage increase (so the CRITICAL gate cannot be bypassed by a zero-cost baseline).
  4. Unit Economics Tracking:
    • Compute unit cost: $\text{Unit Cost} = \frac{C_{\text{total}}}{\text{Total Trades Executed}}$. Always pass the real trade volume — with the default volume of 1.0, unit cost silently equals raw spend. Zero trades with positive spend reports an infinite unit cost (the worst unit economics there is — a halted strategy still burning compute), never $0.00.
  5. FinOps Alert Generation: Produce remediation recommendations (e.g. terminate idle instances, pin microservices to single AZ).

Full procedure: see references/workflows.md. Standards reference: see references/standards.md. Printable pre-flight checklist: see assets/checklist.md.

Common Pitfalls

  • Evaluating Total Spend Without Volume Context: Flagging a cost spike during an extreme volatility market day when high trading volume naturally increases AWS Lambda / API gateway fees. Unit cost ($\frac{\text{Spend}}{\text{Trades}}$) must be evaluated.
  • Mixing Environments in One Baseline: baselining PROD spend against DEV/STAGING history for the same service distorts $\mu$ and $\sigma$ in both directions. Scope every baseline to (service, environment).
  • Ignoring Cross-AZ Network Egress: Failing to tag cross-Availability-Zone traffic. AWS charges inter-AZ data transfer at $0.01/GB per direction (source cited in references/standards.md) — a GB moved across AZs effectively bills ~$0.02, which is why market-data fan-out across zones doubles the "hidden tax".
  • 24-Hour Billing Delay: Relying exclusively on end-of-day cloud billing exports instead of hourly telemetry metrics.
  • Flat Baselines Paging On-Call: with $\sigma \approx 0$, any absolute deviation produces a huge Z, and that Z is denominated in dollars — so the same $3 blip scores 3.0 on a $100/day baseline and 3.0 on a $100,000/day one. Two separate relative gates exist for this: the CRITICAL >30%-mean-increase gate and the WARNING flat_baseline_min_pct_change floor. Don't remove either, and don't assume the CRITICAL gate alone silences flat-baseline noise — it does not gate WARNING.
  • Reading $0.00/Trade as Efficiency: a unit cost of zero means zero spend, not zero waste. Spend with no trades is reported as infinite unit cost; treat inf as an alert, not as missing data.

Verification

  • Instantiate CloudCostAnomalyDetector. Feed 14 days of baseline compute spend around $100/day ($\sigma \approx 5.0$). Submit a 15th day spend record of $500 (Z \approx 80$). Verify the detector flags a CRITICAL cost anomaly for Compute. Test normal day spend ($102) and verify status is NORMAL.
  • Add DEV-environment history records for the same service and verify the PROD baseline mean is unchanged (environment scoping).
  • Submit a spend record with no matching history and verify the recommendation reports baseline-UNKNOWN rather than a clean bill of health.
  • Feed 14 days of a perfectly flat $100,000/day baseline and submit $100,003. Verify the status is NORMAL (+0.003% is below the materiality floor) and the recommendation names the floor rather than reporting a clean bill of health.
  • Submit a record with trading_volume=0 and positive spend; verify unit_cost_usd is inf, not 0.0.
  • Run python -m unittest discover -s skills/cost-monitoring-for-cloud-trading-infrastructure/scripts.

Related Skills

  • cross-region-data-replication-lag-monitoring
  • cross-strategy-shared-infrastructure-resource-contention

Meegeleverde bestanden

Zolang de skill geladen is, leest het model deze bestanden als dat nodig is. Het model kan ze alleen lezen; ze worden nooit uitgevoerd.

Veelgestelde vragen

Wat doet de AI-skill Cost Monitoring For Cloud Trading Infrastructure?

Gebruik dit wanneer je een alarm voor pieken en inzicht in de eenheidseconomie nodig hebt voor cloudkosten van compute, egress en marktdata. De skill berekent rollende z-score-baselines op basis van de telemetrie die je aanlevert en rapporteert alleen; er wordt niets beëindigd.

Waarom Cost Monitoring For Cloud Trading Infrastructure gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Cost Monitoring For Cloud Trading Infrastructure bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model. Ook als je midden in een chat van model wisselt, blijft de skill werken. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek af te sluiten. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Cost Monitoring For Cloud Trading Infrastructure in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/HimanshuJ16/Algo-Trading-Skills/tree/main/skills/cost-monitoring-for-cloud-trading-infrastructure. TypingMind leest het bestand SKILL.md, bundelt de bijbehorende bestanden en installeert het geheel als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Cost Monitoring For Cloud Trading Infrastructure gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Cost Monitoring For Cloud Trading Infrastructure gebruiken?

Zoveel als je wilt. Je kunt Cost Monitoring For Cloud Trading Infrastructure gebruiken met elk model dat skills ondersteunt, zoals GPT, Claude, Gemini, Grok, DeepSeek, Mistral of Llama. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Cost Monitoring For Cloud Trading Infrastructure gratis?

Ja. Deze skill is door HimanshuJ16 op GitHub gepubliceerd onder de licentie Apache-2.0. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. De skill volgt het open Agent Skills-formaat: het bestand SKILL.md bevat de naam en beschrijving van de skill. Daarnaast kan de skill scripts, sjablonen of referentiebestanden bevatten die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Bekijk alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇