notebook-to-strategy
Skill by tradingstrategy-ai
Transfers code from a backtesting Jupyter notebook into a Trade Executor strategy module. It is for developers who build and test trading strategies in that framework.
Install notebook-to-strategy
Built from the published package, never by AI.
git clone --depth 1 https://github.com/tradingstrategy-ai/trade-executor /tmp/trade-executor && mkdir -p ~/.claude/skills && cp -r /tmp/trade-executor/.claude/skills/notebook-to-strategy ~/.claude/skills/notebook-to-strategyRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/tradingstrategy-ai/trade-executor /tmp/trade-executor && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/trade-executor/.claude/skills/notebook-to-strategy ~/.gemini/antigravity-cli/skills/notebook-to-strategyAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install notebook-to-strategy in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
The notebook-to-strategy skill converts a backtesting Jupyter notebook into a Trade Executor strategy module. It reads the notebook cells and maps them to module sections such as the Parameters class, create_trading_universe(), decide_trades(), indicator functions and chart functions. Imports are consolidated, sorted and deduplicated, and line comments are kept. Notebook-only code, such as the Jupyter client setup and the inline backtest runner, is left out.
After writing the module, the skill runs a trade-executor backtest and treats any output without "All ok" as a failure. It then shows the top 15 rows of the performance and risk metrics and records them, with the run date, in the module's docstring. The skill also checks the converted universe against the source and flags supporting pairs on the wrong chain.
Written from the project's SKILL.md and checked against it.
What it can do
- Notebook parsingReads the backtesting notebook and any existing strategy module before transfer.
- Section mappingMaps notebook cells to Parameters, universe, decide_trades, indicator and chart sections.
- Import consolidationCollects imports from all notebook cells, then deduplicates and sorts them at the top.
- Backtest verificationRuns the trade-executor backtest and checks the output for "All ok".
- Results summaryExtracts the top 15 performance metric rows from the generated HTML report.
- Docstring updateWrites the results table and backtest run date into the module docstring.
What you need
- A Jupyter notebook file (.ipynb) with the backtest
- A Trade Executor project with Poetry
- A .local-test.env file for the backtest command
Try asking
- Convert my backtest notebook into a Trade Executor strategy module
- Update the existing strategy module with code from this notebook
- Run the backtest and show the top 15 performance metric rows
Good to know
- Notebook-specific code such as the Jupyter client and run_backtest_inline() is excluded.
- Pairs on a different chain than the strategy cannot be cross-referenced, so the user must resolve them.
- A backtest that does not print "All ok" is treated as a failure.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .claude/skills/notebook-to-strategy/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to notebook-to-strategy
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
notebook-to-strategy: common questions
What does notebook-to-strategy convert?
It converts code from a backtesting Jupyter notebook into a Trade Executor strategy module, mapping cells to sections such as decide_trades() and create_indicators().
What happens if the backtest fails?
The skill treats any output without "All ok" as a failure. It either fixes the errors itself or asks the user for help when it does not understand them.
Is notebook-only code copied into the module?
No. Notebook-specific setup, such as the Jupyter client and the inline backtest runner, is excluded from the strategy module.
How do I install notebook-to-strategy?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is notebook-to-strategy free?
The code is published under the NOASSERTION licence. The service it connects to may have its own pricing.
Is notebook-to-strategy safe to use?
It scores 66 of 100. Grades: maintenance A, licence F, quality B. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to notebook-to-strategy?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
