Skip to content

Latest commit

 

History

History
58 lines (39 loc) · 1.6 KB

File metadata and controls

58 lines (39 loc) · 1.6 KB

Backtrader Wrapper

It is a Backtrader wrapper to implement trading strategies.

Also, you can find some example strategies implemented.

Deploy (python 3.7)

$ git clone https://github.com/Python-para-Trading/wrapper-backtrader.git
$ cd wrapper-backtrader
$ virtualenv -p python3.7 env
$ source env/bin/activate
$ pip install -r requirements.txt

Run

$ python run.py

Advanced use

You can modify the settings.py file to run strategies with different configurations.

You can write your own strategy on a new file in strategies folder and import this strategy in strategies/init.py After, you can use your strategy on the parameter 'strategy' in settings.CONFIG.

Define tu propia estrategia paso a paso:

1 - Escribimos nuestra estrategia en un fichero python situado en la carpeta strategies.

2 - Importamos nuestra estrategia en strategies.__init__.py. Ejemplo:

from .nombre_fichero import NombreEstrategia

3 - En el settings.py modificamos la variable CONFIG['strategies'] para añadir nuestra estrategia.

4 - Ejecutamos el wrapper mediante:

python run.py

TODO: