Abridge連携コードのCIに合成データを使った回帰チェックを加え、同意状態、ノート確認、ログの秘匿、ロールバックなど顧客側の処理を検証します。
- Abridge連携の回帰テストを追加したいとき
- 同意やノート確認の処理を検証したいとき
- ログに機微情報が出ないか確かめたいとき
暗号資産や株式などの売買戦略を過去データでバックテストし、リターンやリスク指標、資産曲線、取引履歴を比較してパラメーターを調整します。
Backtest crypto and traditional trading strategies against historical data. Calculates performance metrics (Sharpe, Sortino, max drawdown), generates equity curves, and optimizes strategy parameters. Use when user wants to test a trading strategy, validate signals, or compare approaches. Trigger with phrases like "backtest strategy", "test trading strategy", "historical performance", "simulate trades", "optimize parameters", or "validate signals".
実行スコア 未検証
インストール方法を見る暗号資産や従来型市場の売買戦略を過去データで検証し、実資金を投じる前に成績を確認します。SMAやEMA、RSI、MACD、ボリンジャーバンドなど8種類の戦略を使い、総リターン、Sharpe比、Sortino比、最大ドローダウンなどの指標を計算します。取引ごとの記録や資産曲線も出力でき、グリッドサーチで複数のパラメーターを比較できます。結果はサマリー、CSVの取引・資産データ、チャート画像として保存されます。
売買シグナルが過去にどう機能したかを調べたいとき、複数の戦略を比べたいとき、リスク指標や取引単位の結果まで確認したいときに向いています。設定値を変えながら成績の違いを見たい場合にも使えます。
基本機能にはpandas、numpy、yfinance、matplotlibが必要です。高度な機能にはta-lib、scipy、scikit-learnが必要となる場合があります。結果は過去データ上の検証であり、将来の成績を示すものではありません。
この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。
インストールする前に、エージェントに与えられる指示の中身を確認できます。
Simulate trading strategies against historical data. Results describe a historical simulation, not expected future performance. The framework includes 8 built-in strategies, the metrics listed below, and parameter optimization.
Key Features:
Before invoking this skill, the user installs the required dependencies in the Python environment used for the simulation:
set -euo pipefail
pip install pandas numpy yfinance matplotlib
Optional for advanced features:
set -euo pipefail
pip install ta-lib scipy scikit-learn
Fetch historical data (cached to ${CLAUDE_SKILL_DIR}/data/ for reuse):
python ${CLAUDE_SKILL_DIR}/scripts/fetch_data.py --symbol BTC-USD --period 2y --interval 1d
Run a backtest with default or custom parameters:
python ${CLAUDE_SKILL_DIR}/scripts/backtest.py --strategy sma_crossover --symbol BTC-USD --period 1y
python ${CLAUDE_SKILL_DIR}/scripts/backtest.py \
--strategy rsi_reversal \
--symbol ETH-USD \
--period 1y \
--capital 10000 \
--params '{"period": 14, "overbought": 70, "oversold": 30}'
Analyze results saved to ${CLAUDE_SKILL_DIR}/reports/ -- includes *_summary.txt (performance metrics), *_trades.csv (trade log), *_equity.csv (equity curve data), and *_chart.png (visual equity curve).
Optimize parameters via grid search to find the best combination:
python ${CLAUDE_SKILL_DIR}/scripts/optimize.py \
--strategy sma_crossover \
--symbol BTC-USD \
--period 1y \
--param-grid '{"fast_period": [10, 20, 30], "slow_period": [50, 100, 200]}'
| Metric | Description |
|---|---|
| Total Return | Overall percentage gain/loss |
| CAGR | Compound annual growth rate |
| Sharpe Ratio | Historical risk-adjusted return |
| Sortino Ratio | Downside risk-adjusted return |
| Calmar Ratio | Return divided by max drawdown |
| Metric | Description |
|---|---|
| Max Drawdown | Largest peak-to-trough decline |
| VaR (95%) | Value at Risk at 95% confidence |
| CVaR (95%) | Expected loss beyond VaR |
| Volatility | Annualized standard deviation |
| Metric | Description |
|---|---|
| Total Trades | Number of round-trip trades |
| Win Rate | Percentage of profitable trades |
| Profit Factor | Gross profit divided by gross loss; N/A with no observed losses |
| Expectancy | Expected value per trade |
Figure-free layout; actual values depend on the input series, fees, slippage, strategy and parameters. Do not present these placeholders as measured returns.
HISTORICAL SIMULATION: [strategy]
[symbol] | [start_date] to [end_date]
Total Return: [computed] | Max Drawdown: [computed]
Sharpe Ratio: [computed] | Win Rate: [computed]
Total Trades: [observed] | Profit Factor: [computed or N/A]
Profit factor is unavailable when no losing trades were observed, including a zero-trade run or a single winning/breakeven trade. A single losing trade yields zero gross profit divided by its loss; this is not evidence of strategy quality. Zero/one-trade samples cannot establish performance, and optimization is an in-sample historical comparison rather than a forecast.
| Strategy | Description | Key Parameters |
|---|---|---|
sma_crossover | Simple moving average crossover | fast_period, slow_period |
ema_crossover | Exponential MA crossover | fast_period, slow_period |
rsi_reversal | RSI overbought/oversold | period, overbought, oversold |
macd | MACD signal line crossover | fast, slow, signal |
bollinger_bands | Mean reversion on bands | period, std_dev |
breakout | Price breakout from range | lookback, threshold |
mean_reversion | Return to moving average | period, z_threshold |
momentum | Rate of change momentum | period, threshold |
Create ${CLAUDE_SKILL_DIR}/config/settings.yaml:
data:
provider: yfinance
cache_dir: ./data
backtest:
default_capital: 10000 # Starting simulated capital in quote-currency units
commission: 0.001 # 0.1% per trade
slippage: 0.0005 # 0.05% slippage
risk:
max_position_size: 0.95
stop_loss: null # Optional fixed stop loss
take_profit: null # Optional fixed take profit
Use Read to inspect references/errors.md for common issues and solutions.
See references/examples.md for detailed usage examples including:
| File | Purpose |
|---|---|
scripts/backtest.py | Main backtesting engine |
scripts/fetch_data.py | Historical data fetcher |
scripts/strategies.py | Strategy definitions |
scripts/metrics.py | Performance calculations |
scripts/optimize.py | Parameter optimization |
まだレビューはありません。使ってみた感想をお寄せください。
ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。
まだコメントはありません。最初のコメントを書いてみませんか。
Abridge連携コードのCIに合成データを使った回帰チェックを加え、同意状態、ノート確認、ログの秘匿、ロールバックなど顧客側の処理を検証します。
Abridgeの録音、記録の確認、Epicへの引き渡し、アクセスの不具合を観測情報から切り分け、患者情報を抑えた証拠と担当窓口への引き継ぎ資料を整理するスキル。
同意確認から録音、生成メモの根拠確認、編集、最終確定まで、臨床文書作成の手順と確認ポイントを整理するスキルです。
Abridgeで臨床家が確認した記録内容が、承認済みの手順でEpicの適切なテンプレート欄へ渡るか、テスト記録を使って対応関係や例外を検証するスキルです。
Abridgeの導入・更新判断に向け、利用定着率や業務の完了状況、診療記録の品質、支援負担を契約に基づく費用情報と照らし、継続や改善の選択肢を整理するスキル。
Abridgeの障害調査で、録音や診療記録を含めず、許可した項目だけを集めたサポート用資料と確認用マニフェストを作成します。