diff --git a/Cargo.toml b/Cargo.toml index b6a6924..9633fdc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,12 +1,12 @@ [package] name = "raptorbt" -version = "0.2.1" +version = "0.2.2" edition = "2021" description = "High-performance Rust backtesting engine with Python bindings. Drop-in VectorBT replacement with up insanely faster performance at fractional memory footprint." authors = ["Alphabench "] license = "MIT" repository = "https://github.com/alphabench/raptorbt" -homepage = "https://github.com/alphabench/raptorbt" +homepage = "https://www.alphabench.in/raptorbt" readme = "README.md" keywords = ["backtesting", "trading", "quantitative-finance", "rust", "python"] categories = ["finance", "simulation"] diff --git a/README.md b/README.md index 1e944c5..0fda813 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,10 @@ # RaptorBT -[![PyPI version](https://img.shields.io/pypi/v/raptorbt.svg)](https://pypi.org/project/raptorbt/) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) +[![PyPI version](https://img.shields.io/pypi/v/raptorbt.svg)](https://pypi.org/project/raptorbt/) [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/) -[![Rust](https://img.shields.io/badge/rust-1.70+-orange.svg)](https://www.rust-lang.org/) +[![Rust](https://img.shields.io/badge/rust-1.70+-red.svg)](https://www.rust-lang.org/) +[![PyPI Downloads](https://static.pepy.tech/personalized-badge/raptorbt?period=total&units=INTERNATIONAL_SYSTEM&left_color=GRAY&right_color=ORANGE&left_text=downloads)](https://pepy.tech/projects/raptorbt) **Blazing-fast backtesting for the modern quant.** @@ -573,18 +574,18 @@ print(f"Max Drawdown: {result.metrics.max_drawdown_pct}%") ### Metric Mapping -| VectorBT Key | RaptorBT Attribute | -| ---------------------- | ------------------------------ | -| `Total Return [%]` | `metrics.total_return_pct` | -| `Sharpe Ratio` | `metrics.sharpe_ratio` | -| `Sortino Ratio` | `metrics.sortino_ratio` | -| `Max Drawdown [%]` | `metrics.max_drawdown_pct` | -| `Win Rate [%]` | `metrics.win_rate_pct` | -| `Profit Factor` | `metrics.profit_factor` | -| `SQN` | `metrics.sqn` | -| `Omega Ratio` | `metrics.omega_ratio` | -| `Total Trades` | `metrics.total_trades` | -| `Expectancy` | `metrics.expectancy` | +| VectorBT Key | RaptorBT Attribute | +| ------------------ | -------------------------- | +| `Total Return [%]` | `metrics.total_return_pct` | +| `Sharpe Ratio` | `metrics.sharpe_ratio` | +| `Sortino Ratio` | `metrics.sortino_ratio` | +| `Max Drawdown [%]` | `metrics.max_drawdown_pct` | +| `Win Rate [%]` | `metrics.win_rate_pct` | +| `Profit Factor` | `metrics.profit_factor` | +| `SQN` | `metrics.sqn` | +| `Omega Ratio` | `metrics.omega_ratio` | +| `Total Trades` | `metrics.total_trades` | +| `Expectancy` | `metrics.expectancy` | --- diff --git a/pyproject.toml b/pyproject.toml index bb66548..5765668 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "maturin" [project] name = "raptorbt" -version = "0.2.1" +version = "0.2.2" description = "High-performance Rust backtesting engine with Python bindings. Drop-in VectorBT replacement with up insanely faster performance at fractional memory footprint." readme = "README.md" requires-python = ">=3.10" @@ -39,9 +39,9 @@ classifiers = [ ] [project.urls] -Homepage = "https://github.com/alphabench/raptorbt" +Homepage = "https://www.alphabench.in/raptorbt" Repository = "https://github.com/alphabench/raptorbt" -Documentation = "https://github.com/alphabench/raptorbt#readme" +Documentation = "https://www.alphabench.in/raptorbt" "Bug Tracker" = "https://github.com/alphabench/raptorbt/issues" [tool.maturin] diff --git a/python/raptorbt/__init__.py b/python/raptorbt/__init__.py index 74c9f49..5507a7c 100644 --- a/python/raptorbt/__init__.py +++ b/python/raptorbt/__init__.py @@ -24,6 +24,7 @@ from raptorbt._raptorbt import ( run_options_backtest, run_pairs_backtest, run_multi_backtest, + run_spread_backtest, # Indicator functions sma, ema, @@ -35,9 +36,11 @@ from raptorbt._raptorbt import ( adx, vwap, supertrend, + rolling_min, + rolling_max, ) -__version__ = "0.2.1" +__version__ = "0.2.2" __all__ = [ # Config classes @@ -54,6 +57,7 @@ __all__ = [ "run_options_backtest", "run_pairs_backtest", "run_multi_backtest", + "run_spread_backtest", # Indicator functions "sma", "ema", @@ -65,4 +69,6 @@ __all__ = [ "adx", "vwap", "supertrend", + "rolling_min", + "rolling_max", ] diff --git a/python/raptorbt/__pycache__/__init__.cpython-311.pyc b/python/raptorbt/__pycache__/__init__.cpython-311.pyc index c0db6a6..a5696f1 100644 Binary files a/python/raptorbt/__pycache__/__init__.cpython-311.pyc and b/python/raptorbt/__pycache__/__init__.cpython-311.pyc differ diff --git a/python/raptorbt/_raptorbt.cpython-311-darwin.so b/python/raptorbt/_raptorbt.cpython-311-darwin.so index 0840fa6..00ee130 100755 Binary files a/python/raptorbt/_raptorbt.cpython-311-darwin.so and b/python/raptorbt/_raptorbt.cpython-311-darwin.so differ