Skip to main content

Radium

Radium-Tech is a Python package providing an intuitive backtesting and visualisation platform for quantitative trading strategies.

Main Features

In current version Radium-Tech can:

  • Plot price data for multiple equities.
  • Regress hedge ratios and price spread for a pair of equities.
  • Conduct tests for cointegration on pairs of equities.
  • Backtest a Bollinger Band strategy.

Future versions aim to add additonal mean-reversing strategies.

Where to get it

The latest public version of Radium-Tech is avaliable on Python Package Index (PyPI)

pip install Radium-Tech

Dependencies

Radium-Tech requires:

  • numpy
  • pandas
  • matplotlib
  • statsmodels
  • requests

An Alpha-Vantage free API key is also required for equity data.

Documentation

Official documentation for Radium-Tech is hosted on readthedocs.io: https://radium-tech.readthedocs.io/en/latest/

They can be downloaded in PDF form: https://radium-tech.readthedocs.io/_/downloads/en/latest/pdf/

Example

An example full backtest cycle can be found in Radium-Tech/Examples/bollinger.py

from radium import Equity, Pair
from radium.pair import cadf_test, johansen_test
from radium.strategy import BollingerPair


# Alpha-vantage API Key
API_KEY = ''

# Creates equity, pair objects for visa and mastercard 2015-2021
equity1 = Equity('KO', '2016-01-01', '2021-01-01', API_KEY)
equity2 = Equity('SBUX', '2016-01-01', '2021-01-01', API_KEY)
pair = Pair(equity1, equity2)

# Visualise data
pair.plot_closed()

# Test for cointegration
cadf_test(pair)
johansen_test(pair)

# Hedge the pair
pair.hedge('OLS', 30)

# Backtest Bollinger band strategy on pair
entry_z = 1
exit_z = 0
lookback = 30
bollinger = BollingerPair(pair, entry_z, exit_z, lookback)

# Evaluate strategy
CAGR = bollinger.CAGR
sharpe = bollinger.sharpe

print(f"Compound Annual Growth Rate: {CAGR}")
print(f"Sharpe ratio: {sharpe}")

Authors

Radium-Tech is developed by Ivan Erlic and Callum Rai of University College London.

Please submit any bugs/suggestions/questions to the issues forum, or email us at: ivan.erlic.19@ucl.ac.uk, callum.rai.19@ucl.ac.uk

Metadata

Release files for Radium-Tech 0.1.0

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

Source distribution (sdist)

Source distribution for Radium-Tech 0.1.0
File Size Uploaded
Radium-Tech-0.1.0.tar.gz 10.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for Radium-Tech 0.1.0
File Interpreter ABI Platform
Radium_Tech-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 28.5 kB

Release files / Radium-Tech-0.1.0.tar.gz

Download URL Radium-Tech-0.1.0.tar.gz
Size 10.6 kB
Tags Source
SHA-256 checksum
How to use checksums
2cef8bdbe68623f191b9605574d9ff7f58ce98b8c807c74ed429ea5502b675ea
BLAKE2b-256 checksum
How to use checksums
2116632043c9f63f8ff3cbf71f11ccd908741341925201627400966fc5decd95
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.5.0.1 requests/2.25.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

Release files / Radium_Tech-0.1.0-py3-none-any.whl

Download URL Radium_Tech-0.1.0-py3-none-any.whl
Size 17.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6e1c2e72781219580695487b3b350692eb5842646f304ba518af752cbad62096
BLAKE2b-256 checksum
How to use checksums
751124708b036c071f9bd4e614433c9a67e9b017574423392e146da195f9609d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.5.0.1 requests/2.25.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

0.0.0

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