← 返回
数据分析 中文

Tearsheet Generator

Generate professional tearsheets with custom SVG visualizations using the QuantStats library. Creates performance reports with MAE analysis, leverage recomme...
利用QuantStats库生成包含自定义SVG可视化的专业业绩报告,制作带MAE分析和杠杆建议的表现报表。
ahuserious
数据分析 clawhub v0.1.0 1 版本 99863.2 Key: 无需
★ 0
Stars
📥 730
下载
💾 17
安装
1
版本
#latest

概述

Tearsheet Generator Skill

About

This skill generates custom tearsheets using the QuantStats library - a Python library for portfolio analytics.

Key Features:

  • Custom SVG visualizations (returns, drawdowns, monthly heatmaps)
  • Professional HTML tearsheets
  • MAE (Maximum Adverse Excursion) analysis
  • Leverage recommendations based on risk metrics
  • Copyable strategy configurations

Generate comprehensive trading strategy tearsheets with:

  • IBM Plex Mono font styling (QuantStats format)
  • MAE (Max Adverse Excursion) percentile analysis (p90-p99)
  • Optimal leverage recommendations with stop-loss levels
  • Fixed Position (Static) vs Full Position (Dynamic) analysis
  • 10%, 20%, 30% liquidation buffer calculations
  • Full trade list with entry/exit details and MAE stats
  • Copyable strategy config text boxes
  • Multiple leverage scenario comparisons (1x, 10x, 15x, 20x)

Quick Start

# Generate tearsheet from trades CSV
/generate-tearsheet SOL_MTF_EMA_001 --trades ./trades.csv --capital 10000

# Verify backtest with Nautilus Trader
/verify-backtest SOL_MTF_EMA_001 --trades ./trades.csv

# Test optimal leverage configuration
/verify-mae-lev SOL_MTF_EMA_001 --leverage p95

Commands

/generate-tearsheet

Generate a complete tearsheet with all analysis sections.

/verify-backtest

Verify tearsheet results against Nautilus Trader for accuracy validation.

/verify-mae-lev

Run backtest with optimal leverage config derived from MAE analysis.

Output Files

Each tearsheet generation produces:

  • {strategy}_comparison.html - Full HTML tearsheet
  • {strategy}_comparison_metrics.json - JSON metrics for programmatic access

Key Sections

1. Key Performance Metrics

  • B&H, Fix1x, Dyn1x, Fix10x, Dyn10x columns
  • Cumulative Return, CAGR, Sharpe, Sortino, Max DD, Calmar
  • Intratrade risk metrics with liquidation distance

2. MAE Analysis & Optimal Leverage

  • MAE distribution table (min, mean, p50, p75, p90-p99, max)
  • Safe leverage recommendations per percentile
  • Stop loss table with % PRICE movement (not position cost)

3. Fixed Position (Static) Analysis

  • Leverage table: 5x, 10x, 15x, 20x, 25x, 30x
  • Columns: Liq @ %Price, Rec. SL, Max Loss, +10% Buffer, +20% Buffer, Risk Level

4. Full Position (Dynamic) Analysis

  • Warning about compounding risk
  • Leverage table: 1x, 2x, 3x, 5x, 10x
  • Recommendation per leverage level

5. Buffer Analysis Summary

  • +10%, +20%, +30% buffers above worst MAE
  • Safety check for 10x, 15x, 20x leverage

6. Full Trade List

  • All trades with entry/exit times, prices, side, PnL, MAE, MFE, duration
  • Scrollable table with sticky headers
  • Summary row with averages

7. Strategy Configuration

  • Original config text box (copyable JSON)
  • MAE-optimized config text box (copyable JSON)
  • Backtest methodology description

Dependencies

  • Python 3.10+
  • pandas, numpy, matplotlib
  • StrategyComparisonTearsheet from backtesting.tearsheets

Installation

The skill uses the tearsheet generator at:

/Users/DanBot/Desktop/dev/Backtests/backtesting/tearsheets/strategy_comparison_tearsheet.py

Ensure this path is accessible or update the script paths accordingly.

版本历史

共 1 个版本

  • v0.1.0 当前
    2026-03-30 02:17 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

data-analysis

Data Analysis

ivangdavila
{"answer":"数据分析与可视化。查询数据库、生成报告、自动化电子表格,将原始数据转化为清晰可行的见解。适用于:(1) 您……"}
★ 198 📥 65,168
developer-tools

ML Pipeline

ahuserious
完整的机器学习交易流水线:特征工程、AutoML、深度学习与金融强化学习。用于自动化参数搜索、特征构建...
★ 0 📥 1,050
data-analysis

Excel / XLSX

ivangdavila
创建、检查和编辑 Microsoft Excel 工作簿及 XLSX 文件,支持可靠的公式、日期、类型、格式、重算及模板保留功能。
★ 368 📥 140,589