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.7

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.7
File
tradetide-1.1.7-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
tradetide-1.1.7-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
tradetide-1.1.7-cp314-cp314-macosx_26_0_arm64.whl CPython 3.14 CPython 3.14 macOS 26.0+ ARM64 Details
tradetide-1.1.7-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
tradetide-1.1.7-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
tradetide-1.1.7-cp313-cp313-macosx_26_0_arm64.whl CPython 3.13 CPython 3.13 macOS 26.0+ ARM64 Details
tradetide-1.1.7-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
tradetide-1.1.7-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
tradetide-1.1.7-cp312-cp312-macosx_26_0_arm64.whl CPython 3.12 CPython 3.12 macOS 26.0+ ARM64 Details
tradetide-1.1.7-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
tradetide-1.1.7-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
tradetide-1.1.7-cp311-cp311-macosx_26_0_arm64.whl CPython 3.11 CPython 3.11 macOS 26.0+ ARM64 Details

Total release size: 181.0 MB

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

Download URL tradetide-1.1.7-cp314-cp314-win_amd64.whl
Size 19.3 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
fb4ebe6cf300a536cb356135274f3215568642ee2cd20ecaba9391002c8b9fbf
BLAKE2b-256 checksum
How to use checksums
ef7273fb9b9a6119721a43620eaa71c061a52b0d8593dd3395ec0ac49f615173
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.7-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL tradetide-1.1.7-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 12.7 MB
Tags CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
32f95c5ea96b9e438ee2fa9da1385e8c510c4f4f467f20d62e1a3340dfc43003
BLAKE2b-256 checksum
How to use checksums
1bdf180168f2aa250ed6e9c0b2271348c24fdfe0ed276eb84e2e1b4657cffa93
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.7-cp314-cp314-macosx_26_0_arm64.whl

Download URL tradetide-1.1.7-cp314-cp314-macosx_26_0_arm64.whl
Size 13.7 MB
Tags CPython 3.14 macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
b7195f5bdd37fae341e54aeb49d787cbda5410c065c9c3e5cee89b2398959583
BLAKE2b-256 checksum
How to use checksums
40fb12a97195c904f67b83a788323265594b37f83f102dee8e6d9a7348b98db5
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.7-cp313-cp313-win_amd64.whl

Download URL tradetide-1.1.7-cp313-cp313-win_amd64.whl
Size 18.7 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
4f2f138a9d3403ec1a48e9ce137a3a471a906f4b215cb704d25b485266a00896
BLAKE2b-256 checksum
How to use checksums
d30d98a6f0544d3004ba31fd6b94b047a99dedcfea59fbdcb143e65ec0ffa5f0
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.7-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL tradetide-1.1.7-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 12.7 MB
Tags CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
61c406d6d10fe58e9e7cce2f77728ad0412b0289bcd12f6222f503d049bb0a21
BLAKE2b-256 checksum
How to use checksums
5effe534c457bae0096dca328b3b615f31e861c65c46e69f9f72e4e8bbbcb5fc
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.7-cp313-cp313-macosx_26_0_arm64.whl

Download URL tradetide-1.1.7-cp313-cp313-macosx_26_0_arm64.whl
Size 13.7 MB
Tags CPython 3.13 macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
45c767b3ef10e4e646df59c34cdc3002973f15817c6c0e203712d7459e05716b
BLAKE2b-256 checksum
How to use checksums
df93ebc2f9e6f6b30ea83515e09474ffa69fcb4fd59d75f5586c40b31a414616
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.7-cp312-cp312-win_amd64.whl

Download URL tradetide-1.1.7-cp312-cp312-win_amd64.whl
Size 18.7 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
ef0a38f1f801405ac930151e52b7dbe34aa0723f534a447d4256cdce555de6d7
BLAKE2b-256 checksum
How to use checksums
423eff5bec86af1bf69ad11ea13ff80b39f27354566b5a9ce827cf437223f1ec
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.7-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL tradetide-1.1.7-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 12.7 MB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
8bac1de3edce3a043b1cff117e2ba7281eed19d6298f4a0248243b201858a8f0
BLAKE2b-256 checksum
How to use checksums
c880342d606dc92ab8c9c3f2972d1acf134fc1b682a47adc1f20bd90d33376af
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.7-cp312-cp312-macosx_26_0_arm64.whl

Download URL tradetide-1.1.7-cp312-cp312-macosx_26_0_arm64.whl
Size 13.7 MB
Tags CPython 3.12 macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
2d9af416acdccc496b7bb67931b07e4c5f460efc89a7c35724417bef4660eb33
BLAKE2b-256 checksum
How to use checksums
2820891f7c16fa55589f83de9b568914e87a7e41f18d6fabd9fe504886f597bc
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.7-cp311-cp311-win_amd64.whl

Download URL tradetide-1.1.7-cp311-cp311-win_amd64.whl
Size 18.7 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
fec9e1e7d2b23803e910c16acc30e14987980adbe367feb19cd42f3bf75b0dfc
BLAKE2b-256 checksum
How to use checksums
8b889a01490ea0c2617193fa0ef7b015f2af08596a6b77edffac6fd958f0e771
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.7-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL tradetide-1.1.7-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 12.7 MB
Tags CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
9eb954c305c35e00368628d690de190e7d24755a74e0affa5b3976a6fd904d69
BLAKE2b-256 checksum
How to use checksums
a4755dcc29a1f179255eb30b4985344e968761898c26813fc606ad6530fca450
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.7-cp311-cp311-macosx_26_0_arm64.whl

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

Release history Release notifications | RSS feed

This release

1.1.7 This release

12 release files

1.1.6

12 release files

1.1.2

12 release files

1.1.1

12 release files

1.1.0

12 release files

1.0.0

9 release files

0.3.0

9 release files

0.2.6

9 release files

0.2.5

9 release files

0.2.4

9 release files

0.2.3

9 release files

0.2.2

9 release files

0.2.1

9 release files

0.2.0

9 release files

0.1.5

2 release files

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