Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

backtest-ape

Backtesting and forward-testing (via Monte Carlo sims) for DeFi strategies.

Installation

hatch build
hatch shell
(backtest-ape) $ ape plugins install .

Build

(backtest-ape) $ ape compile --size

Test

(backtest-ape) $ ape test -s

Usage

(backtest-ape) $ ape run backtester
INFO: Starting 'anvil' process.
You are connected to provider network ethereum:mainnet-fork:foundry.
Runner type (BaseRunner, BaseCurveV2Runner, BaseUniswapV3Runner, CurveV2LPRunner, UniswapV3LPRunner): CurveV2LPRunner
Runner kwarg (ref_addrs): {"pool": "0xD51a44d3FaE010294C616388b506AcdA1bfAAE46"}
Runner kwarg (num_coins): 3
Runner kwarg (amounts): [1000000000000, 5946382600, 820567784927637667840]
Deploying mock ERC20 tokens ...
Start block number: 16219691
Stop block number [-1]:
Step size [1]:
Initializing state of mocks from block number 16219691 ...
Iterating from block number 16219692 to 16270201 with step size 1 ...
Processing block 16219692 ...
State of refs at block 16219692: {'balances': [49753542730360, 299470579545, 42256392553951116624718], 'D': 149811847101739918524603074, 'A_gamma': [183752478137306770270222288013175834186240000, 581076037942835227425498917514114728328226821, 1633548703, 0], 'prices': [16693207875853529503168, 1185215639716509143580], 'total_supply': 179765246450053705933358}
Backtester value at block 16219692: 2981325191662

Results

Curve Tricrypto2 LP position from block 16048833 to 16273534:

Gearbox V2 stETH strategy (5x leverage) from block 14805946 to 15078047:

Metadata

Release files for backtest-ape 0.1.0a16

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for backtest-ape 0.1.0a16
File Size Uploaded Provenance Actions
backtest_ape-0.1.0a16.tar.gz 570.0 kB Without provenance Details for backtest_ape-0.1.0a16.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for backtest-ape 0.1.0a16
File Interpreter ABI Platform Actions
backtest_ape-0.1.0a16-py3-none-any.whl Python 3 none any Details for backtest_ape-0.1.0a16-py3-none-any.whl

Total release size: 594.2 kB

Release files / backtest_ape-0.1.0a16.tar.gz

Download URL backtest_ape-0.1.0a16.tar.gz
Size 570.0 kB
Tags Source
SHA-256 checksum
How to use checksums
b9755f5cd265b606fa961c9514f5c4571cc378fd8668311e1cf3f708df26bdf9
BLAKE2b-256 checksum
How to use checksums
a84cd78580594bc7751ef84354204936a934a53b9e7ba501bbad41f0f68be629
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.26.0

Release files / backtest_ape-0.1.0a16-py3-none-any.whl

Download URL backtest_ape-0.1.0a16-py3-none-any.whl
Size 24.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7d527dd5434e1266a5288292b8586ea0b18db92cc472f0dc2bcbefa088f4a66d
BLAKE2b-256 checksum
How to use checksums
830074bb6ffbe1b3909749a7405f6d9d8880a0c25e4da441936f5ca346019bd3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-httpx/0.26.0

Security for backtest-ape 0.1.0a16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page