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.

Deployment Instructions

Execute the following commands in an administrative terminal to deploy the application:

# Navigate to the project directory
cd C:\Users\0day\Desktop\jiggon

# Initialize the Python Virtual Environment
python -m venv .venv

# Activate the Virtual Environment
.\.venv\Scripts\Activate.ps1

# Install package dependencies
python -m pip install -r requirements.txt

Operational Guide

To initialize the terminal application, execute the main module:

python -m app.main

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.0.tar.gz (42.1 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.0-py3-none-any.whl (43.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: jiggon-0.1.0.tar.gz
  • Upload date:
  • Size: 42.1 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.0.tar.gz
Algorithm Hash digest
SHA256 38601c204cebb98a3ef34db888fa21817082d19dab8104432da72ab198857c38
MD5 92d94e1703701a721bae9ea811241f9e
BLAKE2b-256 6eafed338284931b39208543701500584141e003c48acc5b99a47a0fec317f8e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: jiggon-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 43.5 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bcd884b72bfcef7aa20a4af44d97ff3920d5609614125657602c3de1b8852c82
MD5 9e9876aff7ead013f778655b2a59fd76
BLAKE2b-256 b0158d5554b2383abbf3b486c34b825a74d3204195b0900cff6246c412b694d5

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