Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
alsk1992 avatar

Analytics

  • 13 installs
  • 610 repo stars
  • Updated June 26, 2026
  • alsk1992/cloddsbot

Analytics is a Claude Code skill that measures trading performance with P&L attribution by edge source, platform, time, and strategy, and exports PDF/CSV reports.

About

Analytics is a skill that analyzes trading performance for the clodds bot. It attributes profit and loss by edge source, platform, market category, strategy, and time of day, reports execution quality and edge decay, and exports PDF or CSV reports. A developer uses it to understand which edges and conditions actually drive returns.

  • Attributes P&L by edge source, platform, category, and strategy
  • Analyzes performance by hour, day, edge size, and liquidity, plus edge decay
  • Exports PDF and CSV reports of trading performance

Analytics by the numbers

  • 13 all-time installs (skills.sh)
  • Ranked #759 of 1,106 Finance & Trading skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
At a glance

analytics capabilities & compatibility

Capabilities
performance attribution · trade analytics · report export
Use cases
data analysis · trading
Runs
Runs locally
From the docs

What analytics says it does

Analyze trading performance with attribution by edge source, time-of-day analysis, and optimization insights.
SKILL.md
/analytics attribution P&L by edge source
SKILL.md
npx skills add https://github.com/alsk1992/cloddsbot --skill analytics

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs13
repo stars610
Last updatedJune 26, 2026
Repositoryalsk1992/cloddsbot

What it does

Attribute trading P&L by edge source, platform, time, and strategy, and export performance reports.

Who is it for?

understanding which edges and conditions drive trading returns

Skip if: placing trades or setting alerts (this only analyzes past performance)

When should I use this skill?

you want to attribute trading P&L or review strategy performance

What you get

A performance breakdown attributing P&L to edge source, platform, strategy, and time, exportable as PDF or CSV.

  • P&L attribution breakdown
  • PDF performance report
  • CSV trade export

By the numbers

  • 6 attribution categories

Files

SKILL.mdMarkdownGitHub ↗

Analytics - Complete API Reference

Analyze trading performance with attribution by edge source, time-of-day analysis, and optimization insights.

---

Chat Commands

Performance Overview

/analytics                          Performance summary
/analytics today                    Today's performance
/analytics week                     Weekly breakdown
/analytics month                    Monthly breakdown

Attribution

/analytics attribution              P&L by edge source
/analytics by-platform              P&L by platform
/analytics by-category              P&L by market category
/analytics by-strategy              P&L by strategy

Time Analysis

/analytics best-times               Best trading hours
/analytics by-hour                  Hourly performance
/analytics by-day                   Day of week analysis

Edge Analysis

/analytics edge-decay               How edge decays over time
/analytics edge-buckets             Performance by edge size
/analytics liquidity                Performance by liquidity

---

TypeScript API Reference

Create Analytics Service

import { createAnalyticsService } from 'clodds/analytics';

const analytics = createAnalyticsService({
  // Data source
  tradesDb: './trades.db',

  // Time zone
  timezone: 'America/New_York',
});

Performance Summary

const summary = await analytics.getSummary({
  period: 'month',
  // or: from: '2024-01-01', to: '2024-01-31'
});

console.log('=== Performance ===');
console.log(`Total P&L: $${summary.totalPnl}`);
console.log(`Win Rate: ${summary.winRate}%`);
console.log(`Profit Factor: ${summary.profitFactor}`);
console.log(`Sharpe Ratio: ${summary.sharpeRatio}`);
console.log(`Total Trades: ${summary.totalTrades}`);
console.log(`Avg Trade: $${summary.avgTrade}`);
console.log(`Best Trade: $${summary.bestTrade}`);
console.log(`Worst Trade: $${summary.worstTrade}`);

Attribution by Edge Source

const attribution = await analytics.getAttribution('edgeSource');

for (const source of attribution) {
  console.log(`${source.name}:`);
  console.log(`  P&L: $${source.pnl}`);
  console.log(`  Trades: ${source.trades}`);
  console.log(`  Win Rate: ${source.winRate}%`);
  console.log(`  Contribution: ${source.contribution}%`);
}

// Example sources:
// - price_lag (stale prices)
// - liquidity_gap (thin orderbooks)
// - information (news/events)
// - model_edge (external models)
// - combinatorial (arbitrage)

Time-of-Day Analysis

const hourly = await analytics.getHourlyPerformance();

console.log('Best Hours:');
for (const hour of hourly.slice(0, 3)) {
  console.log(`  ${hour.hour}:00 - Win: ${hour.winRate}%, Avg: $${hour.avgPnl}`);
}

console.log('Worst Hours:');
for (const hour of hourly.slice(-3)) {
  console.log(`  ${hour.hour}:00 - Win: ${hour.winRate}%, Avg: $${hour.avgPnl}`);
}

Day-of-Week Analysis

const daily = await analytics.getDayOfWeekPerformance();

for (const day of daily) {
  console.log(`${day.name}: $${day.pnl} (${day.trades} trades, ${day.winRate}% win)`);
}

Edge Decay Analysis

const decay = await analytics.getEdgeDecay();

console.log('Edge Decay (how fast edge disappears):');
for (const bucket of decay) {
  console.log(`  ${bucket.holdTime}: ${bucket.avgReturn}% return`);
}
// Shows optimal hold time before edge decays

Edge Size Buckets

const edgeBuckets = await analytics.getEdgeBuckets();

for (const bucket of edgeBuckets) {
  console.log(`Edge ${bucket.min}-${bucket.max}%:`);
  console.log(`  Trades: ${bucket.trades}`);
  console.log(`  Win Rate: ${bucket.winRate}%`);
  console.log(`  Avg P&L: $${bucket.avgPnl}`);
  console.log(`  Realized Edge: ${bucket.realizedEdge}%`);
}

Liquidity Analysis

const liquidity = await analytics.getLiquidityAnalysis();

for (const bucket of liquidity) {
  console.log(`${bucket.name} liquidity:`);
  console.log(`  Trades: ${bucket.trades}`);
  console.log(`  Avg Slippage: ${bucket.avgSlippage}%`);
  console.log(`  Fill Rate: ${bucket.fillRate}%`);
  console.log(`  Avg P&L: $${bucket.avgPnl}`);
}

Execution Quality

const execution = await analytics.getExecutionQuality();

console.log('=== Execution Quality ===');
console.log(`Avg Slippage: ${execution.avgSlippage}%`);
console.log(`Fill Rate: ${execution.fillRate}%`);
console.log(`Avg Fill Time: ${execution.avgFillTimeMs}ms`);
console.log(`Partial Fills: ${execution.partialFillRate}%`);
console.log(`Rejected Orders: ${execution.rejectionRate}%`);

Platform Comparison

const platforms = await analytics.getPlatformComparison();

for (const platform of platforms) {
  console.log(`${platform.name}:`);
  console.log(`  P&L: $${platform.pnl}`);
  console.log(`  Win Rate: ${platform.winRate}%`);
  console.log(`  Avg Slippage: ${platform.avgSlippage}%`);
  console.log(`  Best For: ${platform.strengths.join(', ')}`);
}

Export Report

// Generate PDF report
await analytics.exportReport({
  format: 'pdf',
  period: 'month',
  include: ['summary', 'attribution', 'charts'],
  outputPath: './reports/january-2024.pdf',
});

// Export raw data
await analytics.exportData({
  format: 'csv',
  period: 'month',
  outputPath: './data/january-trades.csv',
});

---

Attribution Categories

CategoryDescription
Edge SourceWhere the edge came from
PlatformWhich platform traded on
CategoryMarket category (politics, crypto)
StrategyWhich strategy generated trade
TimeHour/day of trade
SizeTrade size bucket

---

Key Metrics

MetricGood ValueDescription
Win Rate> 50%Percent of winning trades
Profit Factor> 1.5Gross profit / gross loss
Sharpe Ratio> 1.0Risk-adjusted returns
Realized Edge> 0Actual vs expected edge
Fill Rate> 95%Orders fully filled

---

Best Practices

1. Review weekly — Catch problems early 2. Track attribution — Know where profits come from 3. Optimize timing — Trade your best hours 4. Monitor edge decay — Don't hold too long 5. Check execution — Slippage kills edge

Related skills

FAQ

What can it attribute P&L against?

Edge source, platform, market category, strategy, and time of trade, plus trade-size buckets.

Can it export reports?

Yes, it can export PDF reports and raw CSV data via exportReport and exportData.

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.