Skip to main content

An open-source CLI trading bot engineered for algorithmic execution on the Deriv API.

Project description

Jiggon Quantitative Trading Terminal

Table of Contents

  1. Overview
  2. System Architecture
  3. Features & Capabilities
  4. Installation & Setup
  5. Operational Guide
  6. Risk Management Framework
  7. Strategy Customization
  8. Legal Disclaimer & Liability

Overview

Jiggon is an open-source, fully interactive Command Line Interface (CLI) quantitative trading bot. It is engineered to facilitate rigorous algorithmic trading on the Deriv API, executing Binary Options contracts with institutional-grade risk management protocols.

The software is constructed to eliminate emotional trading variables by strictly adhering to quantitative thresholds, multi-timeframe analysis, and automated risk enforcement mechanisms.

System Architecture

The application is structured around a modular execution pipeline. Key components include:

  • DerivWebSocket: Establishes an asynchronous, persistent WebSocket connection to the Deriv API for real-time tick data ingestion.
  • BrokerClient: Manages account authentication, balance verification, and live contract execution routing.
  • MarketSnapshot: Processes raw tick data into synthetically constructed OHLC (Open, High, Low, Close) candles to calculate critical technical indicators (EMA, RSI, ATR, MACD).
  • ExecutionEngine: The central decision matrix that cross-references technical signals with the RiskState to authorize or veto pending executions.

Features & Capabilities

  • Real-Time Execution: Low-latency order routing directly to the Deriv WebSocket API for Rise/Fall contracts.
  • Terminal User Interface (TUI): A robust interface built on the Textual framework, featuring real-time log ingestion, confidence checklists, and Plotext candlestick rendering.
  • Persistent Configuration: Runtime parameters are automatically serialized to a local jiggon_config.json file to preserve state across application restarts.
  • Automated Trade Auditing: All executed transactions, irrespective of outcome, are systematically logged to an external trade_history.csv file.

Installation & Setup

System Requirements

  • Python 3.10 or higher.
  • A validated Deriv account and associated API Token with Read and Trade permissions.

Global Installation (Recommended)

Jiggon is officially distributed via the Python Package Index (PyPI). Ensure you have Python 3.10+ installed.

pip install jiggon

Developer Setup (Building from Source)

If you wish to contribute to the open-source repository or modify the source code:

git clone https://github.com/0xP4X/jiggon.git
cd jiggon
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -e .[dev]

Operational Guide

If installed globally via PyPI, simply execute the following command anywhere in your terminal:

jiggon

Upon initialization, the Onboarding Configuration Wizard will request the following parameters:

  • Environment: Select Demo for testing algorithms without financial risk, or Live for real-capital deployment.
  • API Token: Input your secure Deriv token.
  • Volatility Index: The specific synthetic market to trade (e.g. Vol 10, Vol 100 (1s)).
  • Timeframe: The granularity of the candlestick chart (from 1 Minute up to 1 Day).
  • Duration (Ticks): The length of the contract (Deriv limits this strictly to 5-10 ticks).
  • Strategy Aggression: Modifies the sensitivity of the internal momentum oscillators (RSI). Options include Conservative, Balanced, or Aggressive.
  • Chart Theme: Customizes the visual aesthetic of the internal candlestick chart rendering.

Keyboard Operations

  • s : Instantly toggle the Safe Mode kill-switch.
  • w : Reinitialize the Onboarding Configuration Wizard.
  • ? : Open the built-in Help Menu for instructions and configuration details.
  • + : Zoom the chart scale in.
  • - : Zoom the chart scale out.
  • q : Terminate the application thread safely.

Risk Management Framework

Jiggon is inherently designed to protect principal capital through multiple systemic gates:

  1. Maximum Daily Drawdown: The application tracks realized session losses against the total portfolio balance. If the threshold (e.g., 5.0%) is breached, the bot permanently halts execution for the remainder of the session.
  2. Take-Profit Halting: Users may define a strict nominal profit target. Upon reaching this target, the system engages Safe Mode to preserve realized gains.
  3. Abnormal Volatility Rejection: The Average True Range (ATR) is monitored constantly. If the current ATR surpasses the configured safe threshold, trading is temporarily suspended due to erratic market conditions.

Strategy Customization

The bot supports algorithmic customization via a Domain Specific Language (DSL). Users can input custom pseudo-code in the application wizard to override the default strategy.

Example Custom Algorithm:

IF RSI < 45 AND EMA_TREND == BULLISH THEN BUY
IF RSI > 55 AND EMA_TREND == BEARISH THEN SELL

The underlying parser will translate these constraints and route them through the calculate_confidence matrix in confidence.py.


Legal Disclaimer & Liability (READ BEFORE USE)

Jiggon is provided strictly for educational and informational purposes only.

By downloading, installing, compiling, or operating this software, you explicitly agree to the following conditions:

  1. No Financial Advice: Nothing in this repository constitutes financial, investment, or trading advice. The algorithms, mathematical models, and risk parameters provided are strictly experimental and intended for research purposes.
  2. Assumption of Risk: Trading in financial markets, especially algorithmic execution of derivatives or binary options, carries an exceptionally high level of risk. This software operates autonomously and may incur rapid financial losses. You may lose some or all of your initial investment.
  3. No Warranty: This software is provided "AS IS", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose, and non-infringement.
  4. Limitation of Liability: In no event shall the authors, contributors, or copyright holders be liable for any claim, damages, financial loss, or other liability, whether in an action of contract, tort or otherwise, arising from, out of, or in connection with the software or the use or other dealings in the software.

You are solely responsible for your own financial decisions, security keys, API tokens, and any direct or indirect losses resulting from the use of this framework. We highly advise utilizing the built-in Demo Mode extensively before transitioning to a production environment with real capital.

Please consult the accompanying LICENSE file for further legal stipulations.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jiggon-0.1.6.tar.gz (39.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jiggon-0.1.6-py3-none-any.whl (45.0 kB view details)

Uploaded Python 3

File details

Details for the file jiggon-0.1.6.tar.gz.

File metadata

  • Download URL: jiggon-0.1.6.tar.gz
  • Upload date:
  • Size: 39.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for jiggon-0.1.6.tar.gz
Algorithm Hash digest
SHA256 7629c57b349ceae7009acca5273c61e5ae46a38072a05acd74993530f1d034bf
MD5 281bf253071631cabfccdfa8a156598f
BLAKE2b-256 93705a38d2853b6e3cab0c22fd1d4902f7f29332b5ec3cdb2e31df324df1d143

See more details on using hashes here.

File details

Details for the file jiggon-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: jiggon-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 45.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for jiggon-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 d4234c11ac7a054a53192b9e75c77aa597042b91b9df42d9f6a30589f50075b3
MD5 ccd3080f5d737006830a2984798a9501
BLAKE2b-256 3902f44d615b6b6d9f5afd16dc128057c71e7b52c1ffba5ef71ee26ce29a5359

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page