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

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

Total release size: 186.5 MB

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

Download URL tradetide-1.1.19-cp314-cp314-win_amd64.whl
Size 19.8 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
b358d62744ce3a879c04afebe3d96f8dfe1ecc8a50c0b6e778a4a9afa4360945
BLAKE2b-256 checksum
How to use checksums
8626684391f4ac7ba30bad416b9ddf76f1ea9db8b5bc3f26db12776ad7193a7f
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.19-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL tradetide-1.1.19-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
1987b08695cf6902f98615b7717a9a8115f574d135929533d9581c15763f364a
BLAKE2b-256 checksum
How to use checksums
29da6f7937409cbccb720805da73fa6768c4aea7a3b6de48541a406faa8d2b80
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.19-cp314-cp314-macosx_26_0_arm64.whl

Download URL tradetide-1.1.19-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
de07f530c7f8089ef2049de1e62c7e95a5313d19784235d53007d12be4e9740e
BLAKE2b-256 checksum
How to use checksums
7051a98faa1ab055ab3ac91f5b7a712b9ec37fe46e9a4955d3b0314e5b3ef933
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.19-cp313-cp313-win_amd64.whl

Download URL tradetide-1.1.19-cp313-cp313-win_amd64.whl
Size 19.1 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
4e9cfce416a35869ec9fade60f535c11520b044ddb92ae134367944c57edbd0f
BLAKE2b-256 checksum
How to use checksums
31d109eb91e9d1b526edbdacd04fcba074f4ecd6efb19e8716860efb336054ad
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.19-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL tradetide-1.1.19-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
22e4fba4cfd7e7cc338f96d3aacb7fa2b6f499fb0a6e90b1e492f68ade28cd9e
BLAKE2b-256 checksum
How to use checksums
66711b37ef4394761e463ffe50ed7453f610b367d4ad573c621a7552d6421ee1
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.19-cp313-cp313-macosx_26_0_arm64.whl

Download URL tradetide-1.1.19-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
4242782c21375f2f20cfa2352b13ec3ec6ea8516e2727c725883fe6bc8f098b9
BLAKE2b-256 checksum
How to use checksums
30cd0122b01818a97cd6feed32cab7084b4434bc24d543ee2a66fe8859ef40ea
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.19-cp312-cp312-win_amd64.whl

Download URL tradetide-1.1.19-cp312-cp312-win_amd64.whl
Size 19.1 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
4508d6f0803f6fd615db5226df003a41aff5b46f9ac0f0fdb2201f8ca4384d46
BLAKE2b-256 checksum
How to use checksums
3a236512353e36f77cc621c3946cf28359943d3a5f62ecabe935cebe65c7d1d9
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.19-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL tradetide-1.1.19-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
59c696ea8ecaad3de253883331ce25be99f4ff70d2d47d328b24c81be4707b7c
BLAKE2b-256 checksum
How to use checksums
be55ebce57ed77a97ccefdbc6ae10b342ce87827f9c3b1a15e2fff30f9e7a2c4
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.19-cp312-cp312-macosx_26_0_arm64.whl

Download URL tradetide-1.1.19-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
54fb90ae028ec6d1eb78e84745b57d839c9bfffd770cf51e9df8071d7d326fd0
BLAKE2b-256 checksum
How to use checksums
56af0f88bd1e8b7dc505fde80621c33a8b80acc157c9fb71def217615dbdd746
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.19-cp311-cp311-win_amd64.whl

Download URL tradetide-1.1.19-cp311-cp311-win_amd64.whl
Size 19.1 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
3eaa91584aaefb4bac2fde2b23daaabb791055909599d0e410f6e22a24b9c60d
BLAKE2b-256 checksum
How to use checksums
f47c410642cb24d31e0d605a228a028969c743b738612adc612bbd8519e5160b
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.19-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL tradetide-1.1.19-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
c795d3a108eb375200cb1dcfc33058c2a0ceda92fba2bd5ab825806ddee6e067
BLAKE2b-256 checksum
How to use checksums
39196c44f11c610817f85131a56d3a0c8d1b083043a7fefbe61abc3c692037c7
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.19-cp311-cp311-macosx_26_0_arm64.whl

Download URL tradetide-1.1.19-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
94a9908894e48745d41acf0030fa2c8bd156bf7766a9569f8d7771dd5220df03
BLAKE2b-256 checksum
How to use checksums
e8ae49a2519545439a65ebba9a98e5e342a534a6f17cc6dbf0adfbf447c729f5
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.19

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