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.3.0.tar.gz (111.7 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.3.0-py3-none-any.whl (114.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for bruedemo-0.3.0.tar.gz
Algorithm Hash digest
SHA256 5ee91061aeb4dcd2c08ad35629cd86b46d6cb734ad5df4f1673e6537f3609b8a
MD5 c8dffa745d3cc9779c90615cc1f18a42
BLAKE2b-256 492ce1d01783131dbb1dab2632caef95d2cd254514f1bc4ef9ffbd7fc168cbf1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bruedemo-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 114.6 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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f3609c13d6252513e1d2410379f8c310c602831a449e87d3abf87b9606ee9c1b
MD5 3b9594906476e75a534db7cc4b73fdc8
BLAKE2b-256 4ed0bfb014d0acfc6ae636642fdaf55ff30e7c13c55275a083ca9dac0fbfc3f1

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