Skip to main content

bruedemo

Internal TEST build of the Brue trading-strategy language engine (pure Python). Published for real-world install testing by the London Strategic Edge team only. The engine will be republished under its final name; do not depend on this package.

A complete strategy is a few precise lines. The header is config only; names are optional and unnecessary:

strategy(capital=100000, default_qty=0.25)

fast = ema(close, 12)
slow = ema(close, 26)

if crossover(fast, slow):
    entry("long", stop_loss=close - atr(14) * 2)
if crossunder(fast, slow):
    close_all()

Run it in one line:

import brue

r = brue.run("trend.brue", "EURJPY_1h.csv")
r.stats          # winRate, profitFactor, sharpe, drawdown, ...
r.trades_frame() # the ledger as a pandas DataFrame

Fills are honest (orders fill at the NEXT bar's open; a stop beats a target inside one bar), 143 indicators are built in, and python -m brue adds montecarlo / walkforward on the same script.

Download files

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

Source Distribution

bruedemo-0.2.2.tar.gz (111.2 kB view details)

Uploaded Source

Built Distribution

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

bruedemo-0.2.2-py3-none-any.whl (114.7 kB view details)

Uploaded Python 3

File details

Details for the file bruedemo-0.2.2.tar.gz.

File metadata

  • Download URL: bruedemo-0.2.2.tar.gz
  • Upload date:
  • Size: 111.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for bruedemo-0.2.2.tar.gz
Algorithm Hash digest
SHA256 4fccb814e8d2e5ea2316cb50ec38ea34cb47402a1ba5f92980655db206562040
MD5 414212e466b56483fec038594f15a2b6
BLAKE2b-256 b47f7345cf5754f43d263f3a1967da8f8a5ee0433232dd6b52afbdfd5c4317c0

See more details on using hashes here.

File details

Details for the file bruedemo-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: bruedemo-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 114.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for bruedemo-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3557c9cebe744cf6b0f67b937bc430983a6bdaf5dd9dab0f00ee5d794e9a79bd
MD5 f36d3cc9f298b26e5a6e368b6c3e7091
BLAKE2b-256 9fa02ad841aff8696a5168b84d4393ca058e3b72444e3d8c492905c13e65a34b

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 Sentry Error logging StatusPage Status page