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.4.0.tar.gz (112.4 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.4.0-py3-none-any.whl (115.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for bruedemo-0.4.0.tar.gz
Algorithm Hash digest
SHA256 f44253fa03c3f9597dfb0d00561fd1961dbc401044f26876b6e9ca18e8bceffe
MD5 fc623306b4533a5c3ac6b5b9ec1c9368
BLAKE2b-256 68d54e371347c642d8e351a8c98108cec87d59d9328412f47e4f1101300e8124

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bruedemo-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 115.2 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.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 21506e4dd2be07388ce1763f62a3364128deab394933fea9bfdca98e9187de1f
MD5 3eee1e1d9e5b654b174fb51b2546d549
BLAKE2b-256 8e39ac6395f7ef2bcd56b6599cced9f91f8b2d75304813c53f14c90347be3768

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