https://github.com/drakkar-software/octobot-script

Quant framework by OctoBot

https://github.com/drakkar-software/octobot-script

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (8.6%) to scientific vocabulary

Keywords

ai backtesting cryptocurrency deep-learning exchange machine-learning ml octobot python quant reinforcement-learning technical-analysis
Last synced: 5 months ago · JSON representation

Repository

Quant framework by OctoBot

Basic Info
Statistics
  • Stars: 33
  • Watchers: 4
  • Forks: 21
  • Open Issues: 1
  • Releases: 0
Topics
ai backtesting cryptocurrency deep-learning exchange machine-learning ml octobot python quant reinforcement-learning technical-analysis
Created about 3 years ago · Last pushed 9 months ago
Metadata Files
Readme Changelog License

README.md

OctoBot-Script 0.0.26

PyPI Downloads Dockerhub Github-Action-CI

OctoBot-Script Community

Telegram Chat Discord Twitter

OctoBot Script is the Quant framework by OctoBot

OctoBot Script is in alpha version

Documentation available at octobot.cloud/en/guides/octobot-script

Install OctoBot Script from pip

OctoBot Script requires Python 3.10

{.sourceCode .bash} python3 -m pip install OctoBot wheel appdirs==1.4.4 python3 -m pip install octobot-script

Example of a backtesting script

Script

``` python import asyncio import tulipy # Can be any TA library. import octobot_script as obs

async def rsitest(): async def strategy(ctx): # Will be called at each candle. if rundata["entries"] is None: # Compute entries only once per backtest. closes = await obs.Close(ctx, maxhistory=True) times = await obs.Time(ctx, maxhistory=True, useclosetime=True) rsiv = tulipy.rsi(closes, period=ctx.tentacle.tradingconfig["period"]) delta = len(closes) - len(rsiv) # Populate entries with timestamps of candles where RSI is # bellow the "rsivaluebuythreshold" configuration. rundata["entries"] = { times[index + delta] for index, rsival in enumerate(rsiv) if rsival < ctx.tentacle.tradingconfig["rsivaluebuythreshold"] } await obs.plotindicator(ctx, "RSI", times[delta:], rsiv, rundata["entries"]) if obs.currentlivetime(ctx) in rundata["entries"]: # Uses pre-computed entries times to enter positions when relevant. # Also, instantly set take profits and stop losses. # Position exists could also be set separately. await obs.market(ctx, "buy", amount="10%", stoplossoffset="-15%", takeprofitoffset="25%")

# Configuration that will be passed to each run.
# It will be accessible under "ctx.tentacle.trading_config".
config = {
    "period": 10,
    "rsi_value_buy_threshold": 28,
}

# Read and cache candle data to make subsequent backtesting runs faster.
data = await obs.get_data("BTC/USDT", "1d", start_timestamp=1505606400)
run_data = {
    "entries": None,
}
# Run a backtest using the above data, strategy and configuration.
res = await obs.run(data, strategy, config)
print(res.describe())
# Generate and open report including indicators plots 
await res.plot(show=True)
# Stop data to release local databases.
await data.stop()

Call the execution of the script inside "asyncio.run" as

OctoBot-Script runs using the python asyncio framework.

asyncio.run(rsi_test()) ```

Generated report

report-p1

Join the community

We recently created a telegram channel dedicated to OctoBot Script.

Telegram News

Owner

  • Name: Drakkar-Software
  • Login: Drakkar-Software
  • Kind: organization
  • Email: github@drakkar.software
  • Location: Paris

GitHub Events

Total
  • Watch event: 8
  • Delete event: 4
  • Push event: 4
  • Pull request review event: 4
  • Pull request event: 9
  • Fork event: 9
  • Create event: 8
Last Year
  • Watch event: 8
  • Delete event: 4
  • Push event: 4
  • Pull request review event: 4
  • Pull request event: 9
  • Fork event: 9
  • Create event: 8

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 139
  • Total Committers: 3
  • Avg Commits per committer: 46.333
  • Development Distribution Score (DDS): 0.381
Past Year
  • Commits: 11
  • Committers: 2
  • Avg Commits per committer: 5.5
  • Development Distribution Score (DDS): 0.091
Top Committers
Name Email Commits
Guillaume De Saint Martin g****n@i****r 86
Herklos h****v@p****m 33
Guillaume De Saint Martin g****m@g****m 20
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 3
  • Total pull requests: 26
  • Average time to close issues: 16 days
  • Average time to close pull requests: about 11 hours
  • Total issue authors: 3
  • Total pull request authors: 4
  • Average comments per issue: 1.33
  • Average comments per pull request: 0.08
  • Merged pull requests: 20
  • Bot issues: 0
  • Bot pull requests: 2
Past Year
  • Issues: 1
  • Pull requests: 10
  • Average time to close issues: about 1 month
  • Average time to close pull requests: about 3 hours
  • Issue authors: 1
  • Pull request authors: 3
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 6
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • george-cuculescu (1)
  • Brvcket (1)
  • jechaviz (1)
Pull Request Authors
  • GuillaumeDSM (22)
  • Herklos (7)
  • dependabot[bot] (3)
  • umblaciosu (2)
Top Labels
Issue Labels
Pull Request Labels
dependencies (3)

Dependencies

.github/workflows/main.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
dev_requirements.txt pypi
  • coverage * development
  • coveralls * development
  • mock >=4.0.2 development
  • pip * development
  • pur * development
  • pylint * development
  • pytest >=7.1 development
  • pytest-asyncio >=0.19 development
  • pytest-cov * development
  • pytest-pep8 * development
  • pytest-xdist * development
  • setuptools * development
  • twine * development
  • wheel * development
requirements.txt pypi
  • OctoBot ==0.4.35
  • aiohttp *
  • appdirs ==1.4.4
  • click ==8.1.3
  • jinja2 *
  • wheel *
.github/workflows/docker.yml actions
  • actions/cache v2 composite
  • actions/checkout v3 composite
  • docker/build-push-action master composite
  • docker/login-action v1 composite
  • docker/setup-buildx-action master composite
  • docker/setup-qemu-action master composite
  • reviewdog/action-hadolint v1 composite
Dockerfile docker
  • python 3.10-slim-buster build
setup.py pypi