BeClaude

polars-backtest

New
4Community RegistryGeneralby Yvictor

Polars backtest extension development helper - backtesting with polars expressions

Summary

This skill helps developers build and test backtesting strategies using Polars expressions, enabling efficient, vectorized backtests on large datasets.

  • It provides tools to define trading signals, simulate portfolio performance, and analyze results directly within Polars DataFrames.

Install & Usage

1
Add a marketplace
/plugin marketplace add <org/repo>
2
Install the plugin

Add the configuration to /plugin install polars-backtest@<marketplace>

3
Manage with /plugin
/plugin

Use Cases

Define a moving average crossover strategy using Polars expressions and backtest it on historical price data.
Calculate and visualize portfolio equity curves, drawdowns, and Sharpe ratios from backtest results.
Optimize strategy parameters by running multiple backtests with different indicator thresholds.
Generate trade logs with entry/exit prices, position sizes, and profit/loss for each signal.
Compare multiple strategies side-by-side using common performance metrics like CAGR and max drawdown.
Validate strategy robustness by running backtests on different time periods or asset universes.

Usage Examples

1

/polars-backtest define strategy with SMA crossover on daily OHLC data and compute returns

2

Backtest a momentum strategy using 12-month returns on S&P 500 constituents with Polars

3

/polars-backtest evaluate strategy performance with Sharpe ratio and max drawdown from trade log

View source on GitHub
testing

Security Audits

LicenseUnknownSourceWarnRepositoryPass

Frequently Asked Questions

What is polars-backtest?

This skill helps developers build and test backtesting strategies using Polars expressions, enabling efficient, vectorized backtests on large datasets. It provides tools to define trading signals, simulate portfolio performance, and analyze results directly within Polars DataFrames.

How to install polars-backtest?

To install polars-backtest: add a marketplace (/plugin marketplace add <org/repo>), then add the config to /plugin install polars-backtest@<marketplace>. Finally, /plugin in Claude Code.

What is polars-backtest best for?

polars-backtest is a plugin categorized under General. It is designed for: testing. Created by Yvictor.

What can I use polars-backtest for?

polars-backtest is useful for: Define a moving average crossover strategy using Polars expressions and backtest it on historical price data.; Calculate and visualize portfolio equity curves, drawdowns, and Sharpe ratios from backtest results.; Optimize strategy parameters by running multiple backtests with different indicator thresholds.; Generate trade logs with entry/exit prices, position sizes, and profit/loss for each signal.; Compare multiple strategies side-by-side using common performance metrics like CAGR and max drawdown.; Validate strategy robustness by running backtests on different time periods or asset universes..