PyP
CommunityPricingMarketplaceFor Quant TradersPCE (VPS)DocsLoginGet Started
Documentation
Getting Started
  • Introduction

  • Quick Start

Functions
Getting Started

PyP Documentation

This documentation is organized around PyP's two strategy-authoring paths:

  • PyPScript for rule-language strategies
  • Quant Mode for Python-based model workflows

If you are here for Quant Mode, start with What Is Quant Mode? instead of the PyPScript language reference.

If you are new to the language, do not start with the reference pages. Start with the pages that explain how a .ppc file is structured and how rules are evaluated.

Recommended path

  1. Read PyPScript Basics to understand file structure, imports, assignments, and rule flow.
  2. Read Syntax Reference to see the exact shape of expressions and pattern clauses.
  3. Read Variables & Data to understand what data your rules can safely use.
  4. Read Pattern Matching to learn how the engine chooses the final signal.
  5. Use Indicator Reference and Function Reference when you need exact signatures.

Recommended Quant Mode path

  1. Read What Is Quant Mode? to understand when Quant Mode is the right fit.
  2. Read Research Workspace to understand the supported project shape.
  3. Read Strategy Contract to see the exact train() and predict() expectations.
  4. Read quant.config.json to understand runtime, parameters, and requirements.
  5. Continue into Artifacts & Model Formats and Releases & Simulations.

What PyPScript is for

PyPScript is a rule-oriented strategy language for expressing market logic clearly.

You use it to define:

  • the market pairs and timeframes a strategy targets
  • the indicators and helper functions it imports
  • intermediate signals such as trend, momentum, confirmation, and filters
  • final pattern rules that emit UP, DOWN, or HOLD

PyPScript is designed to make strategies:

  • readable by humans
  • deterministic in evaluation order
  • easy to revise without turning into unreadable spaghetti

What makes a good PyPScript strategy

A strong .ppc file usually has three layers:

  1. Inputs and indicators
    • moving averages, RSI, ATR, MACD, or other raw components
  2. Intermediate logic
    • named conditions such as bullish_trend, volatile_enough, or cross_confirmed
  3. Pattern rules
    • final ordered entries inside patterns { ... }

That structure matters. When a strategy is too clever too early, it becomes hard to debug. When it is broken into named stages, the intent stays obvious.

Core ideas to remember

  • Rules are evaluated in order.
  • The first matching pattern wins.
  • default -> HOLD(...) should be explicit.
  • Confidence is part of the output, not just decoration.
  • Intermediate variables are there to improve clarity, not to mimic general-purpose programming.

Best pages to keep open while writing

Reference map

Learn the language

Build with Quant Mode

Design better rules

Look up exact syntax

A simple mental model

Think of a .ppc file like this:

config { pairs: ["EURUSD"] timeframes: ["1m"] } use indicators.sma use indicators.rsi use functions.above use functions.cross fast = sma(20) slow = sma(50) strength = rsi(14) patterns { cross(fast, slow) and above(strength, 55) -> UP(0.82) default -> HOLD(0.40) }

That is the rhythm of the language:

  • define the market scope
  • import what you need
  • compute named intermediate values
  • emit final ordered signals

Where to go next

If you want to write your first serious strategy, go straight to PyPScript Basics. If you already know the rough shape of the language and just need exact grammar, open Syntax Reference.


NEXT
Quick Start

Last updated: February 2026

Edit this page on GitHub