noba


Namenoba JSON
Version 1.1.7 PyPI version JSON
download
home_pagehttps://github.com/iniself/noba
SummaryNoba is not only Backtrader
upload_time2023-06-04 01:34:06
maintainer
docs_urlNone
authorMetaer
requires_python>=3.6
licenseGNU General Public License v3 or later (GPLv3+)
keywords trading development finance quant backtrader bokeh
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # What is Noba
## Noba means not only backtrader :)

**You can visit noba documentation for more information: [EN(coming soon)](#) | [中文](https://aui.photos/noba-doc/zh/)**

The core of Noba is an `ioc container`, through which you can create `BB` service, which based on [Backtrader](https://www.backtrader.com/)*(one quantitative backtest system)* and [Bokeh](https://bokeh.org/) *(use bokeh as the backend, Backtrader can get richer plot effects)*    *\* BB service would like to thank [backtrader_plotting](https://github.com/verybadsoldier/backtrader_plotting) and [btplotting](https://github.com/happydasch/btplotting) for providing the main code for using bokeh as the backend for the backtrader*
```python
from noba import core
bt =  core.make('bb')
```

Of course, you can also create your own services based container. Combined with **Pipeline System** and **Event System** (which can be created directly through containers), noba can enable your quantitative projects to work in a more engineering methods
```python
from noba import core
pipline =  core.make('pipeline')
cleaned_data = pipline.via("handle").send(raw_data).through([ChangeDataType, RepeatRowData, ExceptionData, MissingData]).then(lambda raw_data:raw_data)
```

```python
from noba import core
event = core.make('event')
db_event = event.hub(['read_database_complete'])
db_event.watch('read_database_complete', lambda data:..., always=True)
...
db_event.fire('read_database_complete')
```

More importantly, Noba can create database service objects (dber) through containers. This is a **Database Abstraction Layer**. Through configuration files(one json file) and unified one set of APIs, you can operate the most common databases

```python
from noba import core
dber =  core.make('db')
stocks = db.table('daily').where('Open==3578.73').or_where('High==3652.46').set_index('Date').get_except('OpenInterest')
```

# Getting Started
* Python >= 3.6 is required.
* Suggest using conda to manage virtual environments


## Installation

```bash
pip install noba
# or
pip install git+https://github.com/iniself/noba
```


## Init noba project

```bash
mkdir your_noba_project
cd your_noba_project
noba init
```

## Preparation
Here you can do some project configuration and write your own service provider, and so on. Please refer to the **NOBA documentation** for details

## Write strategy
```bash
vim main.py
```

Only give **Live Mode** example, about **Normal Mode** and **Optstrategy Mode** pls refer to **NOBA documentation**
* Add to cerebro as an analyzer **(Live Mode)**:
  ```python
  from noba import core
    ...
    ...
  bt = core.make('bb')
  cerebro = bt.Cerebro()
  cerebro.addstrategy(MyStrategy)
  cerebro.adddata(LiveDataStream()) # Note! Data is must Live Data
  cerebro.addanalyzer(bt.analyzers.Live, force_plot_legend=True, autostart=True)
  cerebro.run()
  # cerebro.plot() # do not run this line unless your data is not real-time
  ```

* If you need to change the default port or share the plotting to public:

  ```python
  cerebro.addanalyzer(bt.analyzers.Live, address="localhost", port=8889)
  ```

* Note! In Jupyter you can plut to a single browser tab with iplot=False:

  ```python
  cerebro.plot(plot, iplot=False)
  ```

# Demos

<https://iniself.github.io/noba/>

# Contact us
Telegram Channel: [Aui_Say](https://t.me/aui_say)
Discord Server: [Aui and Friends](https://discord.gg/dhp8uzKSfR)


# Sponsoring

If you want to support the development of noba, consider to support this project.

* ETH: 0x0275779f70179748C6fCe1Fe5D7638DfA7e3F986



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/iniself/noba",
    "name": "noba",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "trading,development,finance,quant,backtrader,Bokeh",
    "author": "Metaer",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/bb/45/171bdfaa1fae3cf40b4038884f4551d5c3aaef8ad05732b3b735f2413cab/noba-1.1.7.tar.gz",
    "platform": null,
    "description": "# What is Noba\n## Noba means not only backtrader :)\n\n**You can visit noba documentation for more information: [EN(coming soon)](#) | [\u4e2d\u6587](https://aui.photos/noba-doc/zh/)**\n\nThe core of Noba is an `ioc container`, through which you can create `BB` service, which based on [Backtrader](https://www.backtrader.com/)*(one quantitative backtest system)* and [Bokeh](https://bokeh.org/) *(use bokeh as the backend, Backtrader can get richer plot effects)*    *\\* BB service would like to thank [backtrader_plotting](https://github.com/verybadsoldier/backtrader_plotting) and [btplotting](https://github.com/happydasch/btplotting) for providing the main code for using bokeh as the backend for the backtrader*\n```python\nfrom noba import core\nbt =  core.make('bb')\n```\n\nOf course, you can also create your own services based container. Combined with **Pipeline System** and **Event System** (which can be created directly through containers), noba can enable your quantitative projects to work in a more engineering methods\n```python\nfrom noba import core\npipline =  core.make('pipeline')\ncleaned_data = pipline.via(\"handle\").send(raw_data).through([ChangeDataType, RepeatRowData, ExceptionData, MissingData]).then(lambda raw_data:raw_data)\n```\n\n```python\nfrom noba import core\nevent = core.make('event')\ndb_event = event.hub(['read_database_complete'])\ndb_event.watch('read_database_complete', lambda data:..., always=True)\n...\ndb_event.fire('read_database_complete')\n```\n\nMore importantly, Noba can create database service objects (dber) through containers. This is a **Database Abstraction Layer**. Through configuration files(one json file) and unified one set of APIs, you can operate the most common databases\n\n```python\nfrom noba import core\ndber =  core.make('db')\nstocks = db.table('daily').where('Open==3578.73').or_where('High==3652.46').set_index('Date').get_except('OpenInterest')\n```\n\n# Getting Started\n* Python >= 3.6 is required.\n* Suggest using conda to manage virtual environments\n\n\n## Installation\n\n```bash\npip install noba\n# or\npip install git+https://github.com/iniself/noba\n```\n\n\n## Init noba project\n\n```bash\nmkdir your_noba_project\ncd your_noba_project\nnoba init\n```\n\n## Preparation\nHere you can do some project configuration and write your own service provider, and so on. Please refer to the **NOBA documentation** for details\n\n## Write strategy\n```bash\nvim main.py\n```\n\nOnly give **Live Mode** example, about **Normal Mode** and **Optstrategy Mode** pls refer to **NOBA documentation**\n* Add to cerebro as an analyzer **(Live Mode)**:\n  ```python\n  from noba import core\n    ...\n    ...\n  bt = core.make('bb')\n  cerebro = bt.Cerebro()\n  cerebro.addstrategy(MyStrategy)\n  cerebro.adddata(LiveDataStream()) # Note! Data is must Live Data\n  cerebro.addanalyzer(bt.analyzers.Live, force_plot_legend=True, autostart=True)\n  cerebro.run()\n  # cerebro.plot() # do not run this line unless your data is not real-time\n  ```\n\n* If you need to change the default port or share the plotting to public:\n\n  ```python\n  cerebro.addanalyzer(bt.analyzers.Live, address=\"localhost\", port=8889)\n  ```\n\n* Note! In Jupyter you can plut to a single browser tab with iplot=False:\n\n  ```python\n  cerebro.plot(plot, iplot=False)\n  ```\n\n# Demos\n\n<https://iniself.github.io/noba/>\n\n# Contact us\nTelegram Channel: [Aui_Say](https://t.me/aui_say)\nDiscord Server: [Aui and Friends](https://discord.gg/dhp8uzKSfR)\n\n\n# Sponsoring\n\nIf you want to support the development of noba, consider to support this project.\n\n* ETH: 0x0275779f70179748C6fCe1Fe5D7638DfA7e3F986\n\n\n",
    "bugtrack_url": null,
    "license": "GNU General Public License v3 or later (GPLv3+)",
    "summary": "Noba is not only Backtrader",
    "version": "1.1.7",
    "project_urls": {
        "Bug Tracker": "https://github.com/iniself/noba/issues",
        "Demos": "https://github.com/iniself/noba/tree/gh-pages",
        "Documentation": "https://github.com/iniself/noba",
        "Homepage": "https://github.com/iniself/noba",
        "Source Code": "https://github.com/iniself/noba"
    },
    "split_keywords": [
        "trading",
        "development",
        "finance",
        "quant",
        "backtrader",
        "bokeh"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0aff16f5431ea67525728c0a94871da0f825305a9796ccc1f439fd1125c8f658",
                "md5": "6dce607f12c6d043f1e2294e47e28797",
                "sha256": "8e8a469d6c6bc43a683029be149244d79c88ee63ed6e56abedf27c15aeba360c"
            },
            "downloads": -1,
            "filename": "noba-1.1.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6dce607f12c6d043f1e2294e47e28797",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 513866,
            "upload_time": "2023-06-04T01:34:03",
            "upload_time_iso_8601": "2023-06-04T01:34:03.931000Z",
            "url": "https://files.pythonhosted.org/packages/0a/ff/16f5431ea67525728c0a94871da0f825305a9796ccc1f439fd1125c8f658/noba-1.1.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bb45171bdfaa1fae3cf40b4038884f4551d5c3aaef8ad05732b3b735f2413cab",
                "md5": "fee7dfa4650f7c8289452d3b4d985e4e",
                "sha256": "4e4d5d5339b8f93133a8f76dc6108b443a63f4bed0502296b11f0f2f43bda9f3"
            },
            "downloads": -1,
            "filename": "noba-1.1.7.tar.gz",
            "has_sig": false,
            "md5_digest": "fee7dfa4650f7c8289452d3b4d985e4e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 434104,
            "upload_time": "2023-06-04T01:34:06",
            "upload_time_iso_8601": "2023-06-04T01:34:06.642779Z",
            "url": "https://files.pythonhosted.org/packages/bb/45/171bdfaa1fae3cf40b4038884f4551d5c3aaef8ad05732b3b735f2413cab/noba-1.1.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-04 01:34:06",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "iniself",
    "github_project": "noba",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "tox": true,
    "lcname": "noba"
}
        
Elapsed time: 1.20843s