Skip to main content

TradeTide logo

Badge

Status

Python versions

Python

Documentation

Documentation Status

Continuous integration

Unittest Status

Test coverage

Unittest coverage

Google Colab

Google Colab

PyPI package

PyPI version

PyPI downloads

PyPI downloads

Anaconda package

Anaconda version

Anaconda downloads

Anaconda downloads

Latest Anaconda release

Latest release date

TradeTide

TradeTide is a Python/C++ package for researching and backtesting foreign-exchange trading strategies. It includes bundled historical samples, technical indicators, position management, and portfolio simulation.

Features

  • Bundled historical samples for five major FX pairs.

  • Technical indicators including Bollinger Bands, moving-average crossings, RMI, RSI, and MACD.

  • Composable all_of, any_of, and weighted signal rules.

  • Backtesting with configurable exit and capital-management strategies.

Installation

TradeTide is available from PyPI and Anaconda:

pip install TradeTide
conda install TradeTide --channel MartinPdeS

Verify the installation with the Python interpreter used for backtests:

python -c "import TradeTide; print(TradeTide.__version__)"

Released wheels are the easiest option. Building from source requires CMake, a C++20 compiler, pybind11, and OpenMP.

Graphical workspace

Launch the local strategy lab in your browser:

TradeTide

After updating a source checkout, reinstall with pip install -e . to register the command. You can also use python -m TradeTide.gui or the tradetide-gui alias. The GUI runs locally and needs no additional dependencies, accounts, or internet access. The home page offers editable mean-reversion, trend-following, and momentum templates, plus recent experiments. The keyboard-accessible navigation separates Market data, Strategy, Results, Orders & trades, Compare, and Research. Navigation preserves your draft and completed runs; a successful backtest opens the Results tab.

Market data

Choose the bundled currency pair and historical sample independently from the strategy configuration. Samples are available from 1 to 180 days, with one-click presets for 1 day, 15 days, 1 month, 3 months, and 6 months. The 1-year option is visible but disabled until longer bundled market data is available.

TradeTide Market data tab with currency pair, sample duration, and common duration presets

Strategy and saved configurations

Build a stack of up to eight independently configured Bollinger Bands, moving-average crossings, RSI, RMI, and MACD indicators. Enable or disable each indicator and combine its entry events using unanimous agreement, any non-conflicting agreement, or weighted voting with a configurable threshold.

Tune fixed position size, concurrent positions, capital at risk, fixed, trailing, or break-even exits, commission, slippage, and additional spread. Use Load strategy in the Strategy tab to replace the current draft with a saved configuration. Save strategy at the bottom of the tab opens a name dialog and stores a reusable strategy in the local browser library.

TradeTide Strategy tab with indicator and risk configuration panels

Analysis and research

Inspect equity, drawdown, market entry markers, individual indicator curves, simulated entry requests (executed or skipped), and a searchable trade ledger with costs and position sizes. Open any trade to see its cost breakdown and highlight its entry and exit on the market chart. Filter trades by side or outcome, sort by P&L, and export the filtered ledger as CSV. Chart range sliders and keyboard inspection make individual periods easier to examine.

Compare any two completed runs to inspect metric changes and exact parameter differences. Normalized equity curves are overlaid only for matching markets and observation times; metric comparisons remain available for different samples. The Research tab ranks every retained experiment by return, risk, or Sharpe ratio, overlays matching normalized equity curves, and exports a standalone HTML experiment report.

Drafts and up to 20 named strategies are saved locally. The last 30 runs are stored in the browser and restored after a refresh, using the same browser profile and server address/port. Import strategy JSON or the settings from an exported run; undo restores the replaced draft. Export JSON to keep portable copies independent of browser storage. Ctrl+Enter or Cmd+Enter runs the current draft from any workspace tab.

Samples begin at each dataset’s first observation. The selected duration is calendar time and may include market closures; displayed dates show the actual simulation period. During each run, the workspace reports genuine progress through data loading, indicator calculation, signal combination, portfolio simulation, and performance reporting. Bollinger, moving-average, and RMI windows use minutes; RSI and MACD windows use bars. Signal rules combine entry events on the same bar, not persistent indicator regions. Simulated entries use the native engine’s bid/ask closing prices. Skipped requests reflect portfolio constraints or the end of the sample; they are not broker orders. Costs adjust reported equity and P&L after simulation, without changing position sizing. Editing settings leaves the previous result visible until a new run succeeds. The Results tab identifies when the current draft differs from the selected run.

Use python -m TradeTide.gui --port 8766 --no-browser to choose a port or open the displayed URL yourself. Stop the server with Ctrl+C. The server binds only to 127.0.0.1 and is intended for a local research session.

First backtest

Load the bundled EUR/USD sample, add an indicator to a strategy, and run a backtest:

from TradeTide import Backtester, BacktestResult, Currency, Market, Strategy
from TradeTide import capital_management, exit_strategy
from TradeTide.indicators import BollingerBands
from TradeTide.times import days, minutes

market = Market()
market.load_from_database(Currency.EUR, Currency.USD, time_span=3 * days)

strategy = Strategy()
strategy.add_indicator(BollingerBands(window=30 * minutes, multiplier=2.0))

backtester = Backtester(
    strategy=strategy,
    market=market,
    exit_strategy=exit_strategy.Static(stop_loss=4, take_profit=4),
    capital_management=capital_management.FixedLot(
        capital=100_000,
        fixed_lot_size=10_000,
        max_capital_at_risk=10_000,
        max_concurrent_positions=1,
    ),
)
backtester.run()
result = BacktestResult.from_portfolio(backtester.portfolio)
result.plot_equity_drawdown()

Bundled datasets are EUR/USD, GBP/USD, CHF/USD, JPY/USD, and CAD/USD. time_span accepts a timedelta or a positive duration string such as "2d 6h".

Testing

For local development, install the development extra and run the suite:

git clone https://github.com/MartinPdeS/TradeTide.git
cd TradeTide
pip install -e '.[dev]'
pytest

Contributing

See CONTRIBUTING.md for the native-build requirements, formatting checks, and pull-request guidelines.

Contact

For questions or contributions, contact martin.poinsinet.de.sivry@gmail.com.

Metadata

Release files for TradeTide 1.1.20

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

Built distributions (wheels)

Table of built distributions (wheels) for TradeTide 1.1.20
File Actions
tradetide-1.1.20-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details for tradetide-1.1.20-cp314-cp314-win_amd64.whl
tradetide-1.1.20-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details for tradetide-1.1.20-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
tradetide-1.1.20-cp314-cp314-macosx_26_0_arm64.whl CPython 3.14 CPython 3.14 macOS 26.0+ ARM64 Details for tradetide-1.1.20-cp314-cp314-macosx_26_0_arm64.whl
tradetide-1.1.20-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details for tradetide-1.1.20-cp313-cp313-win_amd64.whl
tradetide-1.1.20-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details for tradetide-1.1.20-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
tradetide-1.1.20-cp313-cp313-macosx_26_0_arm64.whl CPython 3.13 CPython 3.13 macOS 26.0+ ARM64 Details for tradetide-1.1.20-cp313-cp313-macosx_26_0_arm64.whl
tradetide-1.1.20-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for tradetide-1.1.20-cp312-cp312-win_amd64.whl
tradetide-1.1.20-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details for tradetide-1.1.20-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
tradetide-1.1.20-cp312-cp312-macosx_26_0_arm64.whl CPython 3.12 CPython 3.12 macOS 26.0+ ARM64 Details for tradetide-1.1.20-cp312-cp312-macosx_26_0_arm64.whl
tradetide-1.1.20-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details for tradetide-1.1.20-cp311-cp311-win_amd64.whl
tradetide-1.1.20-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details for tradetide-1.1.20-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
tradetide-1.1.20-cp311-cp311-macosx_26_0_arm64.whl CPython 3.11 CPython 3.11 macOS 26.0+ ARM64 Details for tradetide-1.1.20-cp311-cp311-macosx_26_0_arm64.whl

Total release size: 186.5 MB

Release files / tradetide-1.1.20-cp314-cp314-win_amd64.whl

Download URL tradetide-1.1.20-cp314-cp314-win_amd64.whl
Size 19.8 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
14165695956d040363add2296423860f08ab2d48d020a89e2218b39bf371fdf5
BLAKE2b-256 checksum
How to use checksums
94e0a1555c633ce6a78362a0314f8f1b1fd8437b153663d899b3db051a888a6f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / tradetide-1.1.20-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL tradetide-1.1.20-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 13.2 MB
Tags CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
19bc4609fd9020415db1826a855592e7eb98a6f80576feafb1aaaf551db57aaf
BLAKE2b-256 checksum
How to use checksums
6e6242d9eb859d289bf0d8736a6d27f010d17101d4ded40ca9277ce36f9cb971
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / tradetide-1.1.20-cp314-cp314-macosx_26_0_arm64.whl

Download URL tradetide-1.1.20-cp314-cp314-macosx_26_0_arm64.whl
Size 14.2 MB
Tags CPython 3.14 macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
92fac2065127ac19c5a27d9f3db7b882ed0b52365d6bb9b6053c63148c063704
BLAKE2b-256 checksum
How to use checksums
c3d76a2d6f76bf5a35e22fc2f90d5ae16fe97b176fa9117cb74ef38196ff4829
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / tradetide-1.1.20-cp313-cp313-win_amd64.whl

Download URL tradetide-1.1.20-cp313-cp313-win_amd64.whl
Size 19.1 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
9226e93424762d12d59785cf2e22318b954828d815be1c17bfa98c6d573ddee9
BLAKE2b-256 checksum
How to use checksums
4a2dc7f37dc156d9bb200d8c776b8c5c66b2a4868cadf6c282e20797918cb2fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / tradetide-1.1.20-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL tradetide-1.1.20-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 13.2 MB
Tags CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
209c9f9653b5c3ee3178abe1b90cd17a31fbc01473e784540f467011845b11ea
BLAKE2b-256 checksum
How to use checksums
14dff5ec745e2e7946623cbe9af6472e43dc4d63580a040f5bbb058f893bee74
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / tradetide-1.1.20-cp313-cp313-macosx_26_0_arm64.whl

Download URL tradetide-1.1.20-cp313-cp313-macosx_26_0_arm64.whl
Size 14.2 MB
Tags CPython 3.13 macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
9d7e9c98b589104d536082f5f9c67aa0a4e280066d27c248149e47b305bc9f20
BLAKE2b-256 checksum
How to use checksums
a35d361e79af504057b80b030a8183cee04fc40a72055fbd079b7ce98c9e83f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / tradetide-1.1.20-cp312-cp312-win_amd64.whl

Download URL tradetide-1.1.20-cp312-cp312-win_amd64.whl
Size 19.1 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
1557f24f74d1ec32119686948e7ee42f1e3a1ef2c565671ad060d2b185167f47
BLAKE2b-256 checksum
How to use checksums
9de3c279d5f31e4727e7a8dee3d1455157225a5bb1adab69160928a2c9684a26
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / tradetide-1.1.20-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL tradetide-1.1.20-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 13.1 MB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
12708db544442084da8fe68247886842323dfb0aa4fad4d957e26d2b4cfd34a8
BLAKE2b-256 checksum
How to use checksums
2954cce795835ad0ddb1351caa55000b515a6c880f4192f360a3f41c3862a58f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / tradetide-1.1.20-cp312-cp312-macosx_26_0_arm64.whl

Download URL tradetide-1.1.20-cp312-cp312-macosx_26_0_arm64.whl
Size 14.2 MB
Tags CPython 3.12 macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
0293b7fe4ae8e85ee0f0c8391cfb4cb6b716c52dc88bbe81e3651655ef2bf4f3
BLAKE2b-256 checksum
How to use checksums
925400c3a82a409323c1cfb2c8d6e6aad3c890b48621c61ad949dd861a31e586
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / tradetide-1.1.20-cp311-cp311-win_amd64.whl

Download URL tradetide-1.1.20-cp311-cp311-win_amd64.whl
Size 19.1 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
727dca4256e5cdaf87884b69d582107471b3ad1349408c50c3e20e93b9f62a55
BLAKE2b-256 checksum
How to use checksums
e9e0116aca053e685c470fe59c31bf3bc84e5b58645a420d3b72aaee1fbb7c67
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / tradetide-1.1.20-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL tradetide-1.1.20-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 13.1 MB
Tags CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
5d053cc89e36ebd6ac72a8df03b8563dccd4087274f87631c31697d36371fe10
BLAKE2b-256 checksum
How to use checksums
78e3d5865cd47ac3de6e6ea52fcf00a6c7cd26f3dad62ec9d78a01fc755ddc04
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / tradetide-1.1.20-cp311-cp311-macosx_26_0_arm64.whl

Download URL tradetide-1.1.20-cp311-cp311-macosx_26_0_arm64.whl
Size 14.2 MB
Tags CPython 3.11 macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
eb89d9d84a62c7d3899ab6709f641d4bf5c54f26b861befaf96e41d21f30bebc
BLAKE2b-256 checksum
How to use checksums
4c4a7961aeb95e12c3befa2faad5a0e249014111580fc3805477993e3912cdb4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for TradeTide 1.1.20

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