Skip to content

Python-para-Trading/wrapper-backtrader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

About

Trading Starter Kit on Backtrader

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages