SharpETF: Instructions file for Claude Code

CLAUDE.md

SharpETF CLAUDE.md is an instructions file for Claude Code from StanleyChanH/SharpETF. It costs 3,256 tokens per session, scanned A, original, MIT.

Repository instructions for SharpETF, a Python system for analyzing and optimizing exchange-traded fund portfolios. It describes the project's structure, recent refactoring, data sources, optimization methods, and report generation.

In plain words
What is it for?
Use it when modifying SharpETF's portfolio optimizers, quantitative signals, ETF data handling, growth predictions, or HTML report generation.
Why use it?
It gives a coding agent the project context needed to make consistent changes without rediscovering how the repository is organized.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions Claude Code.

This is StanleyChanH/SharpETF's own configuration. It tells Claude Code how to work on SharpETF itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything SharpETF configures →

Reuse

Borrowing it

Nothing to install: this file belongs to StanleyChanH/SharpETF. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/StanleyChanH/SharpETF/master/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/StanleyChanH/SharpETF

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for SharpETF CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/stanleychanh/sharpetf/claude-md/github.svg)](https://agentmods.dev/instructions/stanleychanh/sharpetf/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/stanleychanh/sharpetf/claude-md"><img src="https://agentmods.dev/badge/instructions/stanleychanh/sharpetf/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for SharpETF CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/stanleychanh/sharpetf/claude-md"><img src="https://agentmods.dev/badge/instructions/stanleychanh/sharpetf/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 3,256 This file is loaded in full into every session.
When invoked 3,256 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.03256 $0.03256
Opus 5.5 $0.01302 $0.01302
Sonnet 5.5 $0.00651 $0.00651
Haiku 4.5 $0.00326 $0.00326

Measured 2mo ago against content hash 718af616758d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

SharpETF CLAUDE.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

CLAUDE.md · 301 lines

How it starts

The opening of the file, as written. The whole thing — 301 lines — stays where its author put it; the contents beside it link to each section on GitHub.

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

This is an enhanced ETF Sharpe ratio optimization system (增强版ETF投资组合优化系统) that provides comprehensive quantitative investment decision support. It uses Tushare API to fetch ETF data and implements multiple optimization strategies including Sharpe ratio maximization, risk parity, and multi-objective optimization. The system features ETF Chinese name support, complex growth prediction, and professional HTML report generation. Written in Python and targets Chinese-speaking quantitative finance community.

Latest Enhancements (v2.3.0 - Code Refactoring)

Major Refactoring

  • Unified Optimization Engine: Merged CVXPY and SciPy portfolio optimizers into a single module with automatic backend selection
  • Unified Quantitative Signals: Integrated simple and advanced quantitative signal modules with mode switching support
  • Code Optimization: Reduced from 21 files to 19 files (-9.5%) and 10,047 lines to 9,564 lines (-4.8%)
  • Eliminated Redundancy: Removed duplicate modules, backup files, and streamlined imports
  • Architecture Enhancement: Improved error handling, backward compatibility, and maintainability

Technical Improvements

  • Smart Backend Selection: Automatic detection and fallback between CVXPY and SciPy optimizers
  • Mode-based Signal Processing: Support for simple/advanced/auto modes in quantitative signal generation
  • Enhanced Error Handling: Robust fallback mechanisms and comprehensive exception handling
  • Streamlined Dependencies: Simplified import structure and reduced module interdependencies
  • Code Quality: Enhanced readability, maintainability, and architectural consistency

Verified Functionality

  • Full Testing: Successfully tested in conda environment with all core features working
  • Backward Compatibility: All original functionality preserved with consistent APIs
  • Performance: Intelligent backend selection improves computational efficiency
  • Robustness: Enhanced error handling ensures system stability

Read the full file on GitHub · 301 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago First seen · 301 lines · 3,256 tokens per session scan A 718af616758d

Subscribe to this mod's changes

SharpETF CLAUDE.md is an instructions file published in the GitHub repository StanleyChanH/SharpETF (11 stars, last pushed 1y ago), licensed MIT. It adds 3,256 tokens to every session, about $0.0130 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

SharpETF CLAUDE.md compared with instructions from other repositories

SharpETF CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
SharpETF CLAUDE.mdStanleyChanH/SharpETFInstructions file111y agoMITA3,256Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode