Package areixio

Introduction

The basics of running this platform:

  • Create a Strategy

    • Decide on potential adjustable parameters
    • Instantiate the Indicators you need in the Strategy
    • Write down the logic for entering/exiting the market
  • Create DataFeeds

    • Specify the symbol, start/end date, interval, asset_type
  • Create Broker

    • Add exchange connections (if realtime)
    • Add account details (if backtest)
      • slippage
      • initial balance
  • Create a Orchestrator (Backtest / Realtime)

    • Inject the Strategy
    • Inject the Broker
    • Load and Inject DataFeeds
    • And execute Orchestrator.start()
    • For visual feedback use: contest_output()

The platform is highly configurable

Flowchart

xkcd.com/1570

Installation

Create a virtual environment

virtualenv venv --python=python3

Activate the virtual environment

# Macbook / Linus
source venv/bin/activate

# Windows
venv/Scripts/activate

Deactivate

deactivate

Install AreixIO package

pip install areixio

Install dependency (optional)

Use Indicator requires to install ta-lib

Mac:

1.1 Install TA-LIB
brew install ta-lib

1.2 Install TA-LIB Python Wrapper
Install TA-Lib Python Wrapper via pip (or pip3):
pip install ta-lib

Linux:

1.1 Download
wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz
tar -xzf ta-lib-0.4.0-src.tar.gz
cd ta-lib/

1.2 Install TA-LIB
If the next command fails, then gcc is missing, install it by doing “apt-get install build-essential”)
sudo ./configure
sudo make
sudo make install

1.3 Install TA-LIB Python Wrapper
Install TA-Lib Python Wrapper via pip (or pip3):
pip install ta-lib

Windows

1.1 Download
Download [ta-lib-0.4.0-msvc.zip](http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-msvc.zip)

1.2 Unzip
unzip to C:/\ ta-lib

1.3 Install TA-LIB Python Wrapper
Install TA-Lib Python Wrapper via pip (or pip3):
pip install ta-lib

Use Plotter requires to install bokeh

pip install -U bokeh

Use optimize requires to install tqdm

pip install -U tqdm

Use optimize(skopt='skopt') requires to install scikit-optimize

pip install -U scikit-optimize

Use SignalMQ requires to install redis

pip install -U redis

QuickStart

API Reference Documentation

Sub-modules

areixio.base
areixio.brokers
areixio.datafeeds
areixio.orchestrators
areixio.strategy
areixio.utils

Functions

def submission(user_code: str, strategy_path: str, codes: list, **kwargs)

strategy submission

The backtest will conduct in the same environment for all the submitted script

Environment

  1. Past 3 months backtest with 1 minute data
  2. balance $100,000
  3. 5x leverage
  4. On bybit future

Criterias

  1. win_ratio > 0.51
  2. sqn > 1.1
  3. return_on_investment > 0.22
  4. risk_score < 5
  5. sharpe_ratio > 0.95
  6. annualized_volatility < 0.18
  7. max_drawdown < 0.19
  8. ending_balance > beginning_balance
  9. standardized_expected_value > 1

Args

user_code : str
unique user code for areix user
strategy_path : str
strategy file path
codes : list
exchange symbols to conduct backtesting
**kwargs : dict
custom parameter specified for strategy

Returns

None