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):
    buy(sl=close - atr(14) * 2, tp=close + atr(14) * 3)
if crossunder(fast, slow):
    close()

One order vocabulary, buy() / sell() / close(), is all there is. The same script backtests today and (when the live driver ships) trades live; the runner decides, the script never does.

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.1.tar.gz (112.5 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.1-py3-none-any.whl (115.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bruedemo-0.4.1.tar.gz
  • Upload date:
  • Size: 112.5 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.1.tar.gz
Algorithm Hash digest
SHA256 34e012435f1357124e82e732f136261104f912585c19dfab122781bebe21f717
MD5 9d0316b92c0001a4ec047464a5afcb61
BLAKE2b-256 9d228c316c47aa43c8faa5fa3070790ceeeb7c9344c20d390a3bedd9569d6558

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bruedemo-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 115.3 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e8d9b4fa8b3c37337cf30bc37ef09f2c7cea017a624a4903e07add76ab569813
MD5 d457a2e03d5f341c1265f59e02e7b4a2
BLAKE2b-256 446db235509759f627a68e1ea1e94ac6e05e6704704c4129d36367662de5fdb5

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.4.1 This release

2 files

0.4.0

2 files

0.3.0

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page