SharpETF CLAUDE.md

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

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/stanleychanh/sharpetf/claude-md
Clone the repo
git clone --depth 1 https://github.com/StanleyChanH/SharpETF
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. Scan, not verified.
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 $0.03256 $0.03256
Opus 5 $0.01628 $0.01628
Sonnet 5 $0.00651 $0.00651
Haiku 4.5 $0.00326 $0.00326

Measured 3d ago against content hash 718af616758d, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 3d 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. 3d 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 11mo ago), licensed MIT. It adds 3,256 tokens to every session, about $0.0163 per session on Opus 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

Other instructions, from other repositories

cryptoexchange-net

Use CryptoExchange.Net abstractions when generating C#/.NET code that needs to work across MULTIPLE cryptocurrency exchanges (Binance + Bybit + OKX + Kraken + Coinbase + ...) — for arbitrage, best-execution routing, multi-exchange portfolio dashboards, exchange-agnostic trading bots, or comparison tools. Triggers on…

JKorf/CryptoExchange.Net · 2,291 tokens

OpenCandle AGENTS.md

Instructions for Kahtaf/OpenCandle, covering opencandle, commands, where to look, code style and conventions.

Kahtaf/OpenCandle · 1,628 tokens

claude-finance-kit CLAUDE.md

Instructions for hongbietcode/claude-finance-kit, covering claude finance kit assistant, scope, operating principles, skill (single entry point) and references (load when needed).

hongbietcode/claude-finance-kit · 2,209 tokens

creditkarma-mcp CLAUDE.md

Claude Code instructions for chrischall/creditkarma-mcp, covering creditkarma-mcp, commands, tool naming, architecture and auth resolution (pattern a template).

chrischall/creditkarma-mcp · 4,135 tokens

bullet-bots AGENTS.md

Instructions for bulletxyz/bullet-bots, covering bullet-bots, build & test, run the faucet curl printed by keygen, then, or (base58 from phantom/delegation export, or hex) and architecture — the harness, feeds, and actors.

bulletxyz/bullet-bots · 3,972 tokens

romaco-mcp AGENTS.md

AGENTS.md instructions for romaco-labs/romaco-mcp, covering purpose, read first, product boundaries, architecture invariants and development method.

romaco-labs/romaco-mcp · 679 tokens